Queries the details of a listener.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetListenerAttribute

The operation that you want to perform.

Set the value to GetListenerAttribute.

ListenerId String Yes lsr-bp1bpn0kn908w4nbw****

The ID of the listener.

Response parameters

Parameter Type Example Description
AclConfig Object

The configurations of the access control lists (ACLs).

AclRelations Array of aclRelation

The ACLs that are associated with the listener.

AclId String acl-doc****

The ID of the ACL that is associated with the listener.

Status String Associating

The association status between the ACL and the listener.

  • Associating: The ACL is being associated with the listener.
  • Associated: The ACL is associated with the listener.
  • Dissociating: The ACL is being disassociated from the listener.
AclType String White

The type of the ACL. Valid values:

  • White: A whitelist. Only requests from the IP addresses or CIDR blocks in the ACL are forwarded. Whitelists apply to scenarios where only specific IP addresses are allowed to access an application. Risks may arise if you set an ACL as a whitelist. After you set a whitelist for an Application Load Balancer (ALB) listener, only requests from IP addresses that are added to the whitelist are distributed by the listener. If the whitelist is enabled without IP addresses specified, the ALB listener does not forward requests.
  • Black: A blacklist. All requests from the IP addresses or CIDR blocks in the ACL are denied. Blacklists are used to prevent specified IP addresses from accessing an application. If a blacklist is enabled but the corresponding ACL does not contain IP addresses, the ALB listener forwards all requests.
Certificates Array of Certificate

The certificates.

CertificateId String 12315790212_166f8204689_1714763408_70998****

The certificate ID. Only IDs of server certificates are returned.

CaEnabled Boolean false

Indicates whether two-way authentication is enabled.

Valid values: true and false.

DefaultActions Array of defaultAction

The default forwarding rule actions.

ForwardGroupConfig Object

The configuration of the forwarding action. This parameter is required and valid if the Type parameter is set to FowardGroup.

ServerGroupTuples Array of serverGroupTuple

The destination server groups to which requests are forwarded.

ServerGroupId String rsp-cige6j****

The ID of the destination server group to which requests are forwarded.

Type String ForwardGroup

The action type.

The value is set to ForwardGroup. It indicates that requests are forwarded to multiple vServer groups.

GzipEnabled Boolean true

Indicates whether gzip compression is enabled to compress files of a specific type.

Valid values: true and false.

Default value: true.

Http2Enabled Boolean rue

Indicates whether HTTP/2 is enabled.

Valid values: true and false.

Default value: true.

Note Only HTTPS listeners support this parameter.
IdleTimeout Integer 2

The timeout period of idle connections.

Valid values: 1 to 60. Unit: seconds.

Default value: 15.

If no request is received within the specified timeout period, ALB closes the current connection. ALB creates a new connection when a new connection request is received.

ListenerDescription String test

The description of the listener.

ListenerId String lsr-bp1bpn0kn908w4nbw****

The ID of the listener.

ListenerPort Integer 80

The frontend port that is used by the ALB instance.

ListenerProtocol String HTTP

The listener protocol.

Valid values: HTTP, HTTPS, and QUIC.

ListenerStatus String running

The status of the listener. Valid values:

  • Provisioning: The listener is being created.
  • Running: The listener is running as expected.
  • Configuring: The listener is being configured.
  • Stopped: The listener is stopped.
LoadBalancerId String lb-12esdf

The ID of the ALB instance.

LogConfig Object

The configuration of the access log.

AccessLogRecordCustomizedHeadersEnabled Boolean true

Indicates whether the access log has a custom header field.

Valid values: true and false.

Default value: false.

AccessLogTracingConfig Object

The configuration of the Xtrace feature.

TracingEnabled Boolean true

Indicates whether the Xtrace feature is enabled.

Valid values: true and false.

Default value: false.

Note Only if the AccessLogEnabled parameter is set to true, you can set this parameter to true.
TracingSample Integer 100

The sampling rate of the Xtrace feature.

Valid values: 1 to 10000.

Note If TracingEnabled is set to true, this parameter is valid.
TracingType String Zipkin

The type of Xtrace. The value is set to Zipkin.

Note If TracingEnabled is set to true, this parameter is valid.
QuicConfig Object

The configuration information when you specify to associate QUIC listeners.

QuicListenerId String lsn-333

The ID of the QUIC listener to be associated. If QuicUpgradeEnabled is set to true, this parameter is required. Only HTTPS listeners support this parameter.

Note The original listener and the QUIC listener must belong to the same ALB instance. In addition, make sure that the QUIC listener has not been associated before.
QuicUpgradeEnabled Boolean true

Indicates whether QUIC upgrade is enabled.

Valid values: true and false.

Default value: false.

Note Only HTTPS listeners support this parameter.
RequestId String 365F4154-92F6-4AE4-92F8-7FF34B540710

The ID of the request.

