All Products
Search
Document Center

Server Load Balancer:ListServerGroupServers

Last Updated:Aug 28, 2026

Queries servers in an NLB server group.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

nlb:ListServerGroupServers

get

*ServerGroup

acs:nlb:{#regionId}:{#AccountId}:serverGroup/{#ServerGroupId}

None None

Request parameters

Parameter

Type

Required

Description

Example

ServerGroupId

string

No

The ID of the server group.

sgp-atstuj3rtoptyui****

ServerIds

array

No

The backend server IDs. You can specify up to 40 in each call.

string

No

The backend server ID. You can specify up to 40 in each call.

i-bp67acfmxazb4p****

ServerIps

array

No

The backend server IP addresses. You can specify up to 40 in each call.

string

No

The backend server IP address. You can specify up to 40 in each call.

192.168.6.3

NextToken

string

No

The pagination token. Valid values:

  • For the first query, leave this parameter empty.

  • For subsequent queries, use the NextToken from the previous response.

FFmyTO70tTpLG6I3FmYAXGKPd****

MaxResults

integer

No

The number of entries per call. Valid values: 1 to 100. Default value: 20.

20

RegionId

string

No

The region ID of the NLB instance.

Call DescribeRegions to query available regions.

cn-hangzhou

Response elements

Element

Type

Description

Example

object

The response.

RequestId

string

The request ID.

54B48E3D-DF70-471B-AA93-08E683A1B45

Servers

array<object>

The backend servers.

object

ServerId

string

The ID of the server group.

i-bp67acfmxazb4p****

ServerType

string

The type of backend server. Valid values:

  • Ecs: Elastic Compute Service (ECS) instance

  • Eni: elastic network interface (ENI)

  • Eci: elastic container instance

  • Ip: IP address

Ecs

ServerIp

string

The IP address of the backend server.

192.168.2.1

Port

integer

The backend server port. Valid values: 1 to 65535.

80

Weight

integer

The weight of the backend server.

100

ServerGroupId

string

The ID of the server group.

sgp-atstuj3rtoptyui****

Description

string

The description of the backend server.

ECS

ZoneId

string

The zone ID of the server.

cn-hangzhou-a

Status

string

The status of the backend server. Valid values:

  • Adding

  • Available

  • Configuring

  • Removing

Available

TotalCount

integer

The number of entries returned.

10

NextToken

string

The pagination token for the next query. Valid values:

  • If no subsequent query is needed, ignore this parameter.

  • To retrieve more results, pass this value as NextToken in the next request.

FFmyTO70tTpLG6I3FmYAXGKPd****

MaxResults

integer

The number of entries returned per page.

20

Examples

Success response

JSON format

{
  "RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45",
  "Servers": [
    {
      "ServerId": "i-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 code

Error code

Error message

Description

400 SystemBusy System is busy, please try again later.
403 Forbidden.NoPermission Authentication is failed for NoPermission. Authentication is failed for NoPermission.
404 ResourceNotFound.serverGroup The specified resource of serverGroup is not found. The specified resource of serverGroup is not found. Please check the input parameters.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.