All Products
Search
Document Center

Server Load Balancer:GetListenerHealthStatus

Last Updated:Aug 28, 2026

Queries the health check status of a Network Load Balancer (NLB) listener.

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

nlb:GetListenerHealthStatus

get

*LoadBalancer

acs:nlb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}

None None

Request parameters

Parameter

Type

Required

Description

Example

ListenerId

string

Yes

The ID of the listener on the NLB instance.

lsn-bp1bpn0kn908w4nbw****@80

RegionId

string

No

The ID of the region where the NLB instance is deployed.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou

Response elements

Element

Type

Description

Example

object

The health check status of the listener.

RequestId

string

The ID of the request.

54B48E3D-DF70-471B-AA93-08E683A1B45

ListenerHealthStatus

array<object>

The health check status of the server group of the listener.

array<object>

The health check status of the server group of the listener.

ListenerId

string

The ID of the listener of the NLB instance.

lsn-bp1bpn0kn908w4nbw****@80

ListenerPort

integer

The listening port.

80

ListenerProtocol

string

The listening protocol. Valid values: TCP, UDP, and TCPSSL.

TCPSSL

ServerGroupInfos

array<object>

The information about the server groups.

array<object>

The information about the server group.

HeathCheckEnabled

boolean

Indicates whether the health check feature is enabled. Valid values:

  • true: enabled

  • false: disabled

true

ServerGroupId

string

The ID of the server group.

sgp-ppdpc14gdm3x4o****

NonNormalServers

array<object>

A list of unhealthy backend servers.

array<object>

A list of unhealthy backend servers.

Status

string

The health check status. Valid values:

  • Initial: indicates that health checks are configured for the NLB instance, but no data was found.

  • Unhealthy: indicates that the backend server consecutively fails health checks.

  • Unavailable: indicates that health checks are disabled.

Initial

Port

integer

The backend port.

80

Reason

object

The cause of the health check failure.

ReasonCode

string

The reason why the status is abnormal. Valid values:

  • CONNECT_TIMEOUT: The NLB instance failed to connect to the backend server within the specified period of time.

  • CONNECT_FAILED: The NLB instance failed to connect to the backend server.

  • RECV_RESPONSE_TIMEOUT: The NLB instance failed to receive a response from the backend server within the specified period of time.

  • CONNECT_INTERRUPT: The connection between the health check and the backend servers was interrupted.

  • HTTP_CODE_NOT_MATCH: The HTTP status code from the backend servers was not the expected one.

  • HTTP_INVALID_HEADER: The format of the response from the backend servers is invalid.

CONNECT_TIMEOUT

ServerId

string

The ID of the backend server.

i-bp1bt75jaujl7tjl****

ServerIp

string

The IP address of the backend server.

192.168.8.10

TotalCount

integer

The number of entries returned.

10

NextToken

string

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 used for the next query.

FFmyTO70tTpLG6I3FmYAXGKPd****

MaxResults

integer

The number of entries returned per page.

20

Examples

Success response

JSON format

{
  "RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45",
  "ListenerHealthStatus": [
    {
      "ListenerId": "\tlsn-bp1bpn0kn908w4nbw****@80",
      "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

HTTP status code

Error code

Error message

Description

400 SystemBusy System is busy, please try again later.
403 Forbidden.NoPermission Authentication is failed for NoPermission. Authentication is failed for NoPermission.
404 ResourceNotFound.loadBalancer The specified resource of loadbalancer is not found. The specified load balancer resource was not found. Please check the input parameters.
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.