Queries the server groups of a Gateway Load Balancer (GWLB) instance.
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
gwlb:ListServerGroups | get | ServerGroup
ServerGroup
VPC
| None | 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. | |
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. | |
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. | |
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 elements
Element | Type | Description | Example |
object | The response parameters. | ||
MaxResults | integer | The number of entries per page. Valid values: 1 to 1000. | 20 |
NextToken | string | A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:
| FFmyTO70tTpLG6I3FmYAXGKPd**** |
RequestId | string | The request ID. | 54B48E3D-DF70-471B-AA93-08E683A1B45 |
| ServerGroups | array<object> | The configurations of the server group. | |
array<object> | The server group. | ||
| ConnectionDrainConfig | object | The configurations of connection draining. | |
ConnectionDrainEnabled | boolean | Indicates whether connection draining is enabled. Valid values:
| false |
ConnectionDrainTimeout | integer | The timeout period of connection draining. Unit: seconds Valid values: 1 to 3600. | 300 |
CreateTime | string | The time when the resource was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. | 2024-08-05T18:24:07Z |
| HealthCheckConfig | object | The configuration of health checks. | |
HealthCheckConnectPort | integer | The backend server port that is used for health checks. Valid values: 1 to 65535. | 80 |
HealthCheckConnectTimeout | integer | The maximum timeout period of a health check. Unit: seconds Valid values: 1 to 300. | 5 |
HealthCheckDomain | string | The domain name that is used for health checks. Valid values:
Note This parameter takes effect only if you set HealthCheckProtocol to HTTP. | $SERVER_IP |
HealthCheckEnabled | boolean | Indicates whether the health check feature is enabled. Valid values:
| true |
| HealthCheckHttpCode | array | The HTTP status codes that the system returns for health checks. | |
string | The HTTP status code to return for health checks. Separate multiple HTTP status codes with commas (,). Valid values:
Default value: http_2xx. Note This parameter takes effect only if you set HealthCheckProtocol to HTTP. | http_2xx | |
HealthCheckInterval | integer | The interval at which health checks are performed. Unit: seconds Valid values: 1 to 50. | 10 |
HealthCheckPath | string | The URL that is used for health checks. The URL must be 1 to 80 characters in length, and can contain letters, digits, and the following special characters: Note This parameter takes effect only if you set HealthCheckProtocol to HTTP. | /test/index.html |
HealthCheckProtocol | string | The protocol that is used for health checks. Valid values:
| TCP |
HealthyThreshold | integer | The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status changes from fail to success. Valid values: 2 to 10. | 2 |
UnhealthyThreshold | integer | The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status changes from success to fail. Valid values: 2 to 10. | 2 |
HealthCheckReq | string | ||
HealthCheckExp | string | ||
Protocol | string | The backend protocol. Valid values:
| GENEVE |
| RelatedLoadBalancerIds | array | The IDs of the GWLB instances that are associated with the server group. | |
string | The ID of the GWLB instance that is associated with the server group. | gwlb-cp6prgqy40hols**** | |
ResourceGroupId | string | The resource group ID. | rg-atstuj3rtop**** |
Scheduler | string | The scheduling algorithm. Valid values:
| 5TCH |
ServerCount | integer | The number of server groups. | 2 |
ServerGroupId | string | The server group ID. | sgp-atstuj3rtoptyui**** |
ServerGroupName | string | The server group name. | testServerGroupName |
ServerGroupStatus | string | The status of the server group. Valid values:
| Available |
ServerGroupType | string | The server group type. Valid values:
| Instance |
ServerFailoverMode | string | Specifies how GWLB processes requests over existing connections when a backend server is not running as expected. Valid values:
| NoRebalance |
| Tags | array<object> | The tags. | |
object | The tag. | ||
Key | string | 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 | The tag value. The tag value can be up to 256 characters in length and cannot contain | testTagValue |
VpcId | string | The VPC ID. | vpc-bp15zckdt37pq72zv**** |
TotalCount | integer | The total number of entries returned. | 1 |
Examples
Success response
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,
"HealthCheckReq": "",
"HealthCheckExp": ""
},
"Protocol": "GENEVE",
"RelatedLoadBalancerIds": [
"gwlb-cp6prgqy40hols****"
],
"ResourceGroupId": "rg-atstuj3rtop****",
"Scheduler": "5TCH",
"ServerCount": 2,
"ServerGroupId": "sgp-atstuj3rtoptyui****",
"ServerGroupName": "testServerGroupName",
"ServerGroupStatus": "Available",
"ServerGroupType": "Instance",
"ServerFailoverMode": "NoRebalance",
"Tags": [
{
"Key": "testTagKey",
"Value": "testTagValue"
}
],
"VpcId": "vpc-bp15zckdt37pq72zv****"
}
],
"TotalCount": 1
}Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.