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 network access control lists (ACLs).

AclRelations Array of aclRelation

The IDs of the network ACLs that are associated with the listener.

AclId String acl-doc****

The IDs of the network ACLs that are associated with the listener.

Status String Associating

Indicates whether the network ACL is associated with the listener. Valid values:

  • Associating
  • Associated
  • Dissociating
AclType String White

The type of the network ACL. Valid values:

  • White: a whitelist. Only requests from the IP addresses or CIDR blocks in the network ACL are forwarded. Whitelists are applicable to scenarios in which you want to allow only specific IP addresses to access an application. Your service may be adversely affected if the whitelist is not properly configured. After a whitelist is configured, only requests from IP addresses that are added to the whitelist are forwarded by the listener.

    If a whitelist is configured but no IP address is added to the whitelist, the listener forwards all requests.

  • black: a blacklist. Requests from the IP addresses or CIDR blocks in the network ACL are denied. A blacklist is suitable for scenarios in which you want to deny access from specific IP addresses or CIDR blocks to an application.

    If a blacklist is configured but no IP address is added to the blacklist, the listener forwards all requests.

Certificates Array of Certificate

The list of certificates.

CertificateId String 12315790212_166f8204689_1714763408_70998****

The ID of the certificate. Only server certificates are supported.

CaEnabled Boolean false

Indicates whether mutual authentication is enabled. Valid values:

  • true: yes
  • false: no
DefaultActions Array of defaultAction

The list of default actions in the forwarding rules.

ForwardGroupConfig Object

The configuration of the Forward action. This parameter takes effect when the Type parameter is set to FowardGroup.

ServerGroupTuples Array of serverGroupTuple

The server groups to which requests are forwarded.

ServerGroupId String rsp-cige6j****

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

Type String ForwardGroup

The action.

If ForwardGroup is returned, it indicates that requests are forwarded to multiple vServer groups.

GzipEnabled Boolean true

Indicates whether Gzip compression is enabled to compress specific types of files. Valid values:

  • true: yes
  • false: no
Http2Enabled Boolean true

Indicates whether HTTP/2 is enabled. Valid values:

  • true: yes
  • false: no
Note Only HTTPS listeners support this parameter.
IdleTimeout Integer 2

The timeout period of an idle connection. Unit: seconds.

If no request is received within the specified timeout period, Application Load Balancer (ALB) closes the current connection. When another request is received, ALB establishes a new connection.

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 listening protocol. Valid values: HTTP, HTTPS, and QUIC.

ListenerStatus String Running

The status of the listener. Valid values:

  • Provisioning
  • Running
  • Configuring
  • Stopped
LoadBalancerId String lb-bp1o94dp5i6ea****

The ID of the ALB instance.

LogConfig Object

The configuration of the access log.

AccessLogRecordCustomizedHeadersEnabled Boolean true

Indicates whether custom headers are recorded in the access log. Valid values:

  • true: yes
  • false: no
AccessLogTracingConfig Object

The configuration of Xtrace that is used to record the requests sent to ALB.

TracingEnabled Boolean true

Indicates whether Xtrace is enabled. Valid values:

  • true: yes
  • false: no
Note true is returned only if the access log feature is enabled.
TracingSample Integer 100

The sampling rate of Xtrace. Valid values: 1 to 10000.

Note This parameter takes effect when TracingEnabled is set to true.
TracingType String Zipkin

The Xtrace type. Supported Xtrace type: Zipkin.

Note This parameter takes effect when TracingEnabled is set to true.
QuicConfig Object

The configuration information when the listener is associated with a QUIC listener.

QuicListenerId String lsn-333

The ID of the QUIC listener. This parameter is required if the QuicUpgradeEnabled parameter is set to true. Only HTTPS listeners support this parameter.

Note The HTTPS listener and the QUIC listener must be added to the same ALB instance. In addition, make sure that the QUIC listener is not associated with another listener.
QuicUpgradeEnabled Boolean true

Indicates whether QUIC upgrade is enabled. Valid values:

  • true: yes
  • false: no
