Lists the servers in a server group.
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
alb:ListServerGroupServers | get | *ServerGroup
| None | None |
Request parameters
Parameter | Type | Required | Description | Example |
NextToken | string | No | The token that determines the start of the next query. Valid values:
| FFmyTO70tTpLG6I3FmYAXG**** |
MaxResults | integer | No | The number of entries to return on each page. Valid values: 1 to 100. Default value: 20. | 50 |
ServerGroupId | string | No | The ID of the server group. | sgp-cb25e2i2vr****** |
| ServerIds | array | No | The server IDs. | |
string | No | The ID of the server. You can specify up to 40 server IDs in each call.
| i-bp1e0u8f10by57wl**** | |
| Tag | array<object> | No | The tags. You can specify up to 10 tags in a request. | |
object | No | The tags. You can specify up to 10 tags in a request. | ||
Key | string | No | The tag key. You can specify up to 10 tag keys. The tag key can be up to 64 characters in length. It cannot start with | Test |
Value | string | No | The tag value. You can specify up to 10 tag values. The tag value can be up to 128 characters in length. It cannot start with | Test |
Response elements
Element | Type | Description | Example |
object | The returned data. | ||
MaxResults | integer | The maximum number of entries returned on each page. | 50 |
NextToken | string | A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:
| caeba0bbb2be03f8**** |
RequestId | string | The request ID. | CEF72CEB-54B6-4AE8-B225-F876FF***** |
| Servers | array<object> | The list of servers. | |
object | The details of the backend server. | ||
Description | string | The description of the backend server. | test |
Port | integer | The port used by the backend server. Valid values: 1 to 65535. | 80 |
ServerId | string | The ID of the backend server. Note If ServerType is Fc, ServerId is the ARN of a Function Compute function. | i-bp1f9kdprbgy9uiu**** |
ServerIp | string | The IP address of the server. | 192.168.XX.XX |
ServerType | string | The type of the backend server. | Ecs |
Status | string | The status of the backend server. Valid values:
| Available |
Weight | integer | The weight of the backend server. A server with a higher weight receives more requests. | 100 |
ServerGroupId | string | The ID of the server group. | sgp-qy042e1jabmprh**** |
RemoteIpEnabled | boolean | Indicates whether the remote IP address feature is enabled. Valid values:
| true |
TotalCount | integer | The total number of entries that match the query conditions. | 3 |
Examples
Success response
JSON format
{
"MaxResults": 50,
"NextToken": "caeba0bbb2be03f8****",
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF*****",
"Servers": [
{
"Description": "test",
"Port": 80,
"ServerId": "i-bp1f9kdprbgy9uiu****",
"ServerIp": "192.168.XX.XX",
"ServerType": "Ecs",
"Status": "Available",
"Weight": 100,
"ServerGroupId": "sgp-qy042e1jabmprh****",
"RemoteIpEnabled": true
}
],
"TotalCount": 3
}Error codes
HTTP status code | Error code | Error message | Description |
403 | Forbidden.ServerGroup | Authentication has failed for ServerGroup. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.