Updated on 2022-01-25 GMT+08:00

Querying the Status Tree of a Load Balancer

Function

This API is used to query the status tree of a load balancer. You can use this API to query details about the associated listeners, backend server groups, backend servers, health checks, forwarding policies, and forwarding rules, helping you understand the topology of resources associated with the load balancer.

URI

GET /v2/{project_id}/elb/loadbalancers/{loadbalancer_id}/statuses

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

loadbalancer_id

Yes

String

Specifies the load balancer ID.

Request

None

Response

Table 2 Parameter description

Parameter

Type

Description

statuses

Object

Specifies the status tree of a load balancer. For details, see Table 3.

Table 3 statuses parameter description

Parameter

Type

Description

loadbalancer

Object

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

Table 4 loadbalancer parameter description

Parameter

Type

Description

id

String

Specifies the load balancer ID.

name

String

Specifies the load balancer name.

The value contains a maximum of 255 characters.

listeners

Array

Lists the listeners added to the load balancer. For details of this parameter, see Table 5.

pools

Array

Lists the backend server groups associated with the load balancer. For details of this parameter, see Table 6.

operating_status

String

  • Specifies the operating status of the load balancer.
  • The value can be ONLINE, OFFLINE, DEGRADED, DISABLED, or NO_MONITOR.
  • This parameter is reserved. The default value is ONLINE.
  • The value contains a maximum of 16 characters.

provisioning_status

String

  • Specifies the provisioning status of the load balancer.
  • The value can be ACTIVE, PENDING_CREATE, or ERROR.
  • This parameter is reserved. The default value is ACTIVE.
  • The value contains a maximum of 16 characters.
Table 5 listeners parameter description

Parameter

Type

Description

id

String

Specifies the listener ID.

name

String

Specifies the listener name.

l7policies

Array

Lists associated forwarding policies. For details of this parameter, see Table 9.

pools

Array

Lists the backend server groups associated with the listener. For details of this parameter, see Table 6.

operating_status

String

  • Specifies the operating status of the listener.
  • The value can be ONLINE, OFFLINE, DEGRADED, DISABLED, or NO_MONITOR.
  • This parameter is reserved. The default value is ONLINE.

provisioning_status

String

  • Specifies the provisioning status of the listener.
  • The value can be ACTIVE, PENDING_CREATE, or ERROR.
  • This parameter is reserved. The default value is ACTIVE.
Table 6 pools parameter description

Parameter

Type

Description

id

String

Specifies the ID of the backend server group.

name

String

Specifies the name of the backend server group.

healthmonitor

Object

Provides health check details of the backend server group. For details of this parameter, see Table 7.

members

Array

Lists the members contained in the backend server group. For details of this parameter, see Table 8.

operating_status

String

  • Specifies the operating status of the backend server group.
  • The value can be ONLINE, OFFLINE, DEGRADED, DISABLED, or NO_MONITOR.
  • This parameter is reserved. The default value is ONLINE.

provisioning_status

String

  • Specifies the provisioning status of the backend server group.
  • The value can be ACTIVE, PENDING_CREATE, or ERROR.
  • This parameter is reserved. The default value is ACTIVE.
Table 7 healthmonitor parameter description

Parameter

Type

Description

id

String

Specifies the health check ID.

name

String

Specifies the health check name.

type

String

  • Specifies the health check protocol.
  • The value can be UDP_CONNECT, TCP, or HTTP.

provisioning_status

String

  • Specifies the provisioning status of the health check.
  • The value can be ACTIVE, PENDING_CREATE, or ERROR.
  • This parameter is reserved. The default value is ACTIVE.
Table 8 members parameter description

Parameter

Type

Description

id

String

Specifies the backend server ID.

address

String

Specifies the private IP address of the backend server,

for example, 192.168.3.11.

protocol_port

Integer

  • Specifies the port used by the backend server.
  • The port number ranges from 0 to 65535.

operating_status

String

  • Specifies the health check result of the backend server.
  • The value can be ONLINE, OFFLINE, DEGRADED, DISABLED, or NO_MONITOR. ONLINE: The backend server is healthy. OFFLINE: The backend server is unhealthy. DISABLED: The backend server does not exist. NO_MONITOR: The health check is disabled.

