Queries server groups.
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:ListServerGroups | get | *ServerGroup acs:alb:{#regionId}:{#accountId}:servergroup/* |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ServerGroupIds | array | No | The server group IDs. | |
string | No | The IDs of the server groups to be queried. You can specify up to 20 IDs in each call. | sgp-atstuj3rtop**** | |
ServerGroupNames | array | No | The names of the server groups to be queried. You can specify at most 10 server group names. | |
string | No | The names of the server groups to be queried. You can specify up to 10 server group names in each call. | Group3 | |
ResourceGroupId | string | No | The ID of the resource group to which the server group belongs. | rg-atstuj3rtop**** |
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 number of entries per page. Valid values: 1 to 100. Default value: 20. | 20 |
VpcId | string | No | The ID of the virtual private cloud (VPC). | vpc-bp15zckdt37pq72zv**** |
ServerGroupType | string | No | The server group type. Valid values:
| Instance |
Tag | array<object> | No | The tags that are added to the server group. You can specify up to 10 tags in each call. | Instance |
object | No | The tags that are added to the server group. You can specify at most 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",
"ServerGroups": [
{
"HealthCheckConfig": {
"HealthCheckConnectPort": 80,
"HealthCheckEnabled": true,
"HealthCheckHost": "www.example.com",
"HealthCheckCodes": [
"http_2xx"
],
"HealthCheckHttpVersion": "HTTP1.1",
"HealthCheckInterval": 5,
"HealthCheckMethod": "HEAD",
"HealthCheckPath": "/test/index.html",
"HealthCheckProtocol": "HTTP",
"HealthCheckTimeout": 3,
"HealthyThreshold": 4,
"UnhealthyThreshold": 4
},
"Protocol": "HTTP",
"RelatedLoadBalancerIds": [
"alb-n5qw04uq8vavfe****"
],
"ResourceGroupId": "rg-atstuj3rtop****",
"Scheduler": "Wrr",
"ServerGroupId": "sgp-cige6j****",
"ServerGroupName": "Group3",
"ServerGroupStatus": "Available",
"ServerGroupType": "Instance",
"StickySessionConfig": {
"Cookie": "B490B5EBF6F3CD402E515D22BCDA****",
"CookieTimeout": 1000,
"StickySessionEnabled": false,
"StickySessionType": "Insert"
},
"VpcId": "vpc-bp15zckdt37pq72zv****",
"Tags": [
{
"Key": "Test",
"Value": "Test"
}
],
"ConfigManagedEnabled": false,
"UpstreamKeepaliveEnabled": false,
"Ipv6Enabled": false,
"ServerCount": 1,
"ServiceName": "test",
"UchConfig": {
"Type": "QueryString",
"Value": "abc"
},
"CreateTime": "2022-07-02T02:49:05Z",
"ConnectionDrainConfig": {
"ConnectionDrainEnabled": false,
"ConnectionDrainTimeout": 300
},
"SlowStartConfig": {
"SlowStartEnabled": false,
"SlowStartDuration": 30
},
"CrossZoneEnabled": true
}
],
"TotalCount": 1000
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-11-28 | The response structure of the API has changed | View Change Details |
2024-02-23 | The response structure of the API has changed | View Change Details |
2023-12-28 | The request parameters of the API has changed. The response structure of the API has changed | View Change Details |
2023-04-11 | The response structure of the API has changed | View Change Details |