Queries servers in a server group.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
alb:ListServerGroupServers | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
NextToken | string | No | The pagination token that is used in the next request to retrieve a new page of results. Valid values:
| FFmyTO70tTpLG6I3FmYAXG**** |
MaxResults | integer | No | The maximum number of entries to return. Valid values: 1 to 100. If you do not specify a value, the default value 20 is used. | 50 |
ServerGroupId | string | No | The server group ID. | rg-atstuj3rtop**** |
ServerIds | array | No | The IDs of the servers. | |
string | No | The ID of the backend server. You can specify at most 40 server IDs in each call.
| i-bp1e0u8f10by57wl**** | |
Tag | array<object> | No | The tags that are added to the server group. You can specify up to 10 tags in each call. | |
object | No | The tags that are added to the server group. You can specify up to 10 tags in each call. | ||
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, and cannot contain | 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, and cannot contain | Test |
Response parameters
Examples
Sample success responses
JSON
format
{
"MaxResults": 50,
"NextToken": "caeba0bbb2be03f8****",
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984",
"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 |
---|---|---|
403 | Forbidden.ServerGroup | Authentication has failed for ServerGroup. |
403 | Forbidden.ServerGroup | Authentication is failed for ServerGroup. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-06-05 | The Error code has changed | View Change Details |
2024-01-17 | The Error code has changed | View Change Details |