RequestTimeout Integer 34

The request timeout period.

Valid values: 1 to 180. Unit: seconds.

Default value: 60.

If no response is received from the backend server during the request timeout period, ALB sends an HTTP 504 error code to the client.

SecurityPolicyId String tls_cipher_policy_1_1

The security policy.

Note Only HTTPS listeners support this parameter.
XForwardedForConfig Object

The configuration of the XForward field.

XForwardedForClientCertClientVerifyAlias String test_client-verify-alias_123456

The name of the custom header. This parameter is valid only if XForwardedForClientCertClientVerifyEnabled is set to true.

The name must be 1 to 40 characters in length, and can contain letters, hyphens (-), underscores (_), and digits.

Note Only HTTPS listeners support this parameter.
XForwardedForClientCertClientVerifyEnabled Boolean true

Indicates whether the X-Forwarded-Clientcert-clientverify header field is used to obtain the verification result of the ALB client certificate.

Valid values: true and false.

Default value: false.

Note Only HTTPS listeners support this parameter.
XForwardedForClientCertFingerprintAlias String test_finger-print-alias_123456

The name of the custom header. This parameter is valid only if XForwardedForClientCertFingerprintEnabled is set to true.

The name must be 1 to 40 characters in length, and can contain letters, hyphens (-), underscores (_), and digits.

Note Only HTTPS listeners support this parameter.
XForwardedForClientCertFingerprintEnabled Boolean true

Indicates whether the X-Forwarded-Clientcert-fingerprint header field is used to obtain the fingerprint of the ALB client certificate.

Valid values: true and false.

Default value: false.

Note Only HTTPS listeners support this parameter.
XForwardedForClientCertIssuerDNAlias String test_issue-dn-alias_123456

The name of the custom header. This parameter is valid only if XForwardedForClientCertIssuerDNEnabled is set to On.

The name must be 1 to 40 characters in length, and can contain letters, hyphens (-), underscores (_), and digits.

Note Only HTTPS listeners support this parameter.
XForwardedForClientCertIssuerDNEnabled Boolean true

Indicates whether the X-Forwarded-Clientcert-issuerdn is used to obtain information about the authority that issues the ALB client certificate.

Valid values: true and false.

Default value: false.

Note Only HTTPS listeners support this parameter.
XForwardedForClientCertSubjectDNAlias String test_subject-dn-alias_123456

The name of the custom header. This parameter is valid only if XForwardedForClientCertSubjectDNEnabled is set to true.

The name must be 1 to 40 characters in length, and can contain letters, hyphens (-), underscores (_), and digits.

Note Only HTTPS listeners support this parameter.
XForwardedForClientCertSubjectDNEnabled Boolean true

Indicates whether the X-Forwarded-Clientcert-subjectdn header field is used to obtain information about the owner of the ALB client certificate.

Valid values: true and false.

Default value: false.

Note Only HTTPS listeners support this parameter.
XForwardedForClientSrcPortEnabled Boolean true

Indicates whether the X-Forwarded-Client-Port header field is used to obtain the port of the ALB client.

Valid values: true and false.

Default value: false.

Note HTTP and HTTPS listeners support this parameter.
XForwardedForEnabled Boolean true

Indicates whether the X-Forwarded-For header field is used to obtain the real IP address of the client.

Valid values: true and false.

Default value: true.

Note HTTP and HTTPS listeners support this parameter.
XForwardedForProtoEnabled Boolean true

Indicates whether the X-Forwarded-Proto header field is used to obtain the listener protocol of the ALB instance.

Valid values: true and false.

Default value: false.

Note HTTP, HTTPS, and QUIC listeners support this parameter.
XForwardedForSLBIdEnabled Boolean true

Indicates whether the SLB-ID header field is used to obtain the ID of the ALB instance.

Valid values: true and false.

Default value: false.

Note HTTP, HTTPS, and QUIC listeners support this parameter.
XForwardedForSLBPortEnabled Boolean true

Indicates whether the X-Forwarded-Port header field is used to obtain the listener port of the ALB instance.

Valid values: true and false.

Default value: false.

