Queries backend servers in a specified server group.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListServerGroupServers

The operation that you want to perform. Set the value to ListServerGroupServers.

NextToken String No FFmyTO70tTpLG6I3FmYAXG****

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 value to the value of NextToken that is returned from the last call.
MaxResults Integer No 50

The maximum number of entries to return. Valid values: 1 to 100. If you do not specify a value, the default value 20 is used.

ServerGroupId String No rg-atstuj3rtop****

The ID of the server group.

ServerIds Array of String No i-bp1e0u8f10by57wl****

The IDs of the backend servers.

Tag Array No

The tags that are added to the server group. You can specify up to 10 tags in each request.

Key String No Test

The key of the tag.

Value String No Test

The value of the tag.

Response parameters

Parameter Type Example Description
MaxResults Integer 50

The maximum number of entries returned.

NextToken String caeba0bbb2be03f8****

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

  • If NextToken is empty, it indicates that no next query is to be sent.
  • If a value of NextToken is returned, the value is the token that is used for the next query.
RequestId String CEF72CEB-54B6-4AE8-B225-F876FF7BA984

The ID of the request.

Servers Array of BackendServer

The list of backend servers.

Description String test

The description of the backend server.

Port Integer 80

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

ServerId String i-bp1f9kdprbgy9uiu****

The ID of the backend server.

Note If ServerType is set to Fc, ServerId is the Alibaba Cloud Resource Name (ARN) of a function.
ServerIp String 192.168.XX.XX

The IP address in inclusive ENI mode.

ServerType String Ecs

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
  • Fc: a function
Status String Available

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.
Weight Integer 100

The weight of the backend server.

ServerGroupId String sgp-qy042e1jabmprh****

The ID of the server group.

TotalCount Integer 3

The total number of entries returned.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListServerGroupServers
&NextToken=FFmyTO70tTpLG6I3FmYAXG****
&MaxResults=50
&ServerGroupId=rg-atstuj3rtop****
&ServerIds=["i-bp1e0u8f10by57wl****"]
&Tag=[{"Key":"Test","Value":"Test"}]
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListServerGroupServersResponse>
    <MaxResults>50</MaxResults>
    <NextToken>caeba0bbb2be03f8****</NextToken>
    <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
    <Servers>
        <Description>test</Description>
        <Port>80</Port>
        <ServerId>i-bp1f9kdprbgy9uiu****</ServerId>
        <ServerIp>192.168.XX.XX</ServerIp>
        <ServerType>Ecs</ServerType>
        <Status>Available</Status>
        <Weight>100</Weight>
        <ServerGroupId>sgp-qy042e1jabmprh****</ServerGroupId>
    </Servers>
    <TotalCount>3</TotalCount>
</ListServerGroupServersResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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

Error codes

For a list of error codes, visit the API Error Center.