Queries the details about a listener.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
alb:GetListenerAttribute |
get |
*LoadBalancer
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ListenerId |
string |
Yes |
The listener ID. |
lsn-o4u54y73wq7b****** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The details about the listener. |
||
| AclConfig |
object |
The configurations of the access control lists (ACLs). |
|
| AclRelations |
array<object> |
The IDs of the ACLs that are associated with the listener. |
|
|
object |
The structure of the ACL that is associated with the listener. |
||
| AclId |
string |
The ID of the ACL that is associated with the listener. |
acl-doc**** |
| Status |
string |
Indicates whether the ACL is associated with the listener. Valid values:
|
Associating |
| AclType |
string |
The type of the ACL. Valid values:
|
White |
| Certificates |
array<object> |
A list of certificates. |
|
|
object |
The configurations of the certificate. |
||
| CertificateId |
string |
The ID of the certificate. Only server certificates are supported. |
123157******* |
| CaCertificates |
array<object> |
A list of default CA certificates. |
|
|
object |
|||
| CertificateId |
string |
The ID of the default CA certificate. |
139a00***** |
| Status |
string |
The status of the certificate. |
Associated |
| IsDefault |
boolean |
Indicates whether the certificate is a default certificate: Valid values:
|
true |
| CaEnabled |
boolean |
Indicates whether mutual authentication is enabled. Valid values:
|
false |
| DefaultActions |
array<object> |
The actions of the default forwarding rule. |
|
|
array<object> |
The configurations of the default forwarding rule. |
||
| ForwardGroupConfig |
object |
The configuration of the ForwardGroup action. This parameter is returned and takes effect when Type is set to ForwardGroup. |
|
| ServerGroupTuples |
array<object> |
The server group to which requests are forwarded. |
|
|
object |
The server groups to which requests are forwarded. |
||
| ServerGroupId |
string |
The ID of the server group to which requests are forwarded. |
sgp-i5qt20****** |
| Type |
string |
The type of the action. If ForwardGroup is returned, requests are forwarded to multiple vServer groups. |
ForwardGroup |
| GzipEnabled |
boolean |
Indicates whether GZIP compression is enabled to compress specific types of files. Valid values:
|
true |
| Http2Enabled |
boolean |
Indicates whether HTTP/2 is enabled. Valid values:
Note
This parameter is available only when you create an HTTPS listener. |
true |
| IdleTimeout |
integer |
The timeout period of an idle connection. Unit: seconds. If no requests are received within the specified timeout period, Application Load Balancer (ALB) closes the current connection. When a request is received, ALB establishes a new connection. |
2 |
| ListenerDescription |
string |
The name of the listener. |
HTTP_80 |
| ListenerId |
string |
The ID of the listener. |
lsn-o4u54y73wq7b****** |
| ListenerPort |
integer |
The frontend port that is used by the ALB instance. |
80 |
| ListenerProtocol |
string |
The listener protocol. Valid values: HTTP, HTTPS, and QUIC. |
HTTP |
| ListenerStatus |
string |
The status of the listener. Valid values:
|
Running |
| LoadBalancerId |
string |
The ALB instance ID. |
alb-bd6oylbckp6k9x**** |
| LogConfig |
object |
The logging configuration. |
|
| AccessLogRecordCustomizedHeadersEnabled |
boolean |
Indicates whether custom headers are recorded in the access log. Valid values:
|
true |
| AccessLogTracingConfig |
object |
The configuration of Xtrace. Xtrace is used to record requests sent to ALB. |
|
| TracingEnabled |
boolean |
Indicates whether Xtrace is enabled. Valid values:
Note
You can set this parameter to true only if the AccessLogEnabled parameter is set to true. |
true |
| TracingSample |
integer |
The sampling rate of Xtrace. Valid values: 1 to 10000. Note
If TracingEnabled is set to true, this parameter is valid. |
100 |
| TracingType |
string |
The Xtrace type. Supported Xtrace type: Zipkin. Note
If TracingEnabled is set to true, this parameter is valid. |
Zipkin |
| QuicConfig |
object |
The configuration information when the listener is associated with a QUIC listener. |
|
| QuicListenerId |
string |
The ID of the QUIC listener. This parameter is returned when QuicUpgradeEnabled is set to true. Only HTTPS listeners support this parameter. Note
You must associate the HTTPS listener and the QUIC listener with the same ALB instance. In addition, make sure that the QUIC listener has never been associated with another listener. |
lsn-ek6ad66t**** |
| QuicUpgradeEnabled |
boolean |
Indicates whether QUIC upgrade is enabled. Valid values:
Note
Only HTTPS listeners support this parameter. |
true |
| RequestId |
string |
The request ID. |
365F4154-92F6-4AE4-92F8-7FF****** |
| RequestTimeout |
integer |
The timeout period of a request. Unit: seconds. If no responses are received from the backend server within the specified timeout period, ALB returns an |
34 |
| SecurityPolicyId |
string |
The security policy. Note
This parameter is available only when you create an HTTPS listener. |
tls_cipher_policy_1_1 |
| XForwardedForConfig |
object |
The configuration of the XForward headers. |
|
| XForwardedForClientCertClientVerifyAlias |
string |
The name of the custom header. This parameter takes effect only when XForwardedForClientCertClientVerifyEnabled is set to true. The name is 1 to 40 characters in length, and can contain lowercase letters, hyphens (-), underscores (_), and digits. Note
This parameter is available only when you create an HTTPS listener. |
test_client-verify-alias_123456 |
| XForwardedForClientCertClientVerifyEnabled |
boolean |
Indicates whether the
Note
This parameter is available only when you create an HTTPS listener. |
true |
| XForwardedForClientCertFingerprintAlias |
string |
The name of the custom header. This parameter takes effect only when XForwardedForClientCertFingerprintEnabled is set to true. The name is 1 to 40 characters in length, and can contain lowercase letters, hyphens (-), underscores (_), and digits. Note
This parameter is available only when you create an HTTPS listener. |
test_finger-print-alias_123456 |
| XForwardedForClientCertFingerprintEnabled |
boolean |
Indicates whether the
Note
This parameter is available only when you create an HTTPS listener. |
true |
| XForwardedForClientCertIssuerDNAlias |
string |
The name of the custom header. This parameter takes effect only when XForwardedForClientCertIssuerDNEnabled is set to true. The name is 1 to 40 characters in length, and can contain lowercase letters, hyphens (-), underscores (_), and digits. Note
This parameter is available only when you create an HTTPS listener. |
test_issue-dn-alias_123456 |
| XForwardedForClientCertIssuerDNEnabled |
boolean |
Indicates whether the
Note
This parameter is available only when you create an HTTPS listener. |
true |
| XForwardedForClientCertSubjectDNAlias |
string |
The name of the custom header. This parameter takes effect only when XForwardedForClientCertSubjectDNEnabled is set to true. The name is 1 to 40 characters in length, and can contain lowercase letters, hyphens (-), underscores (_), and digits. Note
This parameter is available only when you create an HTTPS listener. |
test_subject-dn-alias_123456 |
| XForwardedForClientCertSubjectDNEnabled |
boolean |
Indicates whether the
Note
This parameter is available only when you create an HTTPS listener. |
true |
| XForwardedForClientSrcPortEnabled |
boolean |
Indicates whether the
Note
This parameter is available only when you create an HTTP or HTTPS listener. |
true |
| XForwardedForEnabled |
boolean |
Indicates whether the
Note
|
true |
| XForwardedForProcessingMode |
string |
Specifies how the
Note
|
append |
| XForwardedForProtoEnabled |
boolean |
Indicates whether the
Note
This parameter is available only when you create an HTTP, HTTPS, or QUIC listener. |
true |
| XForwardedForSLBIdEnabled |
boolean |
Indicates whether the
Note
This parameter is available only when you create an HTTP, HTTPS, or QUIC listener. |
true |
| XForwardedForSLBPortEnabled |
boolean |
Indicates whether the
Note
This parameter is available only when you create an HTTP, HTTPS, or QUIC listener. |
true |
| XForwardedForClientSourceIpsEnabled |
boolean |
Indicates whether the
Note
This parameter is available only when you create an HTTP, HTTPS, or QUIC listener. |
false |
| XForwardedForClientSourceIpsTrusted |
string |
The trusted proxy IP address. ALB traverses |
10.1.1.0/24 |
| XForwardedForHostEnabled |
boolean |
Specifies whether to use the
Note
This parameter is available for HTTP, HTTPS, and QUIC listeners. |
false |
| Tags |
array<object> |
The tags. |
|
|
object |
The tags. |
||
| Key |
string |
The tag key. The tag key can be up to 128 characters in length and cannot start with |
env |
| Value |
string |
The tag value. The tag value can be up to 128 characters in length and cannot start with |
product |
Examples
Success response
JSON format
{
"AclConfig": {
"AclRelations": [
{
"AclId": "acl-doc****",
"Status": "Associating"
}
],
"AclType": "White"
},
"Certificates": [
{
"CertificateId": "123157*******"
}
],
"CaCertificates": [
{
"CertificateId": "139a00*****",
"Status": "Associated",
"IsDefault": true
}
],
"CaEnabled": false,
"DefaultActions": [
{
"ForwardGroupConfig": {
"ServerGroupTuples": [
{
"ServerGroupId": "sgp-i5qt20******"
}
]
},
"Type": "ForwardGroup"
}
],
"GzipEnabled": true,
"Http2Enabled": true,
"IdleTimeout": 2,
"ListenerDescription": "HTTP_80",
"ListenerId": "lsn-o4u54y73wq7b******",
"ListenerPort": 80,
"ListenerProtocol": "HTTP",
"ListenerStatus": "Running",
"LoadBalancerId": "alb-bd6oylbckp6k9x****",
"LogConfig": {
"AccessLogRecordCustomizedHeadersEnabled": true,
"AccessLogTracingConfig": {
"TracingEnabled": true,
"TracingSample": 100,
"TracingType": "Zipkin"
}
},
"QuicConfig": {
"QuicListenerId": "lsn-ek6ad66t****",
"QuicUpgradeEnabled": true
},
"RequestId": "365F4154-92F6-4AE4-92F8-7FF******",
"RequestTimeout": 34,
"SecurityPolicyId": "tls_cipher_policy_1_1",
"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,
"XForwardedForClientSrcPortEnabled": true,
"XForwardedForEnabled": true,
"XForwardedForProcessingMode": "append",
"XForwardedForProtoEnabled": true,
"XForwardedForSLBIdEnabled": true,
"XForwardedForSLBPortEnabled": true,
"XForwardedForClientSourceIpsEnabled": false,
"XForwardedForClientSourceIpsTrusted": "10.1.1.0/24",
"XForwardedForHostEnabled": false
},
"Tags": [
{
"Key": "env",
"Value": "product"
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | Forbidden.LoadBalancer | Authentication is failed for %s. | Authentication is failed for %s. |
| 404 | ResourceNotFound.Listener | The specified resource %s is not found. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.