调用GetListenerHealthStatus接口查询网络型负载均衡实例监听的健康检查状态。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | GetListenerHealthStatus | 系统规定参数。取值:GetListenerHealthStatus。 |
ListenerId | String | 是 | lsn-bp1bpn0kn908w4nbw**** | 网络型负载均衡实例的监听ID。 |
NextToken | String | 否 | FFmyTO70tTpLG6I3FmYAXGKPd**** | 是否拥有下一次查询的令牌(Token)。取值:
|
MaxResults | Integer | 否 | 20 | 分批次查询时每次显示的条目数。取值范围:1~100,默认值为20。 |
RegionId | String | 否 | cn-hangzhou | 网络型负载均衡实例所在的地域ID。 您可以通过调用DescribeRegions接口获取地域ID。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 54B48E3D-DF70-471B-AA93-08E683A1B45 | 请求ID。 |
ListenerHealthStatus | Array of ListenerHealthStatus | 监听的服务器组健康检查状态列表。 |
|
ListenerId | String | lsn-agkd9gmjx8nd85jjs0**** | 网络型负载均衡实例的监听ID。 |
ListenerPort | Integer | 80 | 监听的端口号。 |
ListenerProtocol | String | TCPSSL | 监听协议。取值:TCP、UDP或TCPSSL。 |
ServerGroupInfos | Array of ServerGroupInfo | 服务器组信息。 |
|
HeathCheckEnabled | Boolean | true | 是否开启健康检查。取值:
|
ServerGroupId | String | sgp-ppdpc14gdm3x4o**** | 服务器组ID。 |
NonNormalServers | Array of AbnormalServer | 非正常状态的后端服务器列表。 |
|
Status | String | Initial | 健康检查状态。取值:
|
Port | Integer | 80 | 后端服务器端口。 |
Reason | Object | 非正常状态的原因。 |
|
ReasonCode | String | CONNECT_TIMEOUT | Status为异常状态时的详细原因。取值:
|
ServerId | String | i-bp1bt75jaujl7tjl**** | 后端服务器ID。 |
ServerIp | String | 192.168.8.10 | 后端服务器IP。 |
TotalCount | Integer | 10 | 列表条目数。 |
NextToken | String | FFmyTO70tTpLG6I3FmYAXGKPd**** | 是否拥有下一次查询的令牌(Token)。取值:
|
MaxResults | Integer | 20 | 分批次查询时每次显示的条目数。 |
示例
请求示例
http(s)://[Endpoint]/?Action=GetListenerHealthStatus
&ListenerId=lsn-bp1bpn0kn908w4nbw****
&NextToken=FFmyTO70tTpLG6I3FmYAXGKPd****
&MaxResults=20
&RegionId=cn-hangzhou
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<GetListenerHealthStatusResponse>
<RequestId>54B48E3D-DF70-471B-AA93-08E683A1B45</RequestId>
<ListenerHealthStatus>
<ListenerId>lsn-agkd9gmjx8nd85jjs0****</ListenerId>
<ListenerPort>80</ListenerPort>
<ListenerProtocol>TCPSSL</ListenerProtocol>
<ServerGroupInfos>
<HeathCheckEnabled>true</HeathCheckEnabled>
<ServerGroupId>sgp-ppdpc14gdm3x4o****</ServerGroupId>
<NonNormalServers>
<Status>Initial</Status>
<Port>80</Port>
<Reason>
<ReasonCode>CONNECT_TIMEOUT</ReasonCode>
</Reason>
<ServerId>i-bp1bt75jaujl7tjl****</ServerId>
<ServerIp>192.168.8.10</ServerIp>
</NonNormalServers>
</ServerGroupInfos>
</ListenerHealthStatus>
<TotalCount>10</TotalCount>
<NextToken>FFmyTO70tTpLG6I3FmYAXGKPd****</NextToken>
<MaxResults>20</MaxResults>
</GetListenerHealthStatusResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "54B48E3D-DF70-471B-AA93-08E683A1B45",
"ListenerHealthStatus" : [ {
"ListenerId" : "lsn-agkd9gmjx8nd85jjs0****",
"ListenerPort" : 80,
"ListenerProtocol" : "TCPSSL",
"ServerGroupInfos" : [ {
"HeathCheckEnabled" : true,
"ServerGroupId" : "sgp-ppdpc14gdm3x4o****",
"NonNormalServers" : [ {
"Status" : "Initial",
"Port" : 80,
"Reason" : {
"ReasonCode" : "CONNECT_TIMEOUT"
},
"ServerId" : "i-bp1bt75jaujl7tjl****",
"ServerIp" : "192.168.8.10"
} ]
} ]
} ],
"TotalCount" : 10,
"NextToken" : "FFmyTO70tTpLG6I3FmYAXGKPd****",
"MaxResults" : 20
}
错误码
访问错误中心查看更多错误码。