All Products
Search
Document Center

Server Load Balancer:DescribeLoadBalancerListeners - List SLB listeners

Last Updated:Apr 03, 2026

Queries the listeners of a Classic Load Balancer (CLB) instance.

Operation description

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

slb:DescribeLoadBalancerListeners

get

*LoadBalancer

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

None

None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

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

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

Note

If the endpoint of the selected region is slb.aliyuncs.com, the RegionId parameter is required.

cn-hangzhou

NextToken

string

No

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

  • If this is your first query and no subsequent queries are to be sent, ignore this parameter.

  • If a subsequent query is to be sent, set the parameter to the value of NextToken that is returned from the last call.

FFmyTO70tTpLG6I3FmYAXGKPd****

MaxResults

integer

No

The number of entries to return in each call.

Valid values: 1 to 100. If you do not specify this parameter, the default value 20 is used.

50

ListenerProtocol

string

No

The protocol used by the listener. Valid values:

  • tcp

  • udp

  • http

  • https

http

LoadBalancerId

array

No

The IDs of the CLB instances. You can specify up to 10 instance IDs.

Note

If you do not use the SDK to call this operation, use the LoadBalancerId.N parameter.

lb-123wrwer

string

No

The ID of the CLB instance.

lb-uf6so8u4g35prnvsw****

Tag

array<object>

No

The tags.

object

No

The tags.

Key

string

No

The key of the tag. You can specify up to 20 tag keys. The tag key cannot be an empty string.

The tag key must be 1 to 64 characters in length and cannot start with aliyun or acs:. It cannot contain http:// or https://.

TestKey

Value

string

No

The tag value. Valid values of N: 1 to 20. The tag value can be an empty string.

The tag value can be up to 128 characters in length and cannot start with aliyun or acs:. The tag value cannot contain http:// or https://.

TestValue

ListenerPort

integer

No

The frontend port that is used by the CLB instance.

443

Description

string

No

The custom name of the listener.

HTTPS_443

Response elements

Element

Type

Description

Example

object

NextToken

string

The token that determines the start point of the query. Valid values:

  • If NextToken is empty, it indicates that no subsequent query is to be sent.

  • If a value is returned for NextToken, the value is the token that determines the start point of the next query.

FFmyTO70tTpLG6I3FmYAXGKPd****

RequestId

string

The ID of the request.

365F4154-92F6-4AE4-92F8-7FF34B540710

TotalCount

integer

The total number of entries returned.

10

MaxResults

integer

The number of entries returned per page.

50

Listeners

array<object>

A list of listeners of the CLB instance.

Note

This parameter is not returned if the CLB instance does not have a listener.

array<object>

A list of listeners of the CLB instance.

Note

This parameter is not returned if the CLB instance does not have a listener.

AclType

string

The type of access control. Valid values:

  • white: The listener forwards requests only from IP addresses and CIDR blocks on the whitelist. Your service may be adversely affected if the whitelist is not properly configured. If a whitelist is configured, the listener forwards requests only from IP addresses that are added to the whitelist.

If you configure a whitelist but no IP address is added to the whitelist, the listener forwards all requests.

  • black: The listener blocks requests from IP addresses and CIDR blocks on the blacklist.

If you configure a blacklist but no IP address is added to the blacklist, the listener forwards all requests.

white

Status

string

The status of the listener. Valid values:

  • running: The listener is running normally.

  • stopped: The listener is stopped.

running

VServerGroupId

string

The ID of the vServer group associated with the listener.

rsp-cige6j****

ListenerProtocol

string

The protocol used by the listener.

http

LoadBalancerId

string

The ID of the CLB instance.

lb-bp1b6c719dfa****

ListenerPort

integer

The listener port.

80

AclId

string

The ID of the access control list (ACL).

acl-a2do9e413e0spzasx****

Scheduler

string

The scheduling algorithm. Valid values:

  • wrr: Backend servers with higher weights receive more requests than those with lower weights.

  • rr: Requests are distributed to backend servers in sequence.

  • sch: consistent hashing that is based on source IP addresses. Requests from the same source IP address are distributed to the same backend server.

  • tch: specifies consistent hashing based on the source IP address, destination IP address, source port, and destination port. Requests that have the same four factors are distributed to the same backend server.

  • qch: specifies consistent hashing based on Quick UDP Internet Connection (QUIC) IDs. Requests that contain the same QUIC ID are scheduled to the same backend server.

Note

Only high-performance CLB instances support the sch, tch, and qch consistent hashing algorithms.

wrr

Bandwidth

integer

The maximum bandwidth of the listener. Unit: Mbit/s.

-1

Description

string

The description of the listener.

test

AclStatus

string

