Mengambil status pemeriksaan kesehatan dari sebuah Pendengar dan daftar aturan pengalihannya.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
alb:GetListenerHealthStatus |
get |
*LoadBalancer
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ListenerId |
string |
Yes |
ID Pendengar dalam daftar. |
lsn-o4u54y73wq7b****** |
| IncludeRule |
boolean |
No |
Apakah akan menyertakan hasil pemeriksaan kesehatan untuk aturan pengalihan.
|
true |
| NextToken |
string |
No |
Token yang digunakan untuk mengambil halaman daftar berikutnya.
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| MaxResults |
integer |
No |
Jumlah entri yang dikembalikan per halaman. Rentang: 1 hingga 30. Default: 20. |
20 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The health check statuses of the listener and its associated forwarding rules. |
||
| ListenerHealthStatus |
array<object> |
A list of health check statuses for the server groups that are associated with the listener. |
|
|
array<object> |
The health check status of a server group that is associated with the listener. |
||
| ListenerId |
string |
The ID of the listener. |
lsn-o4u54y73wq7b****** |
| ListenerPort |
integer |
The port of the listener. |
80 |
| ListenerProtocol |
string |
The protocol of the listener. |
http |
| ServerGroupInfos |
array<object> |
Information about the server groups. |
|
|
array<object> |
Information about a server group. |
||
| HealthCheckEnabled |
string |
Indicates whether health checks are enabled. If on is returned, it indicates that health checks are enabled. |
on |
| NonNormalServers |
array<object> |
A list of unhealthy backend servers. |
|
|
array<object> |
A list of unhealthy backend servers. |
||
| Port |
integer |
The backend port. |
90 |
| Reason |
object |
The cause for the unhealthy state of the backend servers. |
|
| ActualResponse |
string |
The HTTP status code returned from the server, for example, 302. Catatan
A value is returned only if |
302 |
| ExpectedResponse |
string |
The HTTP status code returned after backend servers pass health checks. Valid values: HTTP_2xx, HTTP_3xx, HTTP_4xx, and HTTP_5xx. Multiple status codes are separated by commas (,). Catatan
This value is returned only if ReasonCode is set to RESPONSE_MISMATCH. |
HTTP_2xx |
| ReasonCode |
string |
The reason why the value of Status is Unhealthy. Only HTTP and HTTPS listeners support this parameter.
|
RESPONSE_MISMATCH |
| ServerId |
string |
The ID of the backend server. |
i-uf62h8v****** |
| ServerIp |
string |
The IP address of the backend server. |
192.168.8.10 |
| Status |
string |
The status of the health check. Valid values: Valid values:
|
Initial |
| ServerGroupId |
string |
The ID of the server group that is associated with the listener. |
sgp-8ilqs4axp6****** |
| ActionType |
string |
The action specified for the server group. Valid values:
|
TrafficMirror |
| RequestId |
string |
The request ID. |
CEF72CEB-54B6-4AE8-B225-F876F****** |
| RuleHealthStatus |
array<object> |
A list of health check statuses for the forwarding rules. |
|
|
array<object> |
The health check status of a forwarding rule. |
||
| RuleId |
string |
The ID of the forwarding rule. |
rule-hp34s2h0xx1ht4nwo**** |
| ServerGroupInfos |
array<object> |
A list of associated server groups. |
|
|
array<object> |
Details of an associated server group. |
||
| HealthCheckEnabled |
string |
Indicates whether health checks are enabled. If on is returned, it indicates that health checks are enabled. |
on |
| NonNormalServers |
array<object> |
A list of unhealthy backend servers. |
|
|
array<object> |
A list of unhealthy backend servers. |
||
| Port |
integer |
The backend port. |
90 |
| Reason |
object |
The cause for the unhealthy state of the backend servers. |
|
| ActualResponse |
string |
The HTTP status code returned from the server, for example, 302. Catatan
A value is returned only if ReasonCode is set to RESPONSE_MISMATCH. |
302 |
| ExpectedResponse |
string |
The HTTP status code returned after backend servers pass health checks. Valid values: HTTP_2xx, HTTP_3xx, HTTP_4xx, and HTTP_5xx. Multiple status codes are separated by commas (,). Catatan
A value is returned only if ReasonCode is set to RESPONSE_MISMATCH. |
HTTP_2xx |
| ReasonCode |
string |
The reason why the value of Status is Unhealthy. Only forwarding rules for HTTP and HTTPS listeners support this parameter.
|
RESPONSE_MISMATCH |
| ServerId |
string |
The ID of the backend server. |
i-uf62h8v****** |
| ServerIp |
string |
The IP address of the server group. |
192.168.2.11 |
| Status |
string |
The status of the health check. Valid values: Valid values:
|
Initial |
| ServerGroupId |
string |
The ID of the server group that is associated with the listener. |
sgp-8ilqs4axp6****** |
| ActionType |
string |
The action specified for the server group. |
TrafficMirror |
| NextToken |
string |
The pagination token that is used in the next request to retrieve a new page of results.
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
Contoh
Respons sukses
JSONformat
{
"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****"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | Forbidden.LoadBalancer | Authentication is failed for %s. | |
| 404 | ResourceNotFound.LoadBalancer | The specified resource %s is not found. | |
| 404 | ResourceNotFound.Listener | The specified resource %s is not found. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.