Queries the health check status of a Network Load Balancer (NLB) instance.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | GetListenerHealthStatus | The operation that you want to perform. Set the value to GetListenerHealthStatus. |
| ListenerId | String | Yes | lsn-bp1bpn0kn908w4nbw**** | The ID of the listener of the NLB instance. |
| NextToken | String | No | FFmyTO70tTpLG6I3FmYAXGKPd**** | The pagination token that is used in the next request to retrieve a new page of results. Valid values:
|
| MaxResults | Integer | No | 20 | The number of entries per page. Valid values: 1 to 100. Default value: 20. |
| RegionId | String | No | cn-hangzhou | The region ID of the NLB instance. You can call the DescribeRegions operation to query the most recent region list. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 54B48E3D-DF70-471B-AA93-08E683A1B45 | The request ID. |
| ListenerHealthStatus | Array of ListenerHealthStatus | The health check status of the server groups that are associated with the listener. |
|
| ListenerId | String | lsn-agkd9gmjx8nd85jjs0**** | The ID of the listener of the NLB instance. |
| ListenerPort | Integer | 80 | The listener port. |
| ListenerProtocol | String | TCPSSL | The listener protocol. Valid values: TCP, UDP, and TCPSSL. |
| ServerGroupInfos | Array of ServerGroupInfo | The information about the server groups. |
|
| HeathCheckEnabled | Boolean | true | Indicates whether the health check feature is enabled. Valid values:
|
| ServerGroupId | String | sgp-ppdpc14gdm3x4o**** | The server group ID. |
| NonNormalServers | Array of AbnormalServer | The unhealthy backend servers. |
|
| Status | String | Initial | The health check status. Valid values:
|
| Port | Integer | 80 | The backend port. |
| Reason | Object | The cause of the health check failure. |
|
| ReasonCode | String | CONNECT_TIMEOUT | The reason why the status is abnormal. Valid values:
|
| ServerId | String | i-bp1bt75jaujl7tjl**** | The ID of the backend server. |
| ServerIp | String | 192.168.8.10 | The IP address of the backend server. |
| TotalCount | Integer | 10 | The total number of entries returned. |
| NextToken | String | FFmyTO70tTpLG6I3FmYAXGKPd**** | A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:
|
| MaxResults | Integer | 20 | The number of entries per page. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=GetListenerHealthStatus
&ListenerId=lsn-bp1bpn0kn908w4nbw****
&NextToken=FFmyTO70tTpLG6I3FmYAXGKPd****
&MaxResults=20
&RegionId=cn-hangzhou
&Common request parameters
Sample success responses
XML format
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 format
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
}
Error codes
For a list of error codes, visit the API Error Center.