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

Querying Details of a Backend Server Group

Function

This API is used to query details about a backend server group using its ID.

URI

GET /v2/{project_id}/elb/pools/{pool_id}

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

pool_id

Yes

String

Specifies the ID of the backend server group.

Request

None

Response

Table 2 Response parameters

Parameter

Type

Description

pool

Object

Specifies the backend server group. For details, see Table 3.

Table 3 pool parameter description

Parameter

Type

Description

id

String

Specifies the ID of the backend server group.

tenant_id

String

Specifies the ID of the project where the backend server group is used.

The value contains a maximum of 255 characters.

name

String

Specifies the name of the backend server group.

The value contains a maximum of 255 characters.

description

String

Provides supplementary information about the backend server group.

The value contains a maximum of 255 characters.

protocol

String

Specifies the protocol that the backend server group uses to receive requests.

TCP, UDP, and HTTP are supported.

When a backend server group is associated with a listener, the relationships between the protocol used by the listener and the protocol of the backend server group are as follows:

  • When the protocol used by the listener is UDP, the protocol of the backend server group must be UDP.
  • When the protocol used by the listener is TCP, the protocol of the backend server group must be TCP.
  • When the protocol used by the listener is HTTP or TERMINATED_HTTPS, the protocol of the backend server group must be HTTP.

lb_algorithm

String

Specifies the load balancing algorithm of the backend server group.

The value range varies depending on the protocol of the backend server group:
  • ROUND_ROBIN: indicates the weighted round robin algorithm.
  • LEAST_CONNECTIONS: indicates the weighted least connections algorithm.
  • SOURCE_IP: indicates the source IP hash algorithm. When the value is SOURCE_IP, the weights of backend servers in the server group are invalid.

members

Array

Lists the IDs of backend servers in the backend server group. For details, see Table 7.

healthmonitor_id

String

Specifies the ID of the health check configured for the backend server group.

admin_state_up

Boolean

Specifies the administrative status of the backend server group.

This parameter is reserved. The default value is true.

listeners

Array

Lists the IDs of listeners associated with the backend server group. For details, see Table 8.

loadbalancers

Array

Lists the IDs of load balancers associated with the backend server group. For details, see Table 9.

session_persistence

Object

Specifies whether to enable the sticky session feature. For details, see Table 10.

Once the sticky session feature is enabled, requests from the same client are sent to the same backend server within the specified period.

When this feature is disabled, the parameter value is null.

Table 4 members parameter description

Parameter

Type

Description

id

String

Specifies the ID of the associated backend server.

Table 5 listeners parameter description

Parameter

Type

Description

id

String

Specifies the ID of the associated backend server group.

Table 6 loadbalancers parameter description

Parameter

Type

Description

id

String

Specifies the ID of the associated load balancer.

Table 7 session_persistence parameter description

Parameter

Mandatory

Type

Description

type

Yes

String

Specifies the sticky session type.

The value range varies depending on the protocol of the backend server group:
  • SOURCE_IP: Requests are distributed based on the client's IP address. Requests from the same IP address are sent to the same backend server.
  • HTTP_COOKIE: When the client sends a request for the first time, the load balancer automatically generates a cookie and inserts the cookie into the response message. Subsequent requests are sent to the backend server that processes the first request.
  • APP_COOKIE: When the client sends a request for the first time, the backend server that receives the request generates a cookie and inserts the cookie into the response message. Subsequent requests are sent to this backend server.

When the protocol of the backend server group is TCP, only SOURCE_IP takes effect. When the protocol of the backend server group is HTTP, only HTTP_COOKIE or APP_COOKIE takes effect.

cookie_name

No

String

Specifies the cookie name.

This parameter is mandatory when the sticky session type is APP_COOKIE.

persistence_timeout

No

Integer

Specifies the sticky session timeout duration in minutes.

This parameter is invalid when type is set to APP_COOKIE.

The value range varies depending on the protocol of the backend server group:
  • When the protocol of the backend server group is TCP or UDP, the value ranges from 1 to 60.
  • When the protocol of the backend server group is HTTP, the value ranges from 1 to 1440.

Example Request

  • Example request: Querying details of a backend server group
    GET https://{Endpoint}/v2/1867112d054b427e808cc6096d8193a1/elb/pools/5a9a3e9e-d1aa-448e-af37-a70171f2a332

Example Response

  • Example response 1
    {
        "pool": {
            "lb_algorithm": "SOURCE_IP",
            "protocol": "TCP",
            "description": "",
            "admin_state_up": true,
            "loadbalancers": [
                {
                    "id": "6f52004c-3fe9-4c09-b8ce-ed9d9c74a3b1"
                }
            ],
            "tenant_id": "1867112d054b427e808cc6096d8193a1",
       
            "session_persistence": null,
            "healthmonitor_id": null,
            "listeners": [
                {
                    "id": "6e29b2cd-4e53-40f6-ae7b-29e918de67f2"
                }
            ],
            "members": [],
            "id": "5a9a3e9e-d1aa-448e-af37-a70171f2a332",
            "name": "my-pool"
        }
    }

Status Code

For details, see HTTP Status Codes of Load Balancers.