All Products
Search
Document Center

Global Accelerator:DescribeListener

更新時間:Jul 31, 2024

Queries configuration information about a listener of a Global Accelerator (GA) instance.

Operation description

This operation is used to query configuration information about a listener of a GA instance. The information includes the routing type of the listener, the status of the listener, the timestamp that indicates when the listener was created, and the listener ports.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ga:DescribeListenerget
  • Listener
    acs:ga:{#regionId}:{#accountId}:listener/{#listenerId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region where the GA instance is deployed. Set the value to cn-hangzhou.

cn-hangzhou
ListenerIdstringYes

The ID of the listener that you want to query.

lsr-bp1bpn0kn908w4nbw****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

Descriptionstring

The description of the listener.

Listener
RequestIdstring

The ID of the request.

6FEA0CF3-D3B9-43E5-A304-D217037876A8
Statestring

The status of the listener. Valid values:

  • configuring: The listener is being configured.
  • init: The listener is being initialized.
  • updating: The listener is being updated.
  • deleting: The listener is being deleted.
active
CreateTimestring

The time when the listener was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Unit: milliseconds.

1577786252000
PortRangesarray<object>

The information about the listener ports.

object

Details about the listener ports.

FromPortinteger

The first port in the range of listener ports that are used to receive and forward requests to endpoints.

20
ToPortinteger

The last port in the range of listener ports that are used to receive and forward requests to endpoints.

20
BackendPortsarray<object>

The information about the backend ports.

object

Details about the backend ports.

FromPortstring

The first port in the range of ports that are used by the backend server to receive requests.

This parameter is returned only if an HTTPS listener is configured and the listener port is the same as the service port of the backend server.

80
ToPortstring

The last port in the range of ports that are used by the backend server to receive requests.

80
Certificatesarray<object>

The SSL certificates.

object

The SSL certificates.

Typestring

The type of the SSL certificate.

Only Server may be returned, which indicates a server certificate.

Server
Idstring

The ID of the SSL certificate.

449****-cn-hangzhou
Protocolstring

The network transmission protocol that is used by the listener. Valid values:

  • tcp: TCP.
  • udp: UDP.
  • http: HTTP.
  • https: HTTPS.
tcp
ListenerIdstring

The ID of the listener.

lsr-bp1bpn0kn908w4nbw****
ClientAffinitystring

Indicates whether client affinity is enabled for the listener.

  • If NONE is returned, client affinity is disabled. Requests from the same client may be forwarded to different endpoints.
  • If SOURCE_IP is returned, client affinity is enabled. When a client accesses stateful applications, requests from the same client are forwarded to the same endpoint regardless of the source port or protocol.
SOURCE_IP
Namestring

The name of the listener.

Listener
RelatedAclsarray<object>

The information about the access control list (ACL) that is associated with the listener.

object
AclIdstring

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

123
Statusstring

Indicates whether the access control feature is enabled. Valid values:

  • on: enabled.
  • off: disabled.
off
AclTypestring

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 are suitable for scenarios in which you want to allow only specific IP addresses to access an application. If a whitelist is improperly configured, risks may arise. After a whitelist is configured for a listener, only requests from the IP addresses that are added to the whitelist are distributed by the listener. If the whitelist is enabled but no IP addresses are added to the ACL, the listener does not forward requests.
  • black: a blacklist. All requests from the IP addresses or CIDR blocks in the ACL are blocked. Blacklists are suitable for scenarios in which you want to deny access from specific IP addresses to an application. If the blacklist is enabled but no IP addresses are added to the ACL, the listener forwards all requests.

This parameter is returned only if the value of Status is on.

white
AcceleratorIdstring

The ID of the GA instance.

ga-bp1odcab8tmno0hdq****
ProxyProtocolboolean

Indicates whether the client IP address preservation feature is enabled. Valid values:

  • true You can view the source IP addresses of clients over the backend service.
  • false
false
XForwardedForConfigobject

The configurations of the XForward headers.

XForwardedForGaIdEnabledboolean

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

  • true
  • false
Note This parameter is returned only for HTTP and HTTPS listeners.
false
XForwardedForGaApEnabledboolean

Indicates whether the GA-AP header is used to retrieve information about acceleration regions. Valid values:

  • true
  • false
Note This parameter is returned only for HTTP and HTTPS listeners.
false
XForwardedForProtoEnabledboolean

Indicates whether the GA-X-Forward-Proto header is used to retrieve the listener protocol of the GA instance. Valid values:

  • true
  • false
Note This parameter is returned only for HTTP and HTTPS listeners.
false
XForwardedForPortEnabledboolean

Indicates whether the GA-X-Forward-Port header is used to retrieve the listener ports of the GA instance. Valid values:

  • true
  • false
Note This parameter is returned only for HTTP and HTTPS listeners.
false
XRealIpEnabledboolean

Indicates whether the X-Real-IP header is used to retrieve client IP addresses. Valid values:

  • true
  • false
Note This parameter is returned only for HTTP and HTTPS listeners.
false
SecurityPolicyIdstring

The ID of the security policy.

  • tls_cipher_policy_1_0

    • Supported Transport Layer Security (TLS) versions: TLS 1.0, TLS 1.1, and TLS 1.2.
    • Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA.
  • tls_cipher_policy_1_1

    • Supported TLS versions: TLS 1.1 and TLS 1.2.
    • Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA.
  • tls_cipher_policy_1_2

    • Supported TLS version: TLS 1.2.
    • Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA.
  • tls_cipher_policy_1_2_strict

    • Supported TLS version: TLS 1.2.
    • Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, ECDHE-RSA-AES128-SHA, and ECDHE-RSA-AES256-SHA.
  • tls_cipher_policy_1_2_strict_with_1_3

    • Supported TLS versions: TLS 1.2 and TLS 1.3.
    • Supported cipher suites: TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256, TLS_AES_128_CCM_SHA256, TLS_AES_128_CCM_8_SHA256, ECDHE-ECDSA-AES128-GCM-SHA256, ECDHE-ECDSA-AES256-GCM-SHA384, ECDHE-ECDSA-AES128-SHA256, ECDHE-ECDSA-AES256-SHA384, ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, ECDHE-ECDSA-AES128-SHA, ECDHE-ECDSA-AES256-SHA, ECDHE-RSA-AES128-SHA, and ECDHE-RSA-AES256-SHA.
Note This parameter is returned only for HTTPS listeners.
tls_cipher_policy_1_0
Typestring

The routing type of the listener. Valid values:

  • Standard: intelligent routing.
  • CustomRouting: custom routing.
Standard
ServiceIdstring

The ID of the service that manages the instance.

Note This parameter is returned only if the value of ServiceManaged is true.
ALB
ServiceManagedboolean

Indicates whether the instance is managed. Valid values:

  • true
  • false
true
ServiceManagedInfosarray<object>

The actions that users can perform on the managed instance.

Note
  • This parameter is returned only if the value of ServiceManaged is true.
  • Users can perform only specific actions on a managed instance.
  • object

    A list of action policies that users can execute on this managed instance.

    Actionstring

    The name of the action on the managed instance. Valid values:

    • Create
    • Update
    • Delete
    • Associate
    • UserUnmanaged
    • CreateChild
    Update
    ChildTypestring

    The type of the child resource. Valid values:

    • Listener: a listener.
    • IpSet: an acceleration region.
    • EndpointGroup: an endpoint group.
    • ForwardingRule: a forwarding rule.
    • Endpoint: an endpoint.
    • EndpointGroupDestination: a protocol mapping of an endpoint group associated with a custom routing listener.
    • EndpointPolicy: a traffic policy of an endpoint associated with a custom routing listener.
    Note This parameter is returned only if the value of Action is CreateChild.
    Listener
    IsManagedboolean

    Indicates whether the specified actions are managed.

    • true: The specified actions are managed, and users cannot perform the specified actions on the managed instance.
    • false: The specified actions are not managed, and users can perform the specified actions on the managed instance.
    false
    IdleTimeoutinteger

    The timeout period of idle connections. Unit: seconds.

    900
    RequestTimeoutinteger

    The timeout period of HTTP or HTTPS requests. Unit: seconds.

    Note This parameter is returned only for HTTP and HTTPS listeners. If no responses are received from the backend server within the specified timeout period, GA returns the HTTP 504 error code to the client.
    60
    HttpVersionstring

    The maximum version of the HTTP protocol. Valid values:

    • http3
    • http2
    • http1.1
    Note This parameter is returned only for HTTPS listeners.
    http2

    Examples

    Sample success responses

    JSONformat

    {
      "Description": "Listener",
      "RequestId": "6FEA0CF3-D3B9-43E5-A304-D217037876A8\t",
      "State": "active",
      "CreateTime": "1577786252000",
      "PortRanges": [
        {
          "FromPort": 20,
          "ToPort": 20
        }
      ],
      "BackendPorts": [
        {
          "FromPort": "80",
          "ToPort": "80"
        }
      ],
      "Certificates": [
        {
          "Type": "Server",
          "Id": "449****-cn-hangzhou"
        }
      ],
      "Protocol": "tcp",
      "ListenerId": "lsr-bp1bpn0kn908w4nbw****",
      "ClientAffinity": "SOURCE_IP",
      "Name": "Listener",
      "RelatedAcls": [
        {
          "AclId": "123",
          "Status": "off"
        }
      ],
      "AclType": "white",
      "AcceleratorId": "ga-bp1odcab8tmno0hdq****",
      "ProxyProtocol": false,
      "XForwardedForConfig": {
        "XForwardedForGaIdEnabled": false,
        "XForwardedForGaApEnabled": false,
        "XForwardedForProtoEnabled": false,
        "XForwardedForPortEnabled": false,
        "XRealIpEnabled": false
      },
      "SecurityPolicyId": "tls_cipher_policy_1_0",
      "Type": "Standard",
      "ServiceId": "ALB",
      "ServiceManaged": true,
      "ServiceManagedInfos": [
        {
          "Action": "Update",
          "ChildType": "Listener",
          "IsManaged": false
        }
      ],
      "IdleTimeout": 900,
      "RequestTimeout": 60,
      "HttpVersion": "http2"
    }

    Error codes

    HTTP status codeError codeError messageDescription
    400NotExist.Listenerlistener %s is not existThe listener %s does not exist.
    500UnknownErrorAn error occurred while processing your request. Please try again. If the error persists, please submit a ticket.An error occurred while the request was being processed. Try again later.

    For a list of error codes, visit the Service error codes.

    Change history

    Change timeSummary of changesOperation
    2024-03-27The Error code has changed. The response structure of the API has changedView Change Details
    2023-11-06The Error code has changed. The response structure of the API has changedView Change Details
    2023-08-15The Error code has changed. The response structure of the API has changedView Change Details
    2023-04-06The Error code has changedView Change Details
    2021-04-27The Error code has changed. The response structure of the API has changedView Change Details