查询网络型负载均衡服务器组中的服务器列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
nlb:ListServerGroupServers |
get |
*ServerGroup
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ServerGroupId |
string |
否 |
服务器组 ID。 |
sgp-atstuj3rtoptyui**** |
| ServerIds |
array |
否 |
服务器 ID 列表。单次调用最多支持展示 40 个服务器。 |
|
|
string |
否 |
服务器 ID 列表。单次调用最多支持展示 40 个服务器。 |
i-bp67acfmxazb4p**** |
|
| ServerIps |
array |
否 |
服务器 IP 列表。单次调用最多支持展示 40 个服务器。 |
|
|
string |
否 |
服务器 IP 列表。单次调用最多支持展示 40 个服务器。 |
192.168.6.3 |
|
| NextToken |
string |
否 |
是否拥有下一次查询的令牌(Token)。取值:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| MaxResults |
integer |
否 |
分批次查询时每次显示的条目数。取值范围:1~100,默认值为 20。 |
20 |
| RegionId |
string |
否 |
网络型负载均衡实例所在的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-hangzhou |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
查询服务器。 |
||
| RequestId |
string |
请求 ID。 |
54B48E3D-DF70-471B-AA93-08E683A1B45 |
| Servers |
array<object> |
服务器列表。 |
|
|
object |
服务器列表。 |
||
| ServerId |
string |
后端服务器 ID。 |
i-bp67acfmxazb4p**** |
| ServerType |
string |
后端服务器类型,取值:
|
Ecs |
| ServerIp |
string |
后端服务器 IP 地址。 |
192.168.2.1 |
| Port |
integer |
后端服务器使用的端口。取值范围:1~65535。 |
80 |
| Weight |
integer |
后端服务器的权重。 |
100 |
| ServerGroupId |
string |
服务器组 ID。 |
sgp-atstuj3rtoptyui**** |
| Description |
string |
后端服务器描述。 |
ECS |
| ZoneId |
string |
服务器对应的可用区 ID。 |
cn-hangzhou-a |
| Status |
string |
后端服务器的添加状态。取值:
|
Available |
| TotalCount |
integer |
列表条目数。 |
10 |
| NextToken |
string |
是否拥有下一次查询的令牌(Token)。取值:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| MaxResults |
integer |
分批次查询时每次显示的条目数。 |
20 |
示例
正常返回示例
JSON格式
{
"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
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | SystemBusy | System is busy, please try again later. | 系统繁忙,请稍后重试 |
| 403 | Forbidden.NoPermission | Authentication is failed for NoPermission. | 因为账号没有权限,所以鉴权失败。 |
| 404 | ResourceNotFound.serverGroup | The specified resource of serverGroup is not found. | 找不到指定的服务器组资源,请检查输入参数。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。