All Products
Search
Document Center

Server Load Balancer:ListServerGroupServers

Last Updated:Oct 10, 2025

Lists the servers in a 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

alb:ListServerGroupServers

get

*ServerGroup

acs:alb:{#regionId}:{#accountId}:servergroup/{#servergroupId}

None None

Request parameters

Parameter

Type

Required

Description

Example

NextToken

string

No

The token that determines the start of the next query. Valid values:

  • Leave this parameter empty for the first query.

  • For subsequent queries, set this parameter to the NextToken value from the previous API call.

FFmyTO70tTpLG6I3FmYAXG****

MaxResults

integer

No

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

50

ServerGroupId

string

No

The ID of the server group.

sgp-cb25e2i2vr******

ServerIds

array

No

The server IDs.

string

No

The ID of the server. You can specify up to 40 server IDs in each call.

  • If the server group is of the Instance type, this parameter specifies the ID of an Elastic Compute Service (ECS) instance, an elastic network interface (ENI), or an elastic container instance (ECI).

  • If the server group is of the Ip type, this parameter specifies an IP address.

  • If the server group is of the Fc type, this parameter specifies the Alibaba Cloud Resource Name (ARN) of a Function Compute function.

i-bp1e0u8f10by57wl****

Tag

array<object>

No

The tags. You can specify up to 10 tags in a request.

object

No

The tags. You can specify up to 10 tags in a request.

Key

string

No

The tag key. You can specify up to 10 tag keys.

The tag key can be up to 64 characters in length. It cannot start with aliyun or acs: and cannot contain http:// or https://.

Test

Value

string

No

The tag value. You can specify up to 10 tag values.

The tag value can be up to 128 characters in length. It cannot start with aliyun or acs: and cannot contain http:// or https://.

Test

Response elements

Element

Type

Description

Example

object

The returned data.

MaxResults

integer

The maximum number of entries returned on each page.

50

NextToken

string

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.

  • If a value is returned for NextToken, the value is the token that determines the start of the next query.

caeba0bbb2be03f8****

RequestId

string

The request ID.

CEF72CEB-54B6-4AE8-B225-F876FF*****

Servers

array<object>

The list of servers.

object

The details of the backend server.

Description

string

The description of the backend server.

test

Port

integer

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

80

ServerId

string

The ID of the backend server.

Note

If ServerType is Fc, ServerId is the ARN of a Function Compute function.

i-bp1f9kdprbgy9uiu****

ServerIp

string

The IP address of the server.

192.168.XX.XX

ServerType

string

The type of the backend server.

Ecs

Status

string

The status of the backend server. Valid values:

  • Adding: The server is being added.

  • Available: The server is available.

  • Configuring: The server is being configured.

  • Removing: The server is being removed.

Available

Weight

integer

The weight of the backend server. A server with a higher weight receives more requests.

100

ServerGroupId

string

The ID of the server group.

sgp-qy042e1jabmprh****

RemoteIpEnabled

boolean

Indicates whether the remote IP address feature is enabled. Valid values:

  • true

  • false

true

TotalCount

integer

The total number of entries that match the query conditions.

3

Examples

Success response

JSON format

{
  "MaxResults": 50,
  "NextToken": "caeba0bbb2be03f8****",
  "RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF*****",
  "Servers": [
    {
      "Description": "test",
      "Port": 80,
      "ServerId": "i-bp1f9kdprbgy9uiu****",
      "ServerIp": "192.168.XX.XX",
      "ServerType": "Ecs",
      "Status": "Available",
      "Weight": 100,
      "ServerGroupId": "sgp-qy042e1jabmprh****",
      "RemoteIpEnabled": true
    }
  ],
  "TotalCount": 3
}

Error codes

HTTP status code

Error code

Error message

Description

403 Forbidden.ServerGroup Authentication has failed for ServerGroup.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.