All Products
Search
Document Center

Server Load Balancer:GetListenerHealthStatus

Last Updated:May 25, 2026

Retrieves the health check status of a listener and its forwarding rules.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

alb:GetListenerHealthStatus

get

*LoadBalancer

acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}

None None

Request parameters

Parameter

Type

Required

Description

Example

ListenerId

string

Yes

The ID of the listener.

lsn-o4u54y73wq7b******

IncludeRule

boolean

No

Specifies whether to include the health check results for forwarding rules.

  • true

  • false (default)

true

NextToken

string

No

The token used to retrieve the next page of results.

  • You do not need to specify this parameter for the first request.

  • For subsequent requests, set this parameter to the value of NextToken returned in the previous response.

FFmyTO70tTpLG6I3FmYAXGKPd****

MaxResults

integer

No

The number of entries to return on each page. Range: 1 to 30. Default: 20.

20

Response elements

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. A value of on indicates that they are enabled.

on

NonNormalServers

array<object>

A list of unhealthy backend servers.

array<object>

The details of an unhealthy backend server.

Port

integer

The port of the backend server.

90

Reason

object

The reason why the backend server is unhealthy.

ActualResponse

string

The actual response code returned by the backend server. For example, 302.

Note

This parameter is returned only when ReasonCode is set to RESPONSE_MISMATCH.

302

ExpectedResponse

string

The expected response code from the backend server.

You can specify multiple values. Separate them with commas (,).

Note

This parameter is returned only when ReasonCode is set to RESPONSE_MISMATCH.

HTTP_2xx

ReasonCode

string

The detailed reason why the backend server is in an abnormal Status. This parameter is returned only for HTTP and HTTPS listeners and forwarding rules.

  • CONNECT_TIMEOUT: The connection to the backend server timed out during a health check.

  • CONNECT_FAILED: The connection to the backend server failed during a health check.

  • RECV_RESPONSE_FAILED: A response was not received from the backend server during a health check.

  • RECV_RESPONSE_TIMEOUT: The health check timed out while waiting for a response from the backend server.

  • SEND_REQUEST_FAILED: The health check request failed to be sent to the backend server.

  • SEND_REQUEST_TIMEOUT: The health check timed out while sending a request to the backend server.

  • RESPONSE_FORMAT_ERROR: The health check response from the backend server was malformed.

  • RESPONSE_MISMATCH: The health check response code from the backend server did not match the expected code.

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 health check status. Valid values:

  • Initial: The server is being initialized. Although health checks are configured, the first result has not yet been received.

  • Unhealthy: The server has failed multiple consecutive health checks.

  • Unused: The server is not in use. This can occur if its weight is set to 0, or if cross-zone load balancing is disabled and the server is in a different availability zone than the ALB instance.

  • Unavailable: Health checks are disabled for this server.

Initial

ServerGroupId

string

The ID of the server group.

sgp-8ilqs4axp6******

ActionType

string

The type of action for the server group. Valid values:

  • ForwardGroup: Forwards traffic to the server group.

  • TrafficMirror: Mirrors traffic to the server group.

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. A value of on indicates that they are enabled.

on

NonNormalServers

array<object>

A list of unhealthy backend servers.

array<object>

The details of an unhealthy backend server.

Port

integer

The port of the backend server.

90

Reason

object

The reason why the backend server is unhealthy.

ActualResponse

string

The actual response code returned by the backend server. For example, 302.

Note

This parameter is returned only when ReasonCode is set to RESPONSE_MISMATCH.

302

ExpectedResponse

string

The expected response code from the backend server.

You can specify multiple values. Separate them with commas (,).

Note

This parameter is returned only when ReasonCode is set to RESPONSE_MISMATCH.

HTTP_2xx

ReasonCode

string

The detailed reason why the backend server is in an abnormal Status. This parameter is returned only for HTTP and HTTPS listeners and forwarding rules.

  • CONNECT_TIMEOUT: The connection to the backend server timed out during a health check.

  • CONNECT_FAILED: The connection to the backend server failed during a health check.

  • RECV_RESPONSE_FAILED: A response was not received from the backend server during a health check.

  • RECV_RESPONSE_TIMEOUT: The health check timed out while waiting for a response from the backend server.

  • SEND_REQUEST_FAILED: The health check request failed to be sent to the backend server.

  • SEND_REQUEST_TIMEOUT: The health check timed out while sending a request to the backend server.

  • RESPONSE_FORMAT_ERROR: The health check response from the backend server was malformed.

  • RESPONSE_MISMATCH: The health check response code from the backend server did not match the expected code.

RESPONSE_MISMATCH

ServerId

string

The ID of the backend server.

i-uf62h8v******

ServerIp

string

The IP address of the backend server.

192.168.2.11

Status

string

The health check status. Valid values:

  • Initial: The server is being initialized. Although health checks are configured, the first result has not yet been received.

  • Unhealthy: The server has failed multiple consecutive health checks.

  • Unused: The server is not in use. This can occur if its weight is set to 0, or if cross-zone load balancing is disabled and the server is in a different availability zone than the ALB instance.

  • Unavailable: Health checks are disabled for this server.

Initial

ServerGroupId

string

The ID of the server group.

sgp-8ilqs4axp6******

ActionType

string

The type of action for the server group. Valid values: ForwardGroup (forwards traffic to the server group) and TrafficMirror (mirrors traffic to the server group).

TrafficMirror

NextToken

string

The pagination token that is used in the next request to retrieve a new page of results.

  • If this parameter is empty, all results have been returned.

  • If a value is returned, pass it in the next request to retrieve the next page of results.

FFmyTO70tTpLG6I3FmYAXGKPd****

Examples

Success response

JSON format

{
  "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****"
}

Error codes

HTTP status code

Error code

Error message

Description

403 Forbidden.LoadBalancer Authentication is failed for %s. Authentication is failed for %s.
404 ResourceNotFound.LoadBalancer The specified resource %s is not found. The specified resource %s is not found.
404 ResourceNotFound.Listener The specified resource %s is not found.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.