Note HTTP, HTTPS, and QUIC listeners support this parameter.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetListenerAttribute
&ListenerId=lsr-bp1bpn0kn908w4nbw****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetListenerAttributeResponse>
    <AclConfig>
        <AclRelations>
            <AclId>acl-doc****</AclId>
            <Status>Associating</Status>
        </AclRelations>
        <AclType>White</AclType>
    </AclConfig>
    <Certificates>
        <CertificateId>12315790212_166f8204689_1714763408_70998****</CertificateId>
    </Certificates>
    <CaEnabled>false</CaEnabled>
    <DefaultActions>
        <ForwardGroupConfig>
            <ServerGroupTuples>
                <ServerGroupId>rsp-cige6j****</ServerGroupId>
            </ServerGroupTuples>
        </ForwardGroupConfig>
        <Type>ForwardGroup</Type>
    </DefaultActions>
    <GzipEnabled>true</GzipEnabled>
    <Http2Enabled>false</Http2Enabled>
    <IdleTimeout>2</IdleTimeout>
    <ListenerDescription>test</ListenerDescription>
    <ListenerId>lsr-bp1bpn0kn908w4nbw****</ListenerId>
    <ListenerPort>80</ListenerPort>
    <ListenerProtocol>HTTP</ListenerProtocol>
    <ListenerStatus>running</ListenerStatus>
    <LoadBalancerId>lb-12esdf</LoadBalancerId>
    <LogConfig>
        <AccessLogRecordCustomizedHeadersEnabled>true</AccessLogRecordCustomizedHeadersEnabled>
        <AccessLogTracingConfig>
            <TracingEnabled>true</TracingEnabled>
            <TracingSample>100</TracingSample>
            <TracingType>Zipkin</TracingType>
        </AccessLogTracingConfig>
    </LogConfig>
    <QuicConfig>
        <QuicListenerId>lsn-333</QuicListenerId>
        <QuicUpgradeEnabled>true</QuicUpgradeEnabled>
    </QuicConfig>
    <RequestId>365F4154-92F6-4AE4-92F8-7FF34B540710</RequestId>
    <RequestTimeout>34</RequestTimeout>
    <SecurityPolicyId>tls_cipher_policy_1_1</SecurityPolicyId>
    <XForwardedForConfig>
        <XForwardedForClientCertClientVerifyAlias>test_client-verify-alias_123456</XForwardedForClientCertClientVerifyAlias>
        <XForwardedForClientCertClientVerifyEnabled>true</XForwardedForClientCertClientVerifyEnabled>
        <XForwardedForClientCertFingerprintAlias>test_finger-print-alias_123456</XForwardedForClientCertFingerprintAlias>
        <XForwardedForClientCertFingerprintEnabled>true</XForwardedForClientCertFingerprintEnabled>
        <XForwardedForClientCertIssuerDNAlias>test_issue-dn-alias_123456</XForwardedForClientCertIssuerDNAlias>
        <XForwardedForClientCertIssuerDNEnabled>true</XForwardedForClientCertIssuerDNEnabled>
        <XForwardedForClientCertSubjectDNAlias>test_subject-dn-alias_123456</XForwardedForClientCertSubjectDNAlias>
        <XForwardedForClientCertSubjectDNEnabled>true</XForwardedForClientCertSubjectDNEnabled>
        <XForwardedForClientSrcPortEnabled>true</XForwardedForClientSrcPortEnabled>
        <XForwardedForEnabled>true</XForwardedForEnabled>
        <XForwardedForProtoEnabled>true</XForwardedForProtoEnabled>
        <XForwardedForSLBIdEnabled>true</XForwardedForSLBIdEnabled>
        <XForwardedForSLBPortEnabled>true</XForwardedForSLBPortEnabled>
    </XForwardedForConfig>
</GetListenerAttributeResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "AclConfig" : {
    "AclRelations" : {
      "AclId" : "acl-doc****",
      "Status" : "Associating"
    },
    "AclType" : "White"
  },
  "Certificates" : {
    "CertificateId" : "12315790212_166f8204689_1714763408_70998****"
  },
  "CaEnabled" : false,
  "DefaultActions" : {
    "ForwardGroupConfig" : {
      "ServerGroupTuples" : {
        "ServerGroupId" : "rsp-cige6j****"
      }
    },
    "Type" : "ForwardGroup"
  },
  "GzipEnabled" : true,
  "Http2Enabled" : false,
  "IdleTimeout" : 2,
  "ListenerDescription" : "test",
  "ListenerId" : "lsr-bp1bpn0kn908w4nbw****",
  "ListenerPort" : 80,
  "ListenerProtocol" : "HTTP",
  "ListenerStatus" : "running",
  "LoadBalancerId" : "lb-12esdf",
  "LogConfig" : {
    "AccessLogRecordCustomizedHeadersEnabled" : true,
    "AccessLogTracingConfig" : {
      "TracingEnabled" : true,
      "TracingSample" : 100,
      "TracingType" : "Zipkin"
    }
  },
  "QuicConfig" : {
    "QuicListenerId" : "lsn-333",
    "QuicUpgradeEnabled" : true
  },
  "RequestId" : "365F4154-92F6-4AE4-92F8-7FF34B540710",
  "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,
    "XForwardedForProtoEnabled" : true,
    "XForwardedForSLBIdEnabled" : true,
    "XForwardedForSLBPortEnabled" : true
  }
}

Error codes

HttpCode Error code Error message Description
404 ResourceNotFound.Listener The specified resource %s is not found. The error message returned because the specified resource %s does not exist.

For a list of error codes, visit the API Error Center.