查询监听及其转发规则的健康检查状态。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
alb:GetListenerHealthStatus |
get |
*LoadBalancer
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ListenerId |
string |
是 |
实例的监听 ID。 |
lsn-o4u54y73wq7b****** |
| IncludeRule |
boolean |
否 |
是否包含转发规则的检查结果。取值:
|
true |
| NextToken |
string |
否 |
是否拥有下一次查询的令牌(Token)。取值:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| MaxResults |
integer |
否 |
分批次查询时每次显示的最大条目数。取值范围:1~30,默认值为 20。 |
20 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
查询监听及其相应配置的转发规则的健康检查状态。 |
||
| ListenerHealthStatus |
array<object> |
监听的服务器组健康检查状态列表。 |
|
|
array<object> |
监听的服务器组健康检查状态结构。 |
||
| ListenerId |
string |
实例的监听 ID。 |
lsn-o4u54y73wq7b****** |
| ListenerPort |
integer |
监听的端口号。 |
80 |
| ListenerProtocol |
string |
监听的协议。 |
http |
| ServerGroupInfos |
array<object> |
服务器组信息。 |
|
|
array<object> |
服务器组信息。 |
||
| HealthCheckEnabled |
string |
健康检查开启状态。取值: on,表示开启健康检查。 |
on |
| NonNormalServers |
array<object> |
非正常状态的后端服务器列表。 |
|
|
array<object> |
非正常状态的后端服务器列表。 |
||
| Port |
integer |
后端服务器端口。 |
90 |
| Reason |
object |
非正常状态的原因。 |
|
| ActualResponse |
string |
后端服务器实际的返回码信息,例如,302。 说明
ReasonCode 为RESPONSE_MISMATCH才该返回值。 |
302 |
| ExpectedResponse |
string |
用户预期的后端服务器返回码信息。 取值:HTTP_2xx、HTTP_3xx、HTTP_4xx和HTTP_5xx。多个返回码之间用半角逗号(,)分隔。 说明
ReasonCode 为RESPONSE_MISMATCH才返回该值。 |
HTTP_2xx |
| ReasonCode |
string |
Status 为异常状态时的详细原因。 目前仅 HTTP 和 HTTPS 的监听与转发规则支持查看异常状态原因:
|
RESPONSE_MISMATCH |
| ServerId |
string |
后端服务器 ID。 |
i-uf62h8v****** |
| ServerIp |
string |
后端服务器 IP。 |
192.168.8.10 |
| Status |
string |
健康检查状态。取值:
|
Initial |
| ServerGroupId |
string |
关联的服务器组 ID。 |
sgp-8ilqs4axp6****** |
| ActionType |
string |
服务器组使用类型。取值:
|
TrafficMirror |
| RequestId |
string |
请求 ID。 |
CEF72CEB-54B6-4AE8-B225-F876F****** |
| RuleHealthStatus |
array<object> |
转发规则的健康状态列表。 |
|
|
array<object> |
转发规则的健康状态结构。 |
||
| RuleId |
string |
转发规则 ID。 |
rule-hp34s2h0xx1ht4nwo**** |
| ServerGroupInfos |
array<object> |
服务器组列表。 |
|
|
array<object> |
服务器组结构。 |
||
| HealthCheckEnabled |
string |
健康检查开启状态。取值: on,表示开启健康检查。 |
on |
| NonNormalServers |
array<object> |
非正常状态的后端服务器列表。 |
|
|
array<object> |
非正常状态的后端服务器列表。 |
||
| Port |
integer |
后端服务器端口。 |
90 |
| Reason |
object |
非正常状态的原因。 |
|
| ActualResponse |
string |
后端服务器实际的返回码信息,例如,302。 说明
ReasonCode 为RESPONSE_MISMATCH才有值。 |
302 |
| ExpectedResponse |
string |
用户预期的后端服务器返回码信息。 取值:HTTP_2xx、HTTP_3xx、HTTP_4xx和HTTP_5xx。多个返回码之间用半角逗号(,)分隔。 说明
ReasonCode 为RESPONSE_MISMATCH才有值。 |
HTTP_2xx |
| ReasonCode |
string |
Status 为异常状态时的详细原因。 目前仅 HTTP 和 HTTPS 的监听与转发规则支持查看异常状态原因:
|
RESPONSE_MISMATCH |
| ServerId |
string |
后端服务器 ID。 |
i-uf62h8v****** |
| ServerIp |
string |
后端服务器组 IP。 |
192.168.2.11 |
| Status |
string |
健康检查状态。取值:
|
Initial |
| ServerGroupId |
string |
关联的服务器组 ID。 |
sgp-8ilqs4axp6****** |
| ActionType |
string |
服务器组使用类型。 |
TrafficMirror |
| NextToken |
string |
是否拥有下一次查询的令牌(Token)。取值:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
示例
正常返回示例
JSON格式
{
"ListenerHealthStatus": [
{
"ListenerId": "lsn-o4u54y73wq7b******",
"ListenerPort": 80,
"ListenerProtocol": "http",
"ServerGroupInfos": [
{
"HealthCheckEnabled": "on",
"NonNormalServers": [
{
"Port": 90,
"Reason": {
"ActualResponse": "302",
"ExpectedResponse": "HTTP_2xx",
"ReasonCode": "RESPONSE_MISMATCH"
},
"ServerId": "i-uf62h8v******",
"ServerIp": "192.168.8.10",
"Status": "Initial"
}
],
"ServerGroupId": "sgp-8ilqs4axp6******",
"ActionType": "TrafficMirror"
}
]
}
],
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876F******",
"RuleHealthStatus": [
{
"RuleId": "rule-hp34s2h0xx1ht4nwo****",
"ServerGroupInfos": [
{
"HealthCheckEnabled": "on",
"NonNormalServers": [
{
"Port": 90,
"Reason": {
"ActualResponse": "302",
"ExpectedResponse": "HTTP_2xx",
"ReasonCode": "RESPONSE_MISMATCH"
},
"ServerId": "i-uf62h8v******",
"ServerIp": "192.168.2.11",
"Status": "Initial"
}
],
"ServerGroupId": "sgp-8ilqs4axp6******",
"ActionType": "TrafficMirror"
}
]
}
],
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 403 | Forbidden.LoadBalancer | Authentication is failed for %s. | 负载均衡操作鉴权失败。 |
| 404 | ResourceNotFound.LoadBalancer | The specified resource %s is not found. | 资源%s不存在。 |
| 404 | ResourceNotFound.Listener | The specified resource %s is not found. | 监听不存在。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。