provisioning_status

String

  • Specifies the provisioning status of the backend server.
  • The value can be ACTIVE, PENDING_CREATE, or ERROR.
  • This parameter is reserved. The default value is ACTIVE.
Table 9 l7policies parameter description

Parameter

Type

Description

id

String

Specifies the forwarding policy ID.

name

String

Specifies the forwarding policy name.

rules

Array

Lists the forwarding rules of the forwarding policy. For details of this parameter, see Table 10.

action

String

  • Specifies whether requests are forwarded to another backend server group or redirected to another HTTPS listener.
  • The value can be REDIRECT_TO_POOL or REDIRECT_TO_LISTENER. REDIRECT_TO_POOL: Requests are forwarded to another backend server group. REDIRECT_TO_LISTENER: Requests are redirected to an HTTPS listener.

provisioning_status

String

  • Specifies the provisioning status of the forwarding policy.
  • The value can be ACTIVE, PENDING_CREATE, or ERROR.
  • This parameter is reserved. The default value is ACTIVE.
Table 10 rules parameter description

Parameter

Type

Description

id

String

Specifies the forwarding rule ID.

type

String

  • Specifies the match type of a forwarding rule.
  • The value can be PATH or HOST_NAME. PATH: matches the path in the request. HOST_NAME: matches the domain name in the request.

provisioning_status

String

  • Specifies the provisioning status of the forwarding rule.
  • The value can be ACTIVE, PENDING_CREATE, or ERROR.
  • This parameter is reserved. The default value is ACTIVE.

Example Request

  • Example request
    GET https://{Endpoint}/v2/145483a5107745e9b3d80f956713e6a3/elb/loadbalancers/38278031-cfca-44be-81be-a412f618773b/statuses

Example Response

  • Example response
    {
        "statuses": {
            "loadbalancer": {
                "name": "lb-jy",
                "provisioning_status": "ACTIVE",
                "listeners": [
                    {
                        "name": "listener-jy-1",
                        "provisioning_status": "ACTIVE",
                        "pools": [
                            {
                                "name": "pool-jy-1",
                                "provisioning_status": "ACTIVE",
                                "healthmonitor": {
                                    "type": "TCP",
                                    "id": "7422b51a-0ed2-4702-9429-4f88349276c6",
                                    "name": "",
                                    "provisioning_status": "ACTIVE"
                                },
                                "members": [
                                    {
                                        "protocol_port": 80,
                                        "address": "192.168.44.11",
                                        "id": "7bbf7151-0dce-4087-b316-06c7fa17b894",
                                        "operating_status": "ONLINE",
                                        "provisioning_status": "ACTIVE"
                                    }
                                ],
                                "id": "c54b3286-2349-4c5c-ade1-e6bb0b26ad18",
                                "operating_status": "ONLINE"
                            }
                        ],
                        "l7policies": [],
                        "id": "eb84c5b4-9bc5-4bee-939d-3900fb05dc7b",
                        "operating_status": "ONLINE"
                    }
                ],
                "pools": [
                    {
                        "name": "pool-jy-1",
                        "provisioning_status": "ACTIVE",
                        "healthmonitor": {
                            "type": "TCP",
                            "id": "7422b51a-0ed2-4702-9429-4f88349276c6",
                            "name": "",
                            "provisioning_status": "ACTIVE"
                        },
                        "members": [
                            {
                                "protocol_port": 80,
                                "address": "192.168.44.11",
                                "id": "7bbf7151-0dce-4087-b316-06c7fa17b894",
                                "operating_status": "ONLINE",
                                "provisioning_status": "ACTIVE"
                            }
                        ],
                        "id": "c54b3286-2349-4c5c-ade1-e6bb0b26ad18",
                        "operating_status": "ONLINE"
                    }
                ],
                "id": "38278031-cfca-44be-81be-a412f618773b",
                "operating_status": "ONLINE"
            }
        }
    }

Status Code

For details, see HTTP Status Codes of Load Balancers.