All Products
Search
Document Center

Server Load Balancer:ListServerGroupServers

Last Updated:Mar 13, 2024

Queries servers in a server group of a Network Load Balancer (NLB) instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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
nlb:ListServerGroupServersList
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ServerGroupIdstringNo

The ID of the server group.

sgp-atstuj3rtoptyui****
ServerIdsarrayNo

The IDs of the servers.

stringNo

The IDs of the servers. You can specify at most 40 server IDs in each call.

ecs-bp67acfmxazb4p****
ServerIpsarrayNo

The IP addresses of the servers.

stringNo

The IP addresses of the servers. You can specify at most 40 server IP addresses in each call.

192.168.6.3
NextTokenstringNo

The token that is used for the next query. Valid values:

  • If this is your first query or no next query is to be sent, ignore this parameter.
  • If a next query is to be sent, set the parameter to the value of NextToken that is returned from the last call.
FFmyTO70tTpLG6I3FmYAXGKPd****
MaxResultsintegerNo

The number of entries to return on each page. Valid values: 1 to 100. Default value: 20.

20
RegionIdstringNo

The region ID of the NLB instance.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

RpcResponse

RequestIdstring

The ID of the request.

54B48E3D-DF70-471B-AA93-08E683A1B45
Serversobject []

A list of backend servers.

ServerIdstring

The ID of the server.

ecs-bp67acfmxazb4p****
ServerTypestring

The type of the backend server. Valid values:

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

The IP address of the backend server.

192.168.2.1
Portinteger

The port used by the backend server. Valid values: 1 to 65535.

80
Weightinteger

The weight of the backend server.

100
ServerGroupIdstring

The ID of the server group.

sgp-atstuj3rtoptyui****
Descriptionstring

The description of the backend server.

ECS
ZoneIdstring

The zone ID of the server.

cn-hangzhou-a
Statusstring

Indicates the status of the backend server. Valid values:

  • Adding: The backend server is being added.
  • Available: The backend server is added.
  • Configuring: The backend server is being configured.
  • Removing: The backend server is being removed.
Available
TotalCountinteger

The number of entries returned.

10
NextTokenstring

The token that is used for the next query. Valid values:

  • If this is your first query or no next query is to be sent, ignore this parameter.
  • If a next query is to be sent, set the parameter to the value of NextToken that is returned from the last call.
FFmyTO70tTpLG6I3FmYAXGKPd****
MaxResultsinteger

The number of entries returned per page.

20

Examples

Sample success responses

JSONformat

{
  "RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45",
  "Servers": [
    {
      "ServerId": "ecs-bp67acfmxazb4p****",
      "ServerType": "Ecs",
      "ServerIp": "192.168.2.1",
      "Port": 80,
      "Weight": 100,
      "ServerGroupId": "sgp-atstuj3rtoptyui****",
      "Description": "ECS",
      "ZoneId": "cn-hangzhou-a",
      "Status": "Available"
    }
  ],
  "TotalCount": 10,
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "MaxResults": 20
}

Error codes

HTTP status codeError codeError messageDescription
403Forbidden.NoPermissionAuthentication is failed for NoPermission.Authentication is failed for NoPermission.
404ResourceNotFound.serverGroupThe specified resource of serverGroup is not found.The specified resource of serverGroup is not found. Please check the input parameters.

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

Change history

Change timeSummary of changesOperation
2023-10-09The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 403
    delete Error Codes: 404
    Added Error Codes: 400
2023-09-13The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 403
    delete Error Codes: 404
2023-09-11The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 403
    delete Error Codes: 404
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: RegionId
2023-09-05The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 403 change
    Error Codes 404 change
2023-08-22The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Added Error Codes: 403
    Added Error Codes: 404