Indicates whether access control is enabled. Valid values:

  • on

  • off

off

BackendServerPort

integer

The port of the backend server.

Note

This parameter takes effect only when the VServerGroupId and MasterSlaveServerGroupId parameters are both empty.

80

AclIds

array

The IDs of the ACLs.

HTTPListenerConfig

object

The configurations of the HTTP listener.

HealthCheckHttpVersion

string

The HTTP version for health checks.

HTTP 1.0

XForwardedFor_ClientSrcPort

string

Indicates whether the XForwardedFor_ClientSrcPort header is used to retrieve the client port. Valid values:

  • on

  • off

on

Cookie

string

The cookie configured on the server.

B490B5EBF6F3CD402E515D22BCDA****

Gzip

string

Indicates whether GZIP compression is enabled. Valid values:

  • on

  • off

on

HealthCheckConnectPort

integer

The port that is used for health checks.

Note

This parameter takes effect only when HealthCheck is set to on.

8080

HealthCheckTimeout

integer

The maximum timeout period of a health check. Unit: seconds.

3

HealthCheckType

string

The protocol that you want to use for health checks.

tcp

CookieTimeout

integer

The maximum amount of time to wait before the session cookie expires. Unit: seconds.

Valid values: 1 to 86400.

500

HealthCheckDomain

string

The domain name that is used for health checks.

www.example.com

UnhealthyThreshold

integer

The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health check status of the backend server changes from success to fail.

Valid values: 2 to 10.

4

XForwardedFor_SLBID

string

Indicates whether the SLB-ID header is used to retrieve the ID of the CLB instance. Valid values:

  • on

  • off

on

ForwardPort

integer

The listener port that is used for HTTP-to-HTTPS redirection.

Note

If the ListenerForward parameter is set to off, this parameter is not returned.

80

HealthCheckHttpCode

string

The HTTP status code that indicates a healthy backend server.

http_2xx,http_3xx

ListenerForward

string

Indicates whether HTTP-to-HTTPS redirection is enabled for the listener. Valid values:

  • on

  • off

on

XForwardedFor

string

Indicates whether the X-Forwarded-For header is used to preserve client IP addresses. Valid values:

  • on

  • off

on

IdleTimeout

integer

The timeout period of an idle connection. Unit: seconds. Valid values: 1 to 60.

If no request is received within the specified timeout period, CLB closes the connection. When a request is received, CLB establishes a new connection.

15

RequestTimeout

integer

The timeout period of a request. Unit: seconds. Valid values: 1 to 180.

If no response is received from a backend server during the request timeout period, CLB sends the HTTP 504 status code to the client.

60

HealthCheckInterval

integer

The interval at which health checks are performed. Unit: seconds.

5

XForwardedFor_SLBPORT

string

Indicates whether the XForwardedFor_SLBPORT header is used to retrieve the listener port of the CLB instance. Valid values:

  • on

  • off

on

HealthCheckURI

string

The URI that is used for health checks.

/test/index.html

StickySessionType

string

The method used to handle the cookie. Valid values:

  • insert: inserts a cookie. CLB inserts the SERVERID cookie to the HTTP or HTTPS response to the first request from a client. Subsequent requests that carry the SERVERID cookie from the client are forwarded to the same backend server as the first request.

  • server: rewrites the original cookie. CLB rewrites the custom cookies in requests from a client. Subsequent requests from the client that carry the new cookie are forwarded to the same backend server as the first request.

insert

HealthyThreshold

integer

The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health check status of the backend server changes from fail to success.

Valid values: 2 to 10.

4

XForwardedFor_proto

string

Indicates whether the X-Forwarded-Proto header is used to obtain the listener protocol. Valid values:

  • on

  • off

on

XForwardedFor_SLBIP

string

Indicates whether the SLB-IP header is used to retrieve the VIP of the client. Valid values:

  • on

  • off

on

StickySession

string

Indicates whether session persistence is enabled. Valid values:

  • on

  • off

on

HealthCheckMethod

string

The health check method. Valid values: head and get.

get

HealthCheck

string

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

  • on

  • off

on

HTTPSListenerConfig

object

The configurations of the HTTPS listener.

XForwardedFor_ClientCertClientVerify

string

Indicates whether the XForwardedFor_ClientCertClientVerify header is used to obtain the verification result of the client certificate. Valid values:

  • on

  • off

off

HealthCheckHttpVersion

string

The HTTP version for health checks.

HTTP 1.0

XForwardedFor_ClientSrcPort

string

Indicates whether the XForwardedFor_ClientSrcPort header is used to retrieve the client port. Valid values:

  • on

  • off

off

Cookie

string

The cookie configured on the server.

B490B5EBF6F3CD402E515D22BCDA****

