Lists details of Server Load Balancer (SLB) listeners.
Operation description
-
You can create a Classic Load Balancer instance. For more information, see CreateLoadBalancer.
-
You can configure listeners for your Classic Load Balancer instance. For more information, see:
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 region ID of the Classic Load Balancer instance. You can call the DescribeRegions operation to query region IDs. Note
If the endpoint of the selected region is slb.aliyuncs.com, you must specify |
cn-hangzhou |
| NextToken |
string |
No |
The token used to retrieve the next page of results. Valid values:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| MaxResults |
integer |
No |
The number of entries to return on each page. Valid values: 1 to 100. Default value: 20. |
50 |
| ListenerProtocol |
string |
No |
The protocol of the Classic Load Balancer listener. Valid values:
|
http |
| LoadBalancerId |
array |
No |
The IDs of up to 10 Classic Load Balancer instances. Note
For non-SDK calls, use the LoadBalancerId.N format to specify this parameter. |
lb-123wrwer |
|
string |
No |
The ID of a Classic Load Balancer instance. |
lb-uf6so8u4g35prnvsw**** |
|
| Tag |
array<object> |
No |
The list of tags. |
|
|
object |
No |
The list of tags. |
||
| Key |
string |
No |
The tag key of the resource. Valid values for N: 1 to 20. If you specify this parameter, it cannot be an empty string. The key can be up to 64 characters in length and cannot start with |
TestKey |
| Value |
string |
No |
The tag value of the resource. You can specify up to 20 tag values. The value can be an empty string and supports a maximum of 128 characters. It cannot start with |
TestValue |
| ListenerPort |
integer |
No |
The listening port of 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 used to retrieve the next page of results. Valid values:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| RequestId |
string |
The request ID. |
365F4154-92F6-4AE4-92F8-7FF34B540710 |
| TotalCount |
integer |
The total number of entries that match the request conditions. |
10 |
| MaxResults |
integer |
The number of entries to return on each page. |
50 |
| Listeners |
array<object> |
The list of listeners for Classic Load Balancer instances. Note
This parameter is not returned if no listeners are configured for the instance. |
|
|
array<object> |
The list of listeners for Classic Load Balancer instances. Note
This parameter is not returned if no listeners are configured for the instance. |
||
| AclType |
string |
The access control type. Valid values:
If you enable a whitelist but do not add any IP addresses to the access control policy group, the SLB listener forwards all requests.
If you enable a blacklist but do not add any IP addresses to the access control policy group, the SLB 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 of the Classic Load Balancer listener. |
http |
| LoadBalancerId |
string |
The ID of the Classic Load Balancer instance. |
lb-bp1b6c719dfa**** |
| ListenerPort |
integer |
The listening port. |
80 |
| AclId |
string |
The ID of the access control policy group. |
acl-a2do9e413e0spzasx**** |
| Scheduler |
string |
The scheduling algorithm. Valid values:
Note
Only guaranteed-performance instances support the sch, tch, and qch consistent hashing algorithms. |
wrr |
| Bandwidth |
integer |
The peak bandwidth of the listener. Unit: Mbps. |
-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 both |
80 |
| AclIds |
array |
The list of access control policy group IDs. |
|
| HTTPListenerConfig |
object |
The HTTP listener configuration. |
|
| HealthCheckHttpVersion |
string |
The HTTP protocol version used for health checks. |
HTTP 1.0 |
| XForwardedFor_ClientSrcPort |
string |
Indicates whether to use the
|
on |
| Cookie |
string |
The cookie configured on the server. |
B490B5EBF6F3CD402E515D22BCDA**** |
| Gzip |
string |
Indicates whether to enable Gzip compression. Valid values:
|
on |
| HealthCheckConnectPort |
integer |
The port used for health checks. Note
This parameter takes effect only when HealthCheck is set to on. |
8080 |
| HealthCheckTimeout |
integer |
The maximum timeout period for each health check response. Unit: seconds. |
3 |
| HealthCheckType |
string |
The health check protocol. |
tcp |
| CookieTimeout |
integer |
The cookie timeout period. Unit: seconds. Valid values: 1 to 86400. |
500 |
| HealthCheckDomain |
string |
The domain name used for health checks. |
www.example.com |
| UnhealthyThreshold |
integer |
The number of consecutive health check failures required before the health status of a backend server changes from success to failure. Valid values: 2 to 10. |
4 |
| XForwardedFor_SLBID |
string |
Indicates whether to use the
|
on |
| ForwardPort |
integer |
The listening port to which HTTP requests are forwarded over HTTPS. Note
This parameter is not displayed if ListenerForward is set to off. |
80 |
| HealthCheckHttpCode |
string |
The HTTP status code that indicates a successful health check. |
http_2xx,http_3xx |
| ListenerForward |
string |
Indicates whether to enable HTTP-to-HTTPS forwarding. Valid values:
|
on |
| XForwardedFor |
string |
Indicates whether to use the
|
on |
| IdleTimeout |
integer |
The idle connection timeout period. Unit: seconds. Valid values: 1 to 60. If no request is received within the timeout period, SLB temporarily closes the current connection and re-establishes the connection when the next request arrives. |
15 |
| RequestTimeout |
integer |
The request timeout period. Unit: seconds. Valid values: 1 to 180. If the backend server does not respond within the timeout period, SLB stops waiting and returns an |
60 |
| HealthCheckInterval |
integer |
The interval between two consecutive health checks. Unit: seconds. |
5 |
| XForwardedFor_SLBPORT |
string |
Indicates whether to use the
|
on |
| HealthCheckURI |
string |
The URI used for health checks. |
/test/index.html |
| StickySessionType |
string |
The method used to handle cookies. Valid values:
|
insert |
| HealthyThreshold |
integer |
The number of consecutive successful health checks required before the health status of a backend server changes from failure to success. Valid values: 2 to 10. |
4 |
| XForwardedFor_proto |
string |
Indicates whether to use the
|
on |
| XForwardedFor_SLBIP |
string |
Indicates whether to use the
|
on |
| StickySession |
string |
Indicates whether to enable session persistence. Valid values:
|
on |
| HealthCheckMethod |
string |
The health check method. Valid values: head or get. |
get |
| HealthCheck |
string |
Indicates whether to enable health checks. Valid values:
|
on |
| HTTPSListenerConfig |
object |
The HTTPS listener configuration. |
|
| XForwardedFor_ClientCertClientVerify |
string |
Indicates whether to use the
|
off |
| HealthCheckHttpVersion |
string |
The HTTP protocol version used for health checks. |
HTTP 1.0 |
| XForwardedFor_ClientSrcPort |
string |
Indicates whether to use the
|
off |
| Cookie |
string |
The cookie configured on the server. |
B490B5EBF6F3CD402E515D22BCDA**** |
| Gzip |
string |
Indicates whether to enable Gzip compression. Valid values:
|
on |
| EnableHttp2 |
string |
Indicates whether to enable the
|
off |
| CACertificateId |
string |
The ID of the CA certificate. |
idkp-234-cn-test-0**** |
| HealthCheckConnectPort |
integer |
The port used for health checks. |
8080 |
| HealthCheckTimeout |
integer |
The maximum timeout period for each health check response. Unit: seconds. |
3 |
| HealthCheckType |
string |
The health check protocol. |
tcp |
| CookieTimeout |
integer |
The cookie timeout period. Unit: seconds. Valid values: 1 to 86400. |
500 |
| HealthCheckDomain |
string |
The domain name used for health checks. |
www.example.com |
| UnhealthyThreshold |
integer |
The number of consecutive health check failures required before the health status of a backend server changes from success to failure. Valid values: 2 to 10. |
4 |
| XForwardedFor_SLBID |
string |
Indicates whether to use the
|
on |
| XForwardedFor_ClientCertSubjectDN |
string |
Indicates whether to use the
|
off |
| HealthCheckHttpCode |
string |
The HTTP status code that indicates a successful health check. |
http_2xx,http_3xx |
| XForwardedFor_ClientCertFingerprint |
string |
Indicates whether to use the
|
off |
| XForwardedFor |
string |
Indicates whether to use the
|
on |
| RequestTimeout |
integer |
The request timeout period. Unit: seconds. Valid values: 1 to 180. If the backend server does not respond within the timeout period, SLB stops waiting and returns an |
60 |
| IdleTimeout |
integer |
The idle connection timeout period. Unit: seconds. Valid values: 1 to 60. If no request is received within the timeout period, SLB temporarily closes the current connection and re-establishes the connection when the next request arrives. |
15 |
| ServerCertificateId |
string |
The ID of the server certificate. |
idkp-123-cn-test-0**** |
| HealthCheckInterval |
integer |
The interval between two consecutive health checks. Unit: seconds. |
5 |
| XForwardedFor_SLBPORT |
string |
Indicates whether to use the
|
off |
| HealthCheckURI |
string |
The URI used for health checks. |
/test/index.html |
| StickySessionType |
string |
The method used to handle cookies.
|
insert |
| XForwardedFor_ClientCertIssuerDN |
string |
Indicates whether to use the
|
off |
| HealthyThreshold |
integer |
The number of consecutive successful health checks required before the health status of a backend server changes from failure to success. Valid values: 2 to 10. |
4 |
| XForwardedFor_proto |
string |
Indicates whether to use the
|
on |
| XForwardedFor_SLBIP |
string |
Indicates whether to use the
|
on |
| StickySession |
string |
Indicates whether to enable session persistence. Valid values:
|
on |
| HealthCheckMethod |
string |
The health check method. |
get |
| TLSCipherPolicy |
string |
The security policy that defines the TLS protocol versions and cipher suites supported by HTTPS.
|
tls_cipher_policy_1_0 |
| HealthCheck |
string |
Indicates whether to enable health checks. Valid values:
|
on |
| TCPListenerConfig |
object |
The TCP listener configuration. |
|
| HealthCheckHttpCode |
string |
The HTTP status code that indicates a successful health check. |
http_2xx,http_3xx |
| ConnectionDrainTimeout |
integer |
The timeout period for connection draining. Unit: seconds. Valid values: 10 to 900. |
300 |
| PersistenceTimeout |
integer |
Indicates whether session persistence is enabled. Unit: seconds. Valid values: 0 to 3600. A value of 0 indicates that session persistence is disabled. |
0 |
| HealthCheckInterval |
integer |
The interval between two consecutive health checks. Unit: seconds. |
5 |
| HealthCheckURI |
string |
The URI used for health checks. |
/test/index.html |
| HealthCheckConnectPort |
integer |
The port used for health checks. |
8080 |
| EstablishedTimeout |
integer |
The connection timeout period. Unit: seconds. |
500 |
| HealthCheckType |
string |
The health check protocol. |
tcp |
| HealthCheckConnectTimeout |
integer |
The health check timeout period. 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 consecutive successful health checks required before the health status of a backend server changes from failure to success. Valid values: 2 to 10. |
4 |
| HealthCheckDomain |
string |
The domain name used for health checks. |
www.example.com |
| UnhealthyThreshold |
integer |
The number of consecutive health check failures required before the health status of a backend server changes from success to failure. Valid values: 2 to 10. |
4 |
| ConnectionDrain |
string |
Indicates whether to enable connection draining. Valid values:
|
off |
| HealthCheckMethod |
string |
The health check method. |
get |
| HealthCheck |
string |
Indicates whether to enable health checks. Valid values:
|
on |
| ProxyProtocolV2Enabled |
string |
Indicates whether to use the Proxy Protocol to pass the client source IP address to backend servers. Valid values:
|
false |
| UDPListenerConfig |
object |
The UDP listener configuration. |
|
| ConnectionDrainTimeout |
integer |
The timeout period for connection draining. Unit: seconds. Valid values: 10 to 900. |
300 |
| HealthCheckInterval |
integer |
The interval between two consecutive health checks. Unit: seconds. |
5 |
| HealthCheckExp |
string |
The expected response string for UDP health checks. |
ok |
| HealthCheckConnectPort |
integer |
The port used for health checks. |
8080 |
| HealthCheckConnectTimeout |
integer |
The health check response timeout period. |
100 |
| MasterSlaveServerGroupId |
string |
The ID of the primary/secondary server group. |
rsp-0bfucw**** |
| HealthyThreshold |
integer |
The healthy threshold for health checks. |
4 |
| UnhealthyThreshold |
integer |
The unhealthy threshold for health checks. |
4 |
| ConnectionDrain |
string |
Indicates whether to enable connection draining. Valid values:
|
off |
| HealthCheckReq |
string |
The request string for UDP health checks. |
hello |
| HealthCheck |
string |
Indicates whether to enable health checks. Valid values:
|
on |
| ProxyProtocolV2Enabled |
string |
Indicates whether to use the Proxy Protocol to pass the client source IP address to backend servers. Valid values:
|
false |
| Tags |
array<object> |
The list of tags. |
|
|
object |
The list of tags. |
||
| TagValue |
string |
The tag value of the resource. |
TestValue |
| TagKey |
string |
The tag key of the resource. |
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.