Queries the listeners of a Classic Load Balancer (CLB) instance.
Operation description
A CLB instance is created. For more information, see CreateLoadBalancer.
One or more listeners are added to the CLB instance. For more information, see the following topics:
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
slb:DescribeLoadBalancerListeners | get | *LoadBalancer
| 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 | cn-hangzhou |
NextToken | string | No | The token that is used for the next query. Valid values:
| 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:
| 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 | 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 | 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:
| 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:
If you configure a whitelist but no IP address is added to the whitelist, the listener forwards all requests.
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 |
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:
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:
| off |
BackendServerPort | integer | The port of the backend server. Note This parameter takes effect only when the | 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
| on |
Cookie | string | The cookie configured on the server. | B490B5EBF6F3CD402E515D22BCDA**** |
Gzip | string | Indicates whether GZIP compression is enabled. Valid values:
| 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
| 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 |
XForwardedFor | string | Indicates whether the
| 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 | 60 |
HealthCheckInterval | integer | The interval at which health checks are performed. Unit: seconds. | 5 |
XForwardedFor_SLBPORT | string | Indicates whether the
| 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 |
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
| on |
XForwardedFor_SLBIP | string | Indicates whether the
| on |
StickySession | string | Indicates whether session persistence is enabled. Valid values:
| 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 |
| HTTPSListenerConfig | object | The configurations of the HTTPS listener. | |
XForwardedFor_ClientCertClientVerify | string | Indicates whether the
| off |
HealthCheckHttpVersion | string | The HTTP version for health checks. | HTTP 1.0 |
XForwardedFor_ClientSrcPort | string | Indicates whether the
| off |
Cookie | string | The cookie configured on the server. | B490B5EBF6F3CD402E515D22BCDA**** |
Gzip | string | Indicates whether GZIP compression is enabled. Valid values:
| on |
EnableHttp2 | string | Indicates whether
| 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
| on |
XForwardedFor_ClientCertSubjectDN | string | Indicates whether the
| off |
HealthCheckHttpCode | string | The HTTP status code that indicates a healthy backend server. | http_2xx,http_3xx |
XForwardedFor_ClientCertFingerprint | string | Indicates whether the
| off |
XForwardedFor | string | Indicates whether the
| 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 | 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
| off |
HealthCheckURI | string | The URI that is used for health checks. | /test/index.html |
StickySessionType | string | The method used to handle the cookie.
| insert |
XForwardedFor_ClientCertIssuerDN | string | Indicates whether the
| 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
| on |
XForwardedFor_SLBIP | string | Indicates whether the
| on |
StickySession | string | Indicates whether session persistence is enabled. Valid values:
| 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 |
HealthCheck | string | Indicates whether the health check feature is enabled. Valid values:
| 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:
| off |
HealthCheckMethod | string | The health check method. | get |
HealthCheck | string | Indicates whether the health check feature is enabled. Valid values:
| on |
ProxyProtocolV2Enabled | string | Indicates whether the Proxy protocol is used to pass source client IP addresses to backend servers. Valid values:
| 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:
| off |
HealthCheckReq | string | The request string of UDP health checks. | hello |
HealthCheck | string | Indicates whether the health check feature is enabled. Valid values:
| on |
ProxyProtocolV2Enabled | string | Indicates whether the Proxy protocol is used to pass source client IP addresses to backend servers. Valid values:
| 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.