Note Only HTTPS listeners support this parameter.
RequestId String 365F4154-92F6-4AE4-92F8-7FF34B540710

The ID of the request.

RequestTimeout Integer 34

The timeout period of a request. Unit: seconds.

If no response is received from the backend server within the specified timeout period, ALB returns 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 header.

XForwardedForClientCertClientVerifyAlias String test_client-verify-alias_123456

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 Only HTTPS listeners support this parameter.
XForwardedForClientCertClientVerifyEnabled Boolean true

Indicates whether the X-Forwarded-Clientcert-clientverify header is used to retrieve the verification result of the client certificate. Valid values:

  • true: yes
  • false: no
Note Only HTTPS listeners support this parameter.
XForwardedForClientCertFingerprintAlias String test_finger-print-alias_123456

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 Only HTTPS listeners support this parameter.
XForwardedForClientCertFingerprintEnabled Boolean true

Indicates whether the X-Forwarded-Clientcert-fingerprint header is used to retrieve the fingerprint of the client certificate. Valid values:

  • true: yes
  • false: no
Note Only HTTPS listeners support this parameter.
XForwardedForClientCertIssuerDNAlias String test_issue-dn-alias_123456

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 Only HTTPS listeners support this parameter.
XForwardedForClientCertIssuerDNEnabled Boolean true

Indicates whether the X-Forwarded-Clientcert-issuerdn header is used to retrieve information about the authority that issues the client certificate. Valid values:

  • true: yes
  • false: no
Note Only HTTPS listeners support this parameter.
XForwardedForClientCertSubjectDNAlias String test_subject-dn-alias_123456

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 Only HTTPS listeners support this parameter.
XForwardedForClientCertSubjectDNEnabled Boolean true

Indicates whether the X-Forwarded-Clientcert-subjectdn header is used to retrieve information about the owner of the client certificate. Valid values:

  • true: yes
  • false: no
Note Only HTTPS listeners support this parameter.
XForwardedForClientSrcPortEnabled Boolean true

Indicates whether the X-Forwarded-Client-Port header is used to retrieve the client port. Valid values:

  • true: yes
  • false: no
Note HTTP and HTTPS listeners support this parameter.
XForwardedForEnabled Boolean true

Indicates whether the X-Forwarded-For header is used to retrieve the client IP address. Valid values:

  • true: yes
  • false: no
Note HTTP and HTTPS listeners support this parameter.
XForwardedForProtoEnabled Boolean true

Indicates whether the X-Forwarded-Proto header is used to retrieve the listening protocol. Valid values:

  • true: yes
  • false: no
Note HTTP, HTTPS, and QUIC listeners support this parameter.
XForwardedForSLBIdEnabled Boolean true

Indicates whether the SLB-ID header is used to retrieve the ID of the ALB instance. Valid values:

  • true: yes
  • false: no
Note HTTP, HTTPS, and QUIC listeners support this parameter.
XForwardedForSLBPortEnabled Boolean true

Indicates whether the X-Forwarded-Port header is used to retrieve the listening port of the ALB instance. Valid values:

  • true: yes
  • false: no
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>true</Http2Enabled>
    <IdleTimeout>2</IdleTimeout>
    <ListenerDescription>test</ListenerDescription>
    <ListenerId>lsr-bp1bpn0kn908w4nbw****</ListenerId>
    <ListenerPort>80</ListenerPort>
    <ListenerProtocol>HTTP</ListenerProtocol>
    <ListenerStatus>Running</ListenerStatus>
    <LoadBalancerId>lb-bp1o94dp5i6ea****</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" : true,
  "IdleTimeout" : 2,
  "ListenerDescription" : "test",
  "ListenerId" : "lsr-bp1bpn0kn908w4nbw****",
  "ListenerPort" : 80,
  "ListenerProtocol" : "HTTP",
  "ListenerStatus" : "Running",
  "LoadBalancerId" : "lb-bp1o94dp5i6ea****",
  "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.