All Products
Search
Document Center

Server Load Balancer:ListServerGroupServers

Last Updated:Nov 11, 2024

Queries the server groups of a Gateway Load Balancer (GWLB) instance.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
gwlb:ListServerGroupServersget
  • ServerGroup
    acs:gwlb:{#regionId}:{#accountId}:servergroup/*
  • ServerGroup
    acs:gwlb:{#regionId}:{#accountId}:servergroup/{#ServerGroupId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ServerGroupIdstringNo

The server group ID.

sgp-atstuj3rtoptyui****
ServerIdsarrayNo

The server IDs.

You can specify at most 200 servers in each call.

ServerIdstringNo

The server group ID.

  • If the server group is of the Instance type, set this parameter to the IDs of servers of the Ecs, Eni, or Eci type.
  • If the server group is of the Ip type, set ServerId to IP addresses.
i-bp67acfmxazb4p****
ServerIpsarrayNo

The server IP addresses.

You can specify at most 200 servers in each call.

ServerIpstringNo

The server IP address.

192.168.xxx.xxx
NextTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results. Valid values:

  • If NextToken is empty, no next page exists.
  • If a value of NextToken is returned, the value indicates the token that is used for the next query.
FFmyTO70tTpLG6I3FmYAXGKPd****
MaxResultsintegerNo

The number of entries per page.

Valid values: 1 to 1000.

Default value: 20.

20
SkipintegerNo

The number of entries to be skipped in the call.

1

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

MaxResultsinteger

The number of entries per page.

Valid values: 1 to 1000.

20
NextTokenstring

A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:

  • If NextToken is empty, no next page exists.
  • You must specify the token that is obtained from the previous query as the value of NextToken.
FFmyTO70tTpLG6I3FmYAXGKPd****
RequestIdstring

The request ID.

54B48E3D-DF70-471B-AA93-08E683A1B45
Serversarray<object>

The backend servers.

Serverobject

The backend server.

Portinteger

The backend server port. Valid values:

  • 6081
6081
ServerGroupIdstring

The server group ID.

sgp-atstuj3rtoptyui****
ServerIdstring

The backend server ID.

i-bp67acfmxazb4p****
ServerIpstring

The IP address of the backend server.

192.168.xxx.xxx
ServerTypestring

The type of the backend server. Valid values:

  • Ecs: Elastic Compute Service (ECS) instance
  • Eni: elastic network interface (ENI)
  • Eci: elastic container instance
  • Ip: IP address
Ecs
Statusstring

Indicates the status of the backend server. Valid values:

  • Adding: The backend server is being added.
  • Available: The backend server is available.
  • Draining: The backend server is in connection draining.
  • Removing: The backend server is being removed.
  • Replacing: The backend server is being replaced.
Available
TotalCountinteger

The total number of entries returned.

1

Examples

Sample success responses

JSONformat

{
  "MaxResults": 20,
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45",
  "Servers": [
    {
      "Port": 6081,
      "ServerGroupId": "sgp-atstuj3rtoptyui****",
      "ServerId": "i-bp67acfmxazb4p****",
      "ServerIp": "192.168.xxx.xxx",
      "ServerType": "Ecs",
      "Status": "Available"
    }
  ],
  "TotalCount": 1
}

Error codes

For a list of error codes, visit the Service error codes.