Queries the server groups of a Gateway Load Balancer (GWLB) instance.
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 |
---|---|---|---|---|
gwlb:ListServerGroups | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ServerGroupIds | array | No | The server group IDs. You can specify at most 20 server group IDs in each call. | |
ServerGroupId | string | No | The server group ID. | sgp-atstuj3rtoptyui**** |
ServerGroupNames | array | No | The server group names. You can specify at most 20 server group names in each call. | |
ServerGroupName | string | No | The server group name. | testServerGroupName |
ServerGroupType | string | No | The server group type. Valid values:
| Instance |
ResourceGroupId | string | No | The ID of the resource group to which the instance belongs. | rg-atstuj3rtop**** |
Tag | array<object> | No | The tag keys. You can specify at most 20 tags in each call. | |
TagModel | object | No | The tag. | |
Key | string | No | The tag key. The tag key cannot be an empty string. The tag key can be up to 128 characters in length, and cannot start with | testTagKey |
Value | string | No | The tag value. The tag value can be up to 256 characters in length and cannot contain | testTagValue |
VpcId | string | No | The VPC ID. | vpc-bp15zckdt37pq72zv**** |
NextToken | string | No | The pagination token that is used in the next request to retrieve a new page of results. Valid values:
| FFmyTO70tTpLG6I3FmYAXGKPd**** |
MaxResults | integer | No | The number of entries per page. Valid values: 1 to 1000. Default value: 20. | 20 |
Skip | integer | No | The number of entries to be skipped in the call. | 1 |
Response parameters
Examples
Sample success responses
JSON
format
{
"MaxResults": 20,
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45",
"ServerGroups": [
{
"ConnectionDrainConfig": {
"ConnectionDrainEnabled": false,
"ConnectionDrainTimeout": 300
},
"CreateTime": "2024-08-05T18:24:07Z",
"HealthCheckConfig": {
"HealthCheckConnectPort": 80,
"HealthCheckConnectTimeout": 5,
"HealthCheckDomain": "$SERVER_IP",
"HealthCheckEnabled": true,
"HealthCheckHttpCode": [
"http_2xx"
],
"HealthCheckInterval": 10,
"HealthCheckPath": "/test/index.html",
"HealthCheckProtocol": "TCP",
"HealthyThreshold": 2,
"UnhealthyThreshold": 2
},
"Protocol": "GENEVE",
"RelatedLoadBalancerIds": [
"gwlb-cp6prgqy40hols****"
],
"ResourceGroupId": "rg-atstuj3rtop****",
"Scheduler": "5TCH",
"ServerCount": 2,
"ServerGroupId": "sgp-atstuj3rtoptyui****",
"ServerGroupName": "testServerGroupName",
"ServerGroupStatus": "Available",
"ServerGroupType": "Instance",
"Tags": [
{
"Key": "testTagKey",
"Value": "testTagValue"
}
],
"VpcId": "vpc-bp15zckdt37pq72zv****"
}
],
"TotalCount": 1
}
Error codes
For a list of error codes, visit the Service error codes.