Querying Backend Server Groups
Function
This API is used to query the backend server groups and display them in a list. Filter query and pagination query are supported. Unless otherwise specified, exact match is applied.
URI
GET /v2/{project_id}/elb/pools
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Specifies the project ID. |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
marker |
No |
String |
Specifies the ID of the backend server group from which pagination query starts, that is, the ID of the last backend server group on the previous page. If this parameter is not specified, the first page will be queried. This parameter must be used together with limit. |
limit |
No |
Integer |
Specifies the number of backend server groups on each page. If this parameter is not set, all backend server groups are queried by default. |
page_reverse |
No |
Boolean |
Specifies the page direction. The value can be true or false, and the default value is false. The last page in the list requested with page_reverse set to false will not contain the "next" link, and the last page in the list requested with page_reverse set to true will not contain the "previous" link. This parameter must be used together with limit. |
id |
No |
String |
Specifies the ID of the backend server group. |
name |
No |
String |
Specifies the name of the backend server group. The value contains a maximum of 255 characters. |
description |
No |
String |
Provides supplementary information about the backend server group. The value contains a maximum of 255 characters. |
healthmonitor_id |
No |
String |
Specifies the ID of the health check configured for the backend server group. |
loadbalancer_id |
No |
String |
Specifies the ID of the load balancer associated with the backend server group. |
protocol |
No |
String |
Specifies the protocol that the backend server group uses to receive requests. TCP, UDP, and HTTP are supported. |
lb_algorithm |
No |
String |
Specifies the load balancing algorithm of the backend server group.
The value range varies depending on the protocol of the backend server group:
When the value is SOURCE_IP, the weights of backend servers in the server group are invalid. For details about parameter weight, see Response. |
member_address |
No |
String |
Lists the IDs of backend servers in the backend server group. |
member_device_id |
No |
String |
Specifies the ID of the ECS corresponding to the backend server in the backend server group. |
enterprise_project_id |
No |
String |
Specifies the enterprise project ID. Enterprise projects are used for fine-grained authentication.
|
Response
Parameter |
Type |
Description |
---|---|---|
pools |
Array |
Specifies the backend server group. For details, see Table 4. |
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:
|
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:
|
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. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the ID of the associated backend server. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the ID of the associated backend server group. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the ID of the associated load balancer. |
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:
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:
|
Example Request
- Example request 1: Querying all backend server groups
GET https://{Endpoint}/v2/1867112d054b427e808cc6096d8193a1/elb/pools
- Example request 2: Querying backend server groups whose load balancing algorithm is SOURCE_IP
GET https://{Endpoint}/v2/1867112d054b427e808cc6096d8193a1/elb/pools?lb_algorithm=SOURCE_IP
Example Response
- Example response 1
{ "pools": [ { "lb_algorithm": "SOURCE_IP", "protocol": "TCP", "description": "", "admin_state_up": true, "loadbalancers": [ { "id": "07d28d4a-4899-40a3-a939-5d09d69019e1" } ], "tenant_id": "1867112d054b427e808cc6096d8193a1", "session_persistence": null, "healthmonitor_id": null, "listeners": [ { "id": "1b421c2d-7e78-4a78-9ee4-c8ccba41f15b" } ], "members": [ { "id": "88f9c079-29cb-435a-b98f-0c5c0b90c2bd" }, { "id": "2f4c9644-d5d2-4cf8-a3c0-944239a4f58c" } ], "id": "3a9f50bb-f041-4eac-a117-82472d8a0007", "name": "my-pool" } ] }
- Example response 2
{ "pools": [ { "lb_algorithm": "SOURCE_IP", "protocol": "TCP", "description": "", "admin_state_up": true, "loadbalancers": [ { "id": "07d28d4a-4899-40a3-a939-5d09d69019e1" } ], "tenant_id": "1867112d054b427e808cc6096d8193a1", "session_persistence": null, "healthmonitor_id": null, "listeners": [ { "id": "1b421c2d-7e78-4a78-9ee4-c8ccba41f15b" } ], "members": [ { "id": "88f9c079-29cb-435a-b98f-0c5c0b90c2bd" }, { "id": "2f4c9644-d5d2-4cf8-a3c0-944239a4f58c" } ], "id": "3a9f50bb-f041-4eac-a117-82472d8a0007", "name": "my-pool" } ] }
Status Code
For details, see HTTP Status Codes of Load Balancers.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot