Updated on 2022-08-15 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

Statuses object

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

Table 3 statuses parameter description

Parameter

Type

Description

loadbalancer

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 of Listeners objects

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

pools

Array of Pools objects

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

operating_status

String

This field is reserved.

It specifies the operating status of the load balancer. The value can be one of the following:

  • ONLINE (default): The load balancer is running normally.
  • DEGRADED: This status is displayed only when provisioning_status of a forwarding policy or forwarding rule added to a listener of the load balancer is set to ERROR and the API for querying the load balancer status tree is called.
  • DISABLED: This status is displayed only when admin_state_up of the load balancer is set to false and the API for querying the load balancer status tree is called.

provisioning_status

String

This parameter is reserved, and its value can only be ACTIVE.

It specifies the provisioning status of the load balancer.

Table 5 listeners parameter description

Parameter

Type

Description

id

String

Specifies the listener ID.

name

String

Specifies the listener name.

l7policies

Array of l7policies objects

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

pools

Array of Pools objects

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

operating_status

String

This parameter is reserved, and its value can only be ONLINE.

It specifies the operating status of the listener.

provisioning_status

String

This parameter is reserved, and its value can only be ACTIVE.

It specifies the provisioning status of the listener.

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

Healthmonitor object

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

members

Array of Members objects

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

operating_status

String

This parameter is reserved, and its value can only be ONLINE.

It specifies the operating status of the backend server group.

provisioning_status

String

This parameter is reserved, and its value can only be ACTIVE.

It specifies the provisioning status of the backend server group.

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

This parameter is reserved, and its value can only be ACTIVE.

It specifies the provisioning status of the health check.

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

This parameter is reserved. It specifies the operating status of the backend server. The value can be one of the following:

  • ONLINE: The backend server is running normally.
  • NO_MONITOR: No health check is configured for the backend server group that the backend server belongs to.
  • DISABLED: The backend server is not available. This status is displayed only when admin_state_up of the backend server, or the backend server group to which it belongs, or the associated load balancer is set to false and the API for querying the load balancer status tree is called.
  • OFFLINE: The cloud server used as the backend server is stopped or does not exist.
NOTE:

When admin_state_up is set to false and operating_status is set to OFFLINE for a backend server, DISABLED is returned for operating_status of the backend server in the response of this API.

provisioning_status

String

This parameter is reserved, and its value can only be ACTIVE.

It specifies the provisioning status of the backend server.

Table 9 l7policies parameter description

Parameter

Type

Description

id

String

Specifies the forwarding policy ID.

name

String

Specifies the forwarding policy name.

rules

Array of Rules objects

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 an 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

This parameter is reserved.

It specifies the provisioning status of the forwarding policy. The value can be one of the following:

  • ACTIVE (default): The forwarding policy is normal.
  • ERROR: Another forwarding policy of the same listener has the same forwarding rule.
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

This parameter is reserved.

It specifies the provisioning status of the forwarding rule. The value can be one of the following:

  • ACTIVE (default): The forwarding rule is normal.
  • ERROR: Another forwarding policy of the same listener has the same forwarding rule.

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 Status Codes.