• Native OpenStack API

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

Create load balancer

Function Description

This interface is used to create load balancers.

Interface Format

Method

URI

Description

POST

/v2.0/lbaas/loadbalancers

Creates load balancers.

Restrictions

  • Members and VIPs associated with the same load balancer must be in the same VPC.
  • You cannot specify the flavor to create a load balancer.
  • admin_state_up must be set to true.
  • provider must be set to vlb.
  • The network corresponding to the subnet set by vip_subnet_id must be the internal network.
  • A load balancer can be bound to only one elastic IP address.

Request Parameter

Parameter

Type

Mandatory

Description

loadbalancer

Dict

Yes

Specifies the load balancer. For details, see Table 1.

The vip_subnet_id field is mandatory.

Response Parameter

Parameter

Type

Mandatory

Description

loadbalancer

Dict

Yes

Specifies the load balancer. For details, see Table 1.

Request Example

POST /v2.0/lbaas/loadbalancers
{
    "loadbalancer": {
        "name": "loadbalancer1",
        "description": "simple lb",
        "tenant_id": "1867112d054b427e808cc6096d8193a1",
        "vip_subnet_id": "58077bdb-d470-424b-8c45-2e3c65060a5b",
        "vip_address": "10.0.0.4",
        "admin_state_up": true
    }
}

Response Example

{
    "loadbalancer": {
        "description": "",
        "admin_state_up": true,
        "tenant_id": "1867112d054b427e808cc6096d8193a1",
        "provisioning_status": "ACTIVE",
        "vip_subnet_id": "58077bdb-d470-424b-8c45-2e3c65060a5b",
        "listeners": [],
        "vip_address": "10.0.0.4",
        "vip_port_id": "519f6af5-74aa-4347-9dba-84c440192877",
        "provider": "vlb",
        "pools": [],
        "id": "b0657373-0c68-41d1-980f-1a44d9e3ff01",
        "operating_status": "ONLINE",
        "name": "loadbalancer1"
    }
}

Error Code

See section Return Code Processing.