All Products
Search
Document Center

Server Load Balancer:GetListenerHealthStatus

Last Updated:Sep 28, 2026

Queries the health check status of a load balancing instance 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

gwlb:GetListenerHealthStatus

get

*LoadBalancer

acs:gwlb:{#regionId}:{#accountId}:loadbalancer/{#LoadbalancerId}

*Listener

acs:gwlb:{#regionId}:{#accountId}:listener/{#ListenerId}

None None

Request parameters

Parameter

Type

Required

Description

Example

ListenerId

string

Yes

The listener ID.

lsn-7sixpvm5fc3v0b****

NextToken

string

No

Specifies whether a next query token exists. Valid values:

  • If NextToken is empty, no next query exists.

  • If NextToken has a return value, the value indicates the token for the next query.

4f1d7cc9f51e18904e8a063603a6b0c3d03bc69f78734254e0b5e8707e68****

MaxResults

integer

No

The number of entries per page in a paginated query. Valid values: 1 to 1000. Default value: 20.

20

Skip

integer

No

The number of entries to skip in a paging query.

10

Filter

array<object>

No

The list of dynamic query conditions. You can add up to 20 dynamic query conditions at a time.

object

No

The dynamic query condition.

Name

string

No

The name of the dynamic query condition. You can specify one or more names for the query. Valid values:

  • Status: the health check status.

  • ReasonCode: the detailed reason when the status is abnormal.

  • ServerId: the backend server ID.

  • ServerIp: the backend server IP address.

Valid values:

  • Status :

    health check status.

  • ServerId :

    backend server ID.

  • ServerIp :

    backend server IP address.

  • ReasonCode :

    detailed reason for the abnormal status.

Status

Values

array

No

The list of values for the dynamic query condition. You can add up to 20 values at a time.

string

No

The value of the dynamic query condition. For valid values, refer to the corresponding field in the response parameters.

Unhealthy

Response elements

Element

Type

Description

Example

object

The response.

ListenerHealthStatus

array<object>

The list of health check statuses for server groups associated with the listener.

array<object>

The health check status structure for a server group associated with the listener.

ListenerId

string

The listener ID.

lsn-sg8aha6pzjavvo****

ServerGroupInfos

array<object>

The list of server group information.

array<object>

The server group information.

HealthCheckEnabled

boolean

Indicates whether health check is enabled. Valid values:

  • true: Enabled.

  • false: Disabled.

true

ServerGroupId

string

The server group ID.

sgp-0vdsbyszro3nr6****

Servers

array<object>

The list of backend servers.

array<object>

The backend server.

Port

integer

The backend server port.

6081

Reason

object

The detailed reason when Status is abnormal.

ReasonCode

string

The detailed reason when Status is abnormal. Valid values:

  • CONNECT_TIMEOUT: The load balancing health check timed out when establishing a connection to the backend server.

  • CONNECT_FAIL: The load balancing health check failed to establish a connection to the backend server.

  • RECV_TIMEOUT: The load balancing health check timed out when waiting to accept a response from the backend server.

  • CONNECT_INTERRUPT: The load balancing health check connection to the backend server encountered a break.

  • HTTP_CODE_NOT_MATCH: The response code received from the backend server during the load balancing HTTP health check did not match the expected return code.

  • HTTP_INVALID_HEADER: The response received from the backend server during the load balancing HTTP health check had a format fault.

CONNECT_TIMEOUT

ServerId

string

The backend server ID.

i-2ze4rnh8yj9kif3z****

ServerIp

string

The backend server IP address.

192.168.0.XXX

Status

string

The health check status of the backend server. Valid values:

  • Initial: Initialization in progress. The load balancing instance has health check configured, but no data is available.

  • Unhealthy: Unhealthy. The backend server has consecutively reported an unhealthy status.

  • Unused: Not used.

  • Unavailable: Not enabled. Health check is not enabled.

  • Healthy: Healthy. The health check is normal.

Healthy

MaxResults

integer

The number of entries per page in a paginated query. Valid values: 1 to 1000. Default value: 20.

20

NextToken

string

Specifies whether a next query token exists. Valid values:

  • If NextToken is empty, no next query exists.

  • If NextToken has a return value, the value indicates the token for the next query.

U12WEI6Ro2ol3wA54rBNSwdC5+lYy6q5SjIQEvc1wz5mjZxV+YjsHRdXV8XauY1BpOQIvwX63E0en54H3D****

RequestId

string

The request ID.

0ED4F222-36A0-5470-8A9A-AAB4E96BAC1A

TotalCount

integer

The total number of entries returned under the current query conditions.

31

Examples

Success response

JSON format

{
  "ListenerHealthStatus": [
    {
      "ListenerId": "lsn-sg8aha6pzjavvo****",
      "ServerGroupInfos": [
        {
          "HealthCheckEnabled": true,
          "ServerGroupId": "sgp-0vdsbyszro3nr6****",
          "Servers": [
            {
              "Port": 6081,
              "Reason": {
                "ReasonCode": "CONNECT_TIMEOUT"
              },
              "ServerId": "i-2ze4rnh8yj9kif3z****",
              "ServerIp": "192.168.0.XXX",
              "Status": "Healthy"
            }
          ]
        }
      ]
    }
  ],
  "MaxResults": 20,
  "NextToken": "U12WEI6Ro2ol3wA54rBNSwdC5+lYy6q5SjIQEvc1wz5mjZxV+YjsHRdXV8XauY1BpOQIvwX63E0en54H3D****",
  "RequestId": "0ED4F222-36A0-5470-8A9A-AAB4E96BAC1A",
  "TotalCount": 31
}

Error codes

HTTP status code

Error code

Error message

Description

400 IllegalParam.FilterValue The param of %s is illegal. The parameter of FilterValue is illegal.
400 IllegalParam.FilterName The param of %s is illegal. The parameter of FilterName is illegal.
404 ResourceNotFound.Listener The specified resource of %s is not found. The specified resource of %s is not found.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.