Gzip

string

Indicates whether GZIP compression is enabled. Valid values:

  • on

  • off

on

EnableHttp2

string

Indicates whether HTTP 2.0 is enabled. Valid values:

  • on

  • off

off

CACertificateId

string

The ID of the CA certificate.

idkp-234-cn-test-0****

HealthCheckConnectPort

integer

The port that is used for health checks.

8080

HealthCheckTimeout

integer

The timeout period of a health check response. Unit: seconds.

3

HealthCheckType

string

The protocol that you want to use for health checks.

tcp

CookieTimeout

integer

The maximum amount of time to wait before the session cookie expires. Unit: seconds.

Valid values: 1 to 86400.

500

HealthCheckDomain

string

The domain name that is used for health checks.

www.example.com

UnhealthyThreshold

integer

The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health check status of the backend server changes from success to fail.

Valid values: 2 to 10.

4

XForwardedFor_SLBID

string

Indicates whether the SLB-ID header is used to retrieve the ID of the CLB instance. Valid values:

  • on

  • off

on

XForwardedFor_ClientCertSubjectDN

string

Indicates whether the XForwardedFor_ClientCertSubjectDN header is used to obtain information about the owner of the client certificate. Valid values:

  • on

  • off

off

HealthCheckHttpCode

string

The HTTP status code that indicates a healthy backend server.

http_2xx,http_3xx

XForwardedFor_ClientCertFingerprint

string

Indicates whether the XForwardedFor_ClientCertFingerprint header is used to obtain the fingerprint of the client certificate. Valid values:

  • on

  • off

off

XForwardedFor

string

Indicates whether the X-Forwarded-For header is used to retrieve client IP addresses. Valid values:

  • on

  • off

on

RequestTimeout

integer

The request timeout period. Unit: seconds. Valid values: 1 to 180.

If no response is received from a backend server during the request timeout period, CLB sends the HTTP 504 status code to the client.

60

IdleTimeout

integer

The timeout period of an idle connection. Unit: seconds. Valid values: 1 to 60.

If no request is received within the specified timeout period, CLB closes the connection. When a request is received, CLB establishes a new connection.

15

ServerCertificateId

string

The ID of the server certificate.

idkp-123-cn-test-0****

HealthCheckInterval

integer

The interval at which health checks are performed. Unit: seconds.

5

XForwardedFor_SLBPORT

string

Indicates whether the XForwardedFor_SLBPORT header is used to retrieve the listener port of the CLB instance. Valid values:

  • on

  • off

off

HealthCheckURI

string

The URI that is used for health checks.

/test/index.html

StickySessionType

string

The method used to handle the cookie.

  • insert: inserts a cookie. CLB inserts the SERVERID cookie to the HTTP or HTTPS response to the first request from a client. Subsequent requests that carry the SERVERID cookie from the client are forwarded to the same backend server as the first request.

  • server: rewrites the original cookie. CLB rewrites the custom cookies in requests from a client. Subsequent requests from the client that carry the new cookie are forwarded to the same backend server as the first request.

insert

XForwardedFor_ClientCertIssuerDN

string

Indicates whether the XForwardedFor_ClientCertIssuerDN header is used to obtain information about the authority that issues the client certificate. Valid values:

  • on

  • off

off

HealthyThreshold

integer

The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health check status of the backend server changes from fail to success.

Valid values: 2 to 10.

4

XForwardedFor_proto

string

Indicates whether the X-Forwarded-Proto header is used to obtain the listener protocol. Valid values:

  • on

  • off

on

XForwardedFor_SLBIP

string

Indicates whether the SLB-IP header is used to retrieve the VIP of the client. Valid values:

  • on

  • off

on

StickySession

string

Indicates whether session persistence is enabled. Valid values:

  • on:

  • off

on

HealthCheckMethod

string

The health check method.

get

TLSCipherPolicy

string

A TLS security policy contains TLS protocols and cipher suites available for HTTPS.

  • tls_cipher_policy_1_0:

    Supported TLS versions: TLSv1.0, TLSv1.1, and TLSv1.2.

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA.

  • tls_cipher_policy_1_1:

    Supported TLS versions: TLSv1.1 and TLSv1.2.

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA.

  • tls_cipher_policy_1_2

    Supported TLS version: TLSv1.2.

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA.

  • tls_cipher_policy_1_2_strict

    Supported TLS version: TLSv1.2.

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, ECDHE-RSA-AES128-SHA, and ECDHE-RSA-AES256-SHA.

  • tls_cipher_policy_1_2_strict_with_1_3

    Supported TLS versions: TLSv1.2 and TLSv1.3.

    Supported cipher suites: TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256, TLS_AES_128_CCM_SHA256, TLS_AES_128_CCM_8_SHA256, ECDHE-ECDSA-AES128-GCM-SHA256, ECDHE-ECDSA-AES256-GCM-SHA384, ECDHE-ECDSA-AES128-SHA256, ECDHE-ECDSA-AES256-SHA384, ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, ECDHE-ECDSA-AES128-SHA, ECDHE-ECDSA-AES256-SHA, ECDHE-RSA-AES128-SHA, and ECDHE-RSA-AES256-SHA.

tls_cipher_policy_1_0

HealthCheck

string

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

  • on

  • off

on

TCPListenerConfig

object

The configurations of the TCP listener.

HealthCheckHttpCode

string

The HTTP status code that indicates a healthy backend server.

http_2xx,http_3xx

ConnectionDrainTimeout

integer

The timeout period of connection draining. Unit: seconds.

Value values: 10 to 900.

300

PersistenceTimeout

integer

Indicates whether session persistence is enabled. Unit: seconds.

Valid values: 0 to 3600.

0 indicates that session persistence is disabled.

0

HealthCheckInterval

integer

The interval between two consecutive health checks. Unit: seconds.

5

HealthCheckURI

string

The URI that is used for health checks.

/test/index.html

HealthCheckConnectPort

integer

The port that is used for health checks.

8080

EstablishedTimeout

integer

The timeout period of a connection. Unit: seconds.

500

HealthCheckType

string

The protocol that you want to use for health checks.

tcp

HealthCheckConnectTimeout

integer

The timeout period of health checks. Unit: seconds.

Valid values: 1 to 300.

100

MasterSlaveServerGroupId

string

The ID of the primary/secondary server group associated with the listener.

rsp-0bfucw*****

HealthyThreshold

integer

The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health check status of the backend server changes from fail to success.

Valid values: 2 to 10.

4

HealthCheckDomain

string

The domain name that is used for health checks.

www.example.com

UnhealthyThreshold

integer

The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health check status of the backend server changes from success to fail.

Valid values: 2 to 10.

4

ConnectionDrain

string

Indicates whether connection draining is enabled. Valid values:

  • on

  • off

off

HealthCheckMethod

string

The health check method.

get

HealthCheck

string

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

  • on

  • off

on

ProxyProtocolV2Enabled

string

Indicates whether the Proxy protocol is used to pass source client IP addresses to backend servers. Valid values:

  • true: enables the burst feature for the data disk.

  • false: The task is not being retried.

false

UDPListenerConfig

object

The configurations of the UDP listener.

ConnectionDrainTimeout

integer

The configurations of the UDP listener.

Value values: 10 to 900.

300

HealthCheckInterval

integer

The interval between two consecutive health checks. Unit: seconds.

5

HealthCheckExp

string

The response string of UDP health checks.

ok

HealthCheckConnectPort

integer

The port that is used for health checks.

8080

HealthCheckConnectTimeout

integer

The timeout period for a health check response.

100

MasterSlaveServerGroupId

string

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

rsp-0bfucw****

HealthyThreshold

integer

The number of times that a backend server must consecutively pass health checks before it is declared healthy.

4

UnhealthyThreshold

integer

The number of times that a backend server must consecutively fail health checks before it is declared unhealthy.

4

ConnectionDrain

string

Indicates whether connection draining is enabled. Valid values:

  • on

  • off

off

HealthCheckReq

string

The request string of UDP health checks.

hello

HealthCheck

string

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

  • on

  • off

on

ProxyProtocolV2Enabled

string

Indicates whether the Proxy protocol is used to pass source client IP addresses to backend servers. Valid values:

  • true: enables the burst feature for the data disk.

  • false: The task is not being retried.

false

Tags

array<object>

The list of tags.

object

The list of tags.

TagValue

string

The tag value.

TestValue

TagKey

string

The tag key.

TestKey

Error codes

HTTP status code

Error code

Error message

Description

400

IllegalParam.ListenerProtocol

The param of ListenerProtocol is illegal.

The specified ListenerProtocol is invalid. Check the parameter constraints and try again.

400

IllegalParam.MaxResults

The param of MaxResults is illegal.

The specified MaxResults is invalid. Check the parameter constraints and try again.

400

IllegalParam.NextToken

The param of NextToken is illegal.

The specified NextToken is invalid. Check the parameter constraints and try again.

400

IllegalParamSize.LoadBalancerId

The param size of LoadBalancerId is illegal.

The specified LoadBalancerId is invalid. Check the parameter constraints and try again.

400

MissingParam.TagKey

The param of TagKey is missing.

403

UnauthorizedRegion

The specified region of is not authorized.

The specified region is not visible.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.