Queries the backend servers in a specified server group.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | ListServerGroupServers |
The operation that you want to perform. Set the value to ListServerGroupServers. |
| ServerGroupId | String | No | sgp-atstuj3rtoptyui**** |
The ID of the server group. |
| ServerIds.N | String | No | ecs-bp67acfmxazb4p**** |
The IDs of the servers. You can specify at most 40 server IDs in each call. |
| ServerIps.N | String | No | 192.168.6.3 |
The IP addresses of the servers. You can specify at most 40 server IP addresses in each call. |
| NextToken | String | No | FFmyTO70tTpLG6I3FmYAXGKPd**** |
The token that is used for the next query. Valid values:
|
| MaxResults | Integer | No | 20 |
The number of entries to return on each page. Valid values: 1 to 100. Default value: 20. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 54B48E3D-DF70-471B-AA93-08E683A1B45 |
The ID of the request. |
| Servers | Array of Server |
A list of backend servers. |
|
| ServerId | String | ecs-bp67acfmxazb4p**** |
The ID of the server. |
| ServerType | String | Ecs |
The type of the backend server. Valid values:
|
| ServerIp | String | 192.168.2.1 |
The IP address of the backend server. |
| Port | Integer | 80 |
The port used by the backend server. Valid values: 1 to 65535. |
| Weight | Integer | 100 |
The weight of the backend server. |
| ServerGroupId | String | sgp-atstuj3rtoptyui**** |
The ID of the server group. |
| Description | String | ECS |
The description of the backend server. |
| ZoneId | String | cn-hangzhou-a |
The zone ID of the server. |
| Status | String | Available |
Indicates the status of the backend server. Valid values:
|
| TotalCount | Integer | 10 |
The number of entries returned. |
| NextToken | String | FFmyTO70tTpLG6I3FmYAXGKPd**** |
The token that is used for the next query. Valid values:
|
| MaxResults | Integer | 20 |
The number of entries returned per page. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ListServerGroupServers
&ServerGroupId=sgp-atstuj3rtoptyui****
&ServerIds=["ecs-bp67acfmxazb4p****"]
&ServerIps=["192.168.6.3"]
&NextToken=FFmyTO70tTpLG6I3FmYAXGKPd****
&MaxResults=20
&<Common request parameters>
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListServerGroupServersResponse>
<RequestId>54B48E3D-DF70-471B-AA93-08E683A1B45</RequestId>
<Servers>
<ServerId>ecs-bp67acfmxazb4p****</ServerId>
<ServerType>Ecs</ServerType>
<ServerIp>192.168.2.1</ServerIp>
<Port>80</Port>
<Weight>100</Weight>
<ServerGroupId>sgp-atstuj3rtoptyui****</ServerGroupId>
<Description>ECS</Description>
<ZoneId>cn-hangzhou-a</ZoneId>
<Status>Available</Status>
</Servers>
<TotalCount>10</TotalCount>
<NextToken>FFmyTO70tTpLG6I3FmYAXGKPd****</NextToken>
<MaxResults>20</MaxResults>
</ListServerGroupServersResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "54B48E3D-DF70-471B-AA93-08E683A1B45",
"Servers" : [ {
"ServerId" : "ecs-bp67acfmxazb4p****",
"ServerType" : "Ecs",
"ServerIp" : "192.168.2.1",
"Port" : 80,
"Weight" : 100,
"ServerGroupId" : "sgp-atstuj3rtoptyui****",
"Description" : "ECS",
"ZoneId" : "cn-hangzhou-a",
"Status" : "Available"
} ],
"TotalCount" : 10,
"NextToken" : "FFmyTO70tTpLG6I3FmYAXGKPd****",
"MaxResults" : 20
}
Error codes
For a list of error codes, visit the API Error Center.