• Elastic Load Balancing

elb
  1. Help Center
  2. Elastic Load Balancing
  3. API Reference
  4. Native APIs (OpenStack Neutron)
  5. Load Balancer
  6. Querying Load Balancers

Querying Load Balancers

Function

This API is used to query load balancers using search criteria and to display the load balancers in a list.

URI

GET /v2.0/lbaas/loadbalancers

Request

  • Request parameters
    Table 1 Parameter description

    Parameter

    Type

    Mandatory

    Description

    marker

    String

    No

    • Specifies the ID of the last load balancer on the previous page. If this parameter is left blank, the first page is queried.
    • This parameter must be used together with limit.

    limit

    Int

    No

    Specifies the number of records on each page.

    The value ranges from 0 to intmax.

    page_reverse

    Bool

    No

    • Specifies the pagination direction. The value can be true or false (default). true indicates backward pagination, and false indicates forward pagination.
    • This parameter must be used together with limit.

    id

    uuid-str

    No

    Specifies the load balancer ID.

    description

    String (255)

    No

    Provides supplementary information about the load balancer.

    name

    String (255)

    No

    Specifies the load balancer name.

    operating_status

    String

    No

    Specifies the operating status. The value can be ONLINE, OFFLINE, DEGRADED, DISABLED, or NO_MONITOR.

    provisioning_status

    String

    No

    Specifies the provisioning status. The value can be ACTIVE, PENDING_CREATE, or ERROR.

    vip_address

    String (64)

    No

    Specifies the virtual IP address.

    vip_port_id

    uuid-str

    No

    Specifies the ID of the port with which the virtual IP address is associated.

    vip_subnet_id

    uuid-str

    No

    • Specifies the ID of the subnet from which the virtual IP address is assigned.
    • This parameter is valid only when the load balancer is a private network load balancer.

    member_address

    uuid-str

    No

    Specifies the private IP address of the backend server.

    member_device_id

    uuid-str

    No

    Specifies the ID of the backend server.

    vpc_id

    uuid-str

    No

    Specifies the VPC ID.

    The values of fields used for query cannot be null.

  • Example request 1
    GET /v2.0/lbaas/loadbalancers
  • Example request 2
    GET /v2.0/lbaas/loadbalancers?limit=10&marker=165b6a38-5278-4569-b747-b2ee65ea84a4
  • Example request 3
    GET /v2.0/lbaas/loadbalancers?member_address=192.168.0.198

Response

  • Response parameters
    Table 2 Parameter description

    Parameter

    Type

    Description

    loadbalancers

    List

    Lists the load balancers.

    Table 3 loadbalancers field description

    Parameter

    Type

    Description

    id

    uuid-str

    Specifies the load balancer ID.

    tenant_id

    String (255)

    Specifies the project ID.

    name

    String (255)

    Specifies the load balancer name.

    description

    String (255)

    Provides supplementary information about the load balancer.

    vip_subnet_id

    uuid-str

    • Specifies the ID of the subnet from which the virtual IP address is assigned.
    • This parameter is valid only when the load balancer is a private network load balancer.

    vip_port_id

    uuid-str

    Specifies the ID of the port with which the virtual IP address is associated.

    provider

    String

    • Specifies the provider.
    • The value can only be vlb.

    vip_address

    String (64)

    Specifies the virtual IP address.

    listeners

    uuid-list

    Lists the associated listeners.

    pools

    uuid-list

    Lists the associated backend server groups.

    provisioning_status

    String (16)

    Specifies the provisioning status. The value can be ACTIVE, PENDING_CREATE, or ERROR.

    operating_status

    String (16)

    Specifies the operating status. The value can be ONLINE, OFFLINE, DEGRADED, DISABLED, or NO_MONITOR.

    admin_state_up

    Bool

    • Specifies the administrative status.
    • This value can only be true.

    tags

    String-list

    Specifies the load balancer tags.

    loadbalancers_links

    List

    Provides information about the previous or next page. This field is contained only in the response body when pagination query is performed.

    Table 4 loadbalancers_links field description

    Parameter

    Type

    Description

    href

    string

    Specifies the URL of the previous or next page.

    rel

    String (255)

    Specifies the prompt of the previous or next page. The value can be next or previous.

    next indicates that href is the URL of the next page, and previous indicates that href is the URL of the previous page.

  • Example response 1
    {
        "loadbalancers": [
            {
                "description": "simple lb",
                "admin_state_up": true,
                "tenant_id": "1a3e005cf9ce40308c900bcb08e5320c",
                "provisioning_status": "ACTIVE",
                "vip_subnet_id": "5328f1e6-ce29-44f1-9493-b128a5653350",
                "listeners": [
                    {
                        "id": "45196943-2907-4369-87b1-c009b1d7ac35"
                    }
                ],
                "vip_address": "10.0.0.2",
                "vip_port_id": "cbced4fe-6f6f-4fd6-9348-0c3d1219d6ca",
                "provider": "vlb",
                "pools": [
                    {
                        "id": "21d49cf7-4fd3-4cb6-8c48-b7fc6c259aab"
                }
                ],
                "id": "a9729389-6147-41a3-ab22-a24aed8692b2",
                "operating_status": "ONLINE",
                "tags": [],
                "name": "loadbalancer1"
                 
                
            }
    ]
    }
  • Example response 2
    {
        "loadbalancers": [
            {
                "description": "",
                "provisioning_status": "ACTIVE",
                "tenant_id": "601240b9c5c94059b63d484c92cfe308",
                "admin_state_up": true,
                "provider": "vlb",
                "pools": [
                    {
                        "id": "b13dba4c-a44c-4c40-8f6e-ce7a162b9f22"
                    },
                    {
                        "id": "4b9e765f-82ee-4128-911b-0a2d9ebc74c7"
                    }
                ],
                "listeners": [
                    {
                        "id": "21c41336-d0d3-4349-8641-6e82b4a4d097"
                    }
                ],
                "vip_port_id": "44ac5d9b-b0c0-4810-9a9d-c4dbf541e47e",
                "operating_status": "ONLINE",
                "vip_address": "192.168.0.234",
                "vip_subnet_id": "9d60827e-0e5c-490a-8183-0b6ebf9084ca",
                "id": "e79a7dd6-3a38-429a-95f9-c7f78b346cbe",
                "tags": [],
                "name": "elb-robot"
                 
                
            }
        ],
        "loadbalancers_links": [
            {
                "href": "https://network.Region.dc1.domainname.com/v2.0/lbaas/loadbalancers?limit=10&marker=e79a7dd6-3a38-429a-95f9-c7f78b346cbe&page_reverse=True",
                  "rel": "previous"
            }
        ]
    }
  • Example response 3
    {
        "loadbalancers": [
            {
                "description": "",
                "provisioning_status": "ACTIVE",
                "tenant_id": "601240b9c5c94059b63d484c92cfe308",
                "admin_state_up": true,
                "provider": "vlb",
                "pools": [
                    {
                        "id": "ed75f16e-fcc6-403e-a3fb-4eae82005eab"
                    },
                    {
                        "id": "f15f2723-4135-4bf8-9259-047d92684197"
                    }
                ],
                "listeners": [
                    {
                        "id": "75045172-70e9-480d-9443-b8b6459948f7"
                    },
                    {
                        "id": "b9a99cbb-d0a1-4269-bc5f-752ec37a10c3"
                    }
                ],
                "vip_port_id": "fb3f10f0-9417-4cf2-a82e-8f1da1687484",
                "operating_status": "ONLINE",
                "vip_address": "192.168.0.16",
                "vip_subnet_id": "3a450aa4-f642-4da8-b70d-cafd4a633b51",
                "id": "bc7ba445-035a-4464-a1a3-a62cf4a14116",
                "tags": [],
                "name": "elb-hm-test"
                
                                 
            }
        ]
    }

Return Codes

For details, see HTTP Status Codes for Enhanced Load Balancers.