Queries the health check status of a listener and the associated forwarding rules.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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 lsr-bp1bpn0kn908w4nbw****

The ID of the listener.

IncludeRule Boolean No true

Specifies whether to return the health check results of forwarding rules. Valid values:

  • true: yes
  • false (default): no
NextToken String No FFmyTO70tTpLG6I3FmYAXGKPd****

The token that is used for the next query. Valid values:

  • If this is your first query or no next query is to be sent, ignore this parameter.
  • If a next query is to be sent, set the value to the value of NextToken that is returned from the last call.
MaxResults Long No 20

The number of entries to return on each page. Valid values: 1 to 30. Default value: 20.

Response parameters

Parameter Type Example Description
ListenerHealthStatus Array of ListenerHealthStatusModel

The health check status of the server groups that are associated with the listener.

ListenerId String lsr-bp1bpn0kn908w4nbw****

The ID of the listener.

ListenerPort Integer 80

The listening port.

ListenerProtocol String http

The listening protocol.

ServerGroupInfos Array of ServerGroupHealthStatusModel

The information about server groups.

HealthCheckEnabled String on

Indicates whether health checks are enabled. If on is returned, it indicates that health checks are enabled.

NonNormalServers Array of BackendServerHealthStatusModel

The list of unhealthy backend servers.

Port Integer 90

The backend port.

Reason Object

The cause of the health check failure.

ActualResponse String 302

The HTTP status code returned from the backend server. For example, 302.

Note This value is returned only if the return value of ReasonCode is RESPONSE_MISMATCH.
ExpectedResponse String HTTP_2xx

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 (,).

Note This value is returned only if the return value of ReasonCode is RESPONSE_MISMATCH.
ReasonCode String RESPONSE_MISMATCH

The reason why Status is Unhealthy. Only HTTP and HTTPS listeners support this parameter.

  • CONNECT_TIMEOUT: Application Load Balancer (ALB) failed to connect to the backend server within the specified period of time.
  • CONNECT_FAILED: ALB failed to connect to the backend server.
  • RECV_RESPONSE_FAILED: ALB failed to receive a response from the backend server.
  • RECV_RESPONSE_TIMEOUT: ALB failed to receive a response from the backend server within the specified period of time.
  • SEND_REQUEST_FAILED: ALB failed to send a request to the backend server.
  • SEND_REQUEST_TIMEOUT: ALB failed to send a request to the backend server within the specified period of time.
  • RESPONSE_FORMAT_ERROR: The format of the response from the backend server is invalid.
  • RESPONSE_FORMAT_ERROR: The HTTP status code returned from the backend server is not the expected one.
ServerId String rg-bp1bfa08ex*****

The ID of the backend server.

ServerIp String 192.168.8.10

The IP address of the backend server.

Status String Initial

The health check status. Valid values:

  • Initial: indicates that health checks are configured for the ALB instance, but no data was found.
  • Unhealthy: indicates that the backend server consecutively fails health checks.
  • Unused: indicates that the weight of the backend server is 0.
  • Unavailable: indicates that health checks are disabled.
ServerGroupId String vsp-bp1qjwo61pqz3ahltv****

The ID of the server group that is associated with the listener.

ActionType String TrafficMirror

The action specified for the server group.

RequestId String CEF72CEB-54B6-4AE8-B225-F876FF7BA984

The ID of the request.

RuleHealthStatus Array of RuleHealthStatusModel

The health check status of the forwarding rules.

RuleId String rule-hp34s2h0xx1ht4nwo****

The ID of the forwarding rule.

ServerGroupInfos Array of ServerGroupHealthStatusModel

The list of server groups.

HealthCheckEnabled String on

Indicates whether health checks are enabled. If on is returned, it indicates that health checks are enabled.

NonNormalServers Array of NonNormalServer

The list of unhealthy backend servers.

Port Integer 90

The backend port.

Reason Object

The cause of the health check failure.

ActualResponse String 302

The HTTP status code returned from the backend server. For example, 302.

Note A value is returned only if the return value of ReasonCode is RESPONSE_MISMATCH.
ExpectedResponse String HTTP_2xx

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 (,).

Note A value is returned only if the return value of ReasonCode is RESPONSE_MISMATCH.
ReasonCode String RESPONSE_MISMATCH

The reason why Status is Unhealthy. Only HTTP and HTTPS listeners support this parameter.

  • CONNECT_TIMEOUT: ALB failed to connect to the backend server within the specified period of time.
  • CONNECT_FAILED: ALB failed to connect to the backend server.
  • RECV_RESPONSE_FAILED: ALB failed to receive a response from the backend server.
  • RECV_RESPONSE_TIMEOUT: ALB failed to receive a response from the backend server within the specified period of time.
  • SEND_REQUEST_FAILED: ALB failed to send a request to the backend server.
  • SEND_REQUEST_TIMEOUT: ALB failed to send a request to the backend server within the specified period of time.
  • RESPONSE_FORMAT_ERROR: The format of the response from the backend server is invalid.
  • RESPONSE_FORMAT_ERROR: The HTTP status code returned from the backend server is not the expected one.
ServerId String rg-bp1bfa08ex****

The ID of the backend server.

ServerIp String 192.168.2.11

The IP address of the server group.

Status String Initial

The health check status. Valid values:

  • Initial: indicates that health checks are configured for the ALB instance, but no data was found.
  • Unhealthy: indicates that the backend server consecutively fails health checks.
  • Unused: indicates that the weight of the backend server is 0.
  • Unavailable: indicates that health checks are disabled.
ServerGroupId String vsp-bp1qjwo61pqz3ahlt****

The ID of the server group that is associated with the listener.

ActionType String TrafficMirror

The action specified for the server group.

NextToken String FFmyTO70tTpLG6I3FmYAXGKPd****

The token that is used for the next query. Valid values:

  • If NextToken is empty, it indicates that no next query is to be sent.
  • If a value of NextToken is returned, the value is the token that is used for the next query.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetListenerHealthStatus
&ListenerId=lsr-bp1bpn0kn908w4nbw****
&IncludeRule=true
&NextToken=FFmyTO70tTpLG6I3FmYAXGKPd****
&MaxResults=20
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetListenerHealthStatusResponse>
    <ListenerHealthStatus>
        <ListenerId>lsr-bp1bpn0kn908w4nbw****</ListenerId>
        <ListenerPort>80</ListenerPort>
        <ListenerProtocol>http</ListenerProtocol>
        <ServerGroupInfos>
            <HealthCheckEnabled>on</HealthCheckEnabled>
            <NonNormalServers>
                <Port>90</Port>
                <Reason>
                    <ActualResponse>302</ActualResponse>
                    <ExpectedResponse>HTTP_2xx</ExpectedResponse>
                    <ReasonCode>RESPONSE_MISMATCH</ReasonCode>
                </Reason>
                <ServerId>rg-bp1bfa08ex*****</ServerId>
                <ServerIp>192.168.8.10</ServerIp>
                <Status>Initial</Status>
            </NonNormalServers>
            <ServerGroupId>vsp-bp1qjwo61pqz3ahltv****</ServerGroupId>
            <ActionType>TrafficMirror</ActionType>
        </ServerGroupInfos>
    </ListenerHealthStatus>
    <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
    <RuleHealthStatus>
        <RuleId>rule-hp34s2h0xx1ht4nwo****</RuleId>
        <ServerGroupInfos>
            <HealthCheckEnabled>on</HealthCheckEnabled>
            <NonNormalServers>
                <Port>90</Port>
                <Reason>
                    <ActualResponse>302</ActualResponse>
                    <ExpectedResponse>HTTP_2xx</ExpectedResponse>
                    <ReasonCode>RESPONSE_MISMATCH</ReasonCode>
                </Reason>
                <ServerId>rg-bp1bfa08ex****</ServerId>
                <ServerIp>192.168.2.11</ServerIp>
                <Status>Initial</Status>
            </NonNormalServers>
            <ServerGroupId>vsp-bp1qjwo61pqz3ahlt****</ServerGroupId>
            <ActionType>TrafficMirror</ActionType>
        </ServerGroupInfos>
    </RuleHealthStatus>
    <NextToken>FFmyTO70tTpLG6I3FmYAXGKPd****</NextToken>
</GetListenerHealthStatusResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "ListenerHealthStatus" : [ {
    "ListenerId" : "lsr-bp1bpn0kn908w4nbw****",
    "ListenerPort" : 80,
    "ListenerProtocol" : "http",
    "ServerGroupInfos" : [ {
      "HealthCheckEnabled" : "on",
      "NonNormalServers" : [ {
        "Port" : 90,
        "Reason" : {
          "ActualResponse" : "302",
          "ExpectedResponse" : "HTTP_2xx",
          "ReasonCode" : "RESPONSE_MISMATCH"
        },
        "ServerId" : "rg-bp1bfa08ex*****",
        "ServerIp" : "192.168.8.10",
        "Status" : "Initial"
      } ],
      "ServerGroupId" : "vsp-bp1qjwo61pqz3ahltv****",
      "ActionType" : "TrafficMirror"
    } ]
  } ],
  "RequestId" : "CEF72CEB-54B6-4AE8-B225-F876FF7BA984",
  "RuleHealthStatus" : [ {
    "RuleId" : "rule-hp34s2h0xx1ht4nwo****",
    "ServerGroupInfos" : [ {
      "HealthCheckEnabled" : "on",
      "NonNormalServers" : [ {
        "Port" : 90,
        "Reason" : {
          "ActualResponse" : "302",
          "ExpectedResponse" : "HTTP_2xx",
          "ReasonCode" : "RESPONSE_MISMATCH"
        },
        "ServerId" : "rg-bp1bfa08ex****",
        "ServerIp" : "192.168.2.11",
        "Status" : "Initial"
      } ],
      "ServerGroupId" : "vsp-bp1qjwo61pqz3ahlt****",
      "ActionType" : "TrafficMirror"
    } ]
  } ],
  "NextToken" : "FFmyTO70tTpLG6I3FmYAXGKPd****"
}

Error codes

HttpCode Error code Error message Description
404 ResourceNotFound.LoadBalancer The specified resource %s is not found. The error message returned because the specified resource %s does not exist.
404 ResourceNotFound.Listener The specified resource %s is not found. The error message returned because the specified resource %s does not exist.

For a list of error codes, visit the API Error Center.