• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Neutron
  5. LBaas
  6. Create pool

Create pool

Function Description

This interface is used to create a pool.

Interface Format

Method

URI

Description

POST

/v2.0/lbaas/pools

Creates a pool.

Restrictions

Only TCP and HTTP are supported.

Pools associated with the same listener must use the same protocol.

The value of parameter admin_state_up must be set to true.

When specifying session-persistence, you can set cookie_name only when type is set to APP_COOKIE.

Request Parameter

Parameter

Type

Mandatory

Description

pool

Dict

Yes

Specifies the pool. For details, see Table 3.

The lb_algorithmprotocol, and listener_id fields are mandatory.

Response Parameter

Parameter

Type

Mandatory

Description

pool

Dict

Yes

Specifies the pool. For details, see Table 3.

Request Example

POST /v2.0/lbaas/pools
{
  "pool": {
    "lb_algorithm": "ROUND_ROBIN",
    "listener_id": "370fb112-e920-486a-b051-1d0d30704dd3",
    "protocol": "HTTP",
    "session_persistence": {
      "cookie_name": "my_cookie",
      "type": "APP_COOKIE"
    },
    "admin_state_up": true
  }
}

Response Example

{
  "pool": {
    "lb_algorithm": "ROUND_ROBIN",
    "protocol": "HTTP",
    "description": "",
    "admin_state_up": true,
    "loadbalancers": [
      {
        "id": "6b041b9e-976b-40ba-b075-375be6110b53"
      }
    ],
    "tenant_id": "145483a5107745e9b3d80f956713e6a3",
    "session_persistence": {
      "cookie_name": "my_cookie",
      "type": "APP_COOKIE"
    },
    "healthmonitor_id": null,
    "listeners": [
      {
        "id": "370fb112-e920-486a-b051-1d0d30704dd3"
      }
    ],
    "members": [

    ],
    "id": "307f8968-9474-4d0c-8434-66be09dabcc1",
    "name": ""
  }
} 

Error Code

See section Return Code Processing.