调用ListServerGroupServers接口查询应用型负载均衡服务器组中的服务器列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListServerGroupServers |
系统规定的参数。取值:ListServerGroupServers。 |
NextToken | String | 否 | FFmyTO70tTpLG6I3FmYAXG**** |
是否拥有下一次查询的令牌(Token)。取值:
|
MaxResults | Integer | 否 | 50 |
本次读取的最大数据记录数量。取值范围:1~100,入参为空时,默认值为20。 |
ServerGroupId | String | 否 | rg-atstuj3rtop**** |
服务器组ID。 |
ServerIds.N | String | 否 | i-bp1e0u8f10by57wl**** |
服务器ID。单次调用最多支持展示40个服务器。
|
Tag.N.Key | String | 否 | Test |
标签键。最多支持10个标签键。 最多支持64个字符,不能以 |
Tag.N.Value | String | 否 | Test |
标签值。最多支持10个标签值。 最多支持128个字符,不能以 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
MaxResults | Integer | 50 |
本次请求所返回的最大记录条数。 |
NextToken | String | caeba0bbb2be03f8**** |
是否拥有下一次查询的令牌(Token)。取值:
|
RequestId | String | CEF72CEB-54B6-4AE8-B225-F876FF7BA984 |
请求ID。 |
Servers | Array of BackendServer |
服务器列表。 |
|
Description | String | test |
后端服务器描述。 |
Port | Integer | 80 |
后端服务器使用的端口。取值范围:1~65535。 |
ServerId | String | i-bp1f9kdprbgy9uiu**** |
后端服务器ID。 说明 当ServerType为Fc时,ServerId为函数计算的ARN标识。
|
ServerIp | String | 192.168.XX.XX |
ENI多IP模式时指定的IP地址。 |
ServerType | String | Ecs |
后端服务器类型。 |
Status | String | Available |
后端服务器的添加状态。取值:
|
Weight | Integer | 100 |
后端服务器的权重。权重越高的服务器将被分配到更多的访问请求。 |
ServerGroupId | String | sgp-qy042e1jabmprh**** |
服务器组ID。 |
RemoteIpEnabled | Boolean | true |
是否开启远端IP。取值:
|
TotalCount | Integer | 3 |
本次请求条件下的数据总量。 |
示例
请求示例
http(s)://[Endpoint]/?Action=ListServerGroupServers
&NextToken=FFmyTO70tTpLG6I3FmYAXG****
&MaxResults=50
&ServerGroupId=rg-atstuj3rtop****
&ServerIds=["i-bp1e0u8f10by57wl****"]
&Tag=[{"Key":"Test","Value":"Test"}]
&公共请求参数
正常返回示例
XML
格式
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>
<RemoteIpEnabled>true</RemoteIpEnabled>
</Servers>
<TotalCount>3</TotalCount>
</ListServerGroupServersResponse>
JSON
格式
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****",
"RemoteIpEnabled" : true
} ],
"TotalCount" : 3
}
错误码
访问错误中心查看更多错误码。