Queries the listeners in a specified region.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
alb:ListListeners |
get |
*LoadBalancer
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| NextToken |
string |
No |
The token that indicates whether a subsequent query is available. Valid values:
|
FFmyTO70tTpLG6I4FmYAXGKPd**** |
| MaxResults |
integer |
No |
The maximum number of entries to return in a single call. This parameter is optional. Valid values: 1 to 100. Default value: 20. |
50 |
| ListenerIds |
array |
No |
The listener instance IDs. You can specify up to 20 listener instance IDs. |
|
|
string |
No |
The listener instance ID. |
lsn-o4u54y73wq7b****** |
|
| LoadBalancerIds |
array |
No |
The Application Load Balancing instance IDs. You can specify up to 20 instance IDs. |
|
|
string |
No |
The Application Load Balancing instance ID. |
alb-bd6oylbckp6k9x**** |
|
| ListenerProtocol |
string |
No |
The listener protocol used for filtering. Valid values:
|
HTTP |
| Tag |
array<object> |
No |
The tags. |
|
|
object |
No |
The tag structure. |
||
| Key |
string |
No |
The tag key. The key can be up to 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://. |
env |
| Value |
string |
No |
The tag value. The value can be up to 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://. |
product |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The application load balancing listener information. |
||
| Listeners |
array<object> |
The list of application load balancing listeners. |
|
|
array<object> |
The application load balancing listener structure. |
||
| DefaultActions |
array<object> |
The list of default rule actions. |
|
|
array<object> |
The default rule action structure. |
||
| ForwardGroupConfig |
object |
The configuration for the forwarding rule action. This parameter takes effect only when the action type is ForwardGroup. |
|
| ServerGroupTuples |
array<object> |
The destination server groups for forwarding. |
|
|
object |
The destination server groups for forwarding. |
||
| ServerGroupId |
string |
The ID of the destination server group. |
sgp-i5qt20****** |
| Type |
string |
The action type. Valid value: ForwardGroup, which indicates forwarding requests to multiple server groups. |
ForwardGroup |
| GzipEnabled |
boolean |
Specifies whether to enable Gzip compression to compress specific file types. Valid values:
|
false |
| Http2Enabled |
boolean |
Specifies whether to enable the HTTP/2 feature. Valid values:
Note
This parameter is supported only by HTTPS listeners. |
false |
| IdleTimeout |
integer |
Specifies the idle connection timeout period. Unit: seconds. Valid values: 1 to 60. If no access request is accepted within the timeout period, load balancing temporarily breaks the current connection and establishes a new connection when the next request is accepted. |
3 |
| ListenerDescription |
string |
The custom listener name. |
HTTP_80 |
| ListenerId |
string |
The listener ID. |
lsn-o4u34y73wq7b****** |
| ListenerPort |
integer |
The frontend port used by the application load balancing instance. Valid values: 1 to 65535. |
80 |
| ListenerProtocol |
string |
The listener protocol. Valid values:
|
HTTP |
| ListenerStatus |
string |
The current status of the listener. Valid values:
|
Running |
| LoadBalancerId |
string |
The instance ID of the application load balancing. |
alb-bd6oylbckp6k9x**** |
| LogConfig |
object |
The log configuration. |
|
| AccessLogRecordCustomizedHeadersEnabled |
boolean |
Specifies whether to include custom headers in access logs. Valid values:
|
true |
| AccessLogTracingConfig |
object |
The Xtrace configuration for access logs. |
|
| TracingEnabled |
boolean |
Specifies whether to enable the Xtrace feature. Valid values:
Note
You can set this parameter to true only when the instance access log switch AccessLogEnabled is turned on. |
true |
| TracingSample |
integer |
The Xtrace sampling rate. Valid values: 1 to 10000. Note
This value takes effect only when TracingEnabled is set to true. |
100 |
| TracingType |
string |
The Xtrace type. Valid value: Zipkin. Note
This value takes effect only when TracingEnabled is set to true. |
Zipkin |
| QuicConfig |
object |
The configuration for associating a QUIC listener. |
|
| QuicListenerId |
string |
The ID of the QUIC listener to be associated. This parameter is required when QuicUpgradeEnabled is set to true. This parameter takes effect only for HTTPS listeners. Note
The original listener and the associated QUIC listener must belong to the same ALB instance, and the QUIC listener must not have been associated before. |
lsn-o4u54y73wq7b****** |
| QuicUpgradeEnabled |
boolean |
Specifies whether to enable QUIC upgrade. Valid values:
Note
This parameter takes effect only for HTTPS listeners. |
true |
| RequestTimeout |
integer |
Specifies the request timeout period. Unit: seconds. Valid values: 1 to 180. If a backend server does not send a response within the timeout period, load balancing stops waiting and returns an |
34 |
| SecurityPolicyId |
string |
The security policy. Note
This parameter is supported only by HTTPS listeners. |
tls_cipher_policy_1_1 |
| Tags |
array<object> |
The tags. |
|
|
object |
The tag structure. |
||
| Key |
string |
The tag key. The key can be up to 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://. |
env |
| Value |
string |
The tag value. The value can be up to 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://. |
product |
| XForwardedForConfig |
object |
The XForward header field configuration. |
|
| XForwardedForClientCertClientVerifyAlias |
string |
The custom header field name. This value takes effect only when XForwardedForClientCertClientVerifyEnabled is set to true. The value must be 1 to 40 characters in length and can contain lowercase letters, digits, hyphens (-), and underscores (_). Note
This parameter is supported only by HTTPS listeners. |
test_client-verify-alias_123456 |
| XForwardedForClientCertClientVerifyEnabled |
boolean |
Specifies whether to use the
Note
This parameter is supported only by HTTPS listeners. |
true |
| XForwardedForClientCertFingerprintAlias |
string |
The custom header name. This value takes effect only when XForwardedForClientCertFingerprintEnabled is set to true. The value must be 1 to 40 characters in length and can contain lowercase letters, digits, hyphens (-), and underscores (_). Note
This parameter is supported only by HTTPS listeners. |
test_finger-print-alias_123456 |
| XForwardedForClientCertFingerprintEnabled |
boolean |
Specifies whether to use the
Note
This parameter is supported only by HTTPS listeners. |
true |
| XForwardedForClientCertIssuerDNAlias |
string |
The custom header name. This value takes effect only when XForwardedForClientCertIssuerDNEnabled is set to true. The value must be 1 to 40 characters in length and can contain lowercase letters, digits, hyphens (-), and underscores (_). Note
This parameter is supported only by HTTPS listeners. |
test_issue-dn-alias_123456 |
| XForwardedForClientCertIssuerDNEnabled |
boolean |
Specifies whether to use the
Note
This parameter is supported only by HTTPS listeners. |
true |
| XForwardedForClientCertSubjectDNAlias |
string |
The custom header name. This value takes effect only when XForwardedForClientCertSubjectDNEnabled is set to true. The value must be 1 to 40 characters in length and can contain lowercase letters, digits, hyphens (-), and underscores (_). Note
This parameter is supported only by HTTPS listeners. |
test_subject-dn-alias_123456 |
| XForwardedForClientCertSubjectDNEnabled |
boolean |
Specifies whether to use the
Note
This parameter is supported only by HTTPS listeners. |
true |
| XForwardedForClientSourceIpsEnabled |
boolean |
Specifies whether to allow ALB to retrieve the actual client IP address from the X-Forwarded-For header field. Valid values:
Note
This parameter is supported by HTTP and HTTPS listeners. |
false |
| XForwardedForClientSourceIpsTrusted |
string |
Specifies the trusted proxy IP addresses. Application load balancing ALB traverses the |
10.1.1.0/24 |
| XForwardedForClientSrcPortEnabled |
boolean |
Specifies whether to use the
Note
HTTP and HTTPS listeners support this parameter. |
true |
| XForwardedForEnabled |
boolean |
Specifies whether to use the
Note
|
true |
| XForwardedForHostEnabled |
boolean |
Specifies whether to use the
Note
HTTP, HTTPS, and QUIC listeners support this parameter. |
false |
| XForwardedForProcessingMode |
string |
The processing mode for the
Note
|
append |
| XForwardedForProtoEnabled |
boolean |
Specifies whether to use the
Note
HTTP, HTTPS, and QUIC listeners support this parameter. |
true |
| XForwardedForSLBIdEnabled |
boolean |
Specifies whether to use the
Note
HTTP, HTTPS, and QUIC listeners support this parameter. |
true |
| XForwardedForSLBPortEnabled |
boolean |
Specifies whether to use the
Note
HTTP, HTTPS, and QUIC listeners support this parameter. |
true |
| MaxResults |
integer |
The maximum number of records returned for the request. |
50 |
| NextToken |
string |
The token that indicates the position where the current call starts to read data. An empty value indicates that all data has been read. |
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| RequestId |
string |
The request ID. |
365F4154-92F6-4AE4-92F8-7FF3****** |
| TotalCount |
integer |
The total number of records that meet the request conditions. |
1000 |
Examples
Success response
JSON format
{
"Listeners": [
{
"DefaultActions": [
{
"ForwardGroupConfig": {
"ServerGroupTuples": [
{
"ServerGroupId": "sgp-i5qt20******"
}
]
},
"Type": "ForwardGroup"
}
],
"GzipEnabled": false,
"Http2Enabled": false,
"IdleTimeout": 3,
"ListenerDescription": "HTTP_80",
"ListenerId": "lsn-o4u34y73wq7b******",
"ListenerPort": 80,
"ListenerProtocol": "HTTP",
"ListenerStatus": "Running",
"LoadBalancerId": "alb-bd6oylbckp6k9x****",
"LogConfig": {
"AccessLogRecordCustomizedHeadersEnabled": true,
"AccessLogTracingConfig": {
"TracingEnabled": true,
"TracingSample": 100,
"TracingType": "Zipkin"
}
},
"QuicConfig": {
"QuicListenerId": "lsn-o4u54y73wq7b******",
"QuicUpgradeEnabled": true
},
"RequestTimeout": 34,
"SecurityPolicyId": "tls_cipher_policy_1_1",
"Tags": [
{
"Key": "env",
"Value": "product"
}
],
"XForwardedForConfig": {
"XForwardedForClientCertClientVerifyAlias": "test_client-verify-alias_123456",
"XForwardedForClientCertClientVerifyEnabled": true,
"XForwardedForClientCertFingerprintAlias": "test_finger-print-alias_123456",
"XForwardedForClientCertFingerprintEnabled": true,
"XForwardedForClientCertIssuerDNAlias": "test_issue-dn-alias_123456",
"XForwardedForClientCertIssuerDNEnabled": true,
"XForwardedForClientCertSubjectDNAlias": "test_subject-dn-alias_123456",
"XForwardedForClientCertSubjectDNEnabled": true,
"XForwardedForClientSourceIpsEnabled": false,
"XForwardedForClientSourceIpsTrusted": "10.1.1.0/24",
"XForwardedForClientSrcPortEnabled": true,
"XForwardedForEnabled": true,
"XForwardedForHostEnabled": false,
"XForwardedForProcessingMode": "append",
"XForwardedForProtoEnabled": true,
"XForwardedForSLBIdEnabled": true,
"XForwardedForSLBPortEnabled": true
}
}
],
"MaxResults": 50,
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"RequestId": "365F4154-92F6-4AE4-92F8-7FF3******",
"TotalCount": 1000
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | Forbidden.LoadBalancer | Authentication is failed for %s. | Authentication is failed for %s. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.