All Products
Search
Document Center

Global Accelerator:ListListeners

Last Updated:Apr 10, 2024

Queries the listeners of a Global Accelerator (GA) instance.

Operation description

This operation is used to query information about the listeners of a GA instance, including the status of each listener, the timestamp that indicates when each 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:ListListenersList
  • Listener
    acs:ga:{#regionId}:{#accountId}:listener/*
    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
PageNumberintegerNo

The page number. Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Valid values: 1 to 50. Default value: 10.

10
AcceleratorIdstringYes

The ID of the GA instance.

ga-bp1odcab8tmno0hdq****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

TotalCountinteger

The total number of entries returned.

1
Listenersobject []

The information about the listeners.

Certificatesobject []

The information about 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.

44983xxxx-cn-hangzhou
BackendPortsobject []

The range of ports that are used by backend servers.

FromPortstring

The first port in the range of ports that are used by backend servers.

80
ToPortstring

The last port in the range of ports that are used by backend servers.

80
ListenerIdstring

The ID of the listener.

lsr-bp1bpn0kn908w4nbw****
Descriptionstring

The description of the listener.

Listener
Statestring

The status of the listener. Valid values:

  • active
  • init
  • updating
  • deleting
active
ClientAffinitystring

Indicates whether client affinity is enabled for the listener.

  • If NONE is returned, client affinity is disabled. When 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
Protocolstring

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

  • tcp
  • udp
  • http
  • https
tcp
CreateTimelong

The timestamp that indicates when the listener was created. Unit: milliseconds.

1577786252000
PortRangesobject []

The information about the listener ports.

FromPortinteger

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

20
ToPortinteger

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

20
Namestring

The name of the listener.

Listener
ProxyProtocolboolean

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

  • true: Client IP address preservation is enabled. This feature allows you to view client IP addresses on backend servers.
  • false: Client IP address preservation is disabled.
true
AcceleratorIdstring

The ID of the GA instance.

ga-bp1odcab8tmno0hdq****
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
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
XForwardedForGaApEnabledboolean

Indicates whether the GA-AP header is used to retrieve the 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
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
ServiceManagedInfosobject []

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.
  • 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: listener.
    • IpSet: acceleration region.
    • EndpointGroup: endpoint group.
    • ForwardingRule: forwarding rule.
    • Endpoint: endpoint.
    • EndpointGroupDestination: protocol mapping of an endpoint group associated with a custom routing listener.
    • EndpointPolicy: traffic policy of an endpoint associated with a custom routing listener.
    Note This parameter takes effect 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 timeout period, GA returns an 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
    PageSizeinteger

    The number of entries per page.

    10
    RequestIdstring

    The request ID.

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

    The page number.

    1

    Examples

    Sample success responses

    JSONformat

    {
      "TotalCount": 1,
      "Listeners": [
        {
          "Certificates": [
            {
              "Type": "Server",
              "Id": "44983xxxx-cn-hangzhou"
            }
          ],
          "BackendPorts": [
            {
              "FromPort": "80",
              "ToPort": "80"
            }
          ],
          "ListenerId": "lsr-bp1bpn0kn908w4nbw****",
          "Description": "Listener",
          "State": "active",
          "ClientAffinity": "SOURCE_IP",
          "Protocol": "tcp",
          "CreateTime": 1577786252000,
          "PortRanges": [
            {
              "FromPort": 20,
              "ToPort": 20
            }
          ],
          "Name": "Listener",
          "ProxyProtocol": true,
          "AcceleratorId": "ga-bp1odcab8tmno0hdq****",
          "XForwardedForConfig": {
            "XForwardedForGaIdEnabled": false,
            "XRealIpEnabled": false,
            "XForwardedForGaApEnabled": false,
            "XForwardedForProtoEnabled": false,
            "XForwardedForPortEnabled": 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"
        }
      ],
      "PageSize": 10,
      "RequestId": "6FEA0CF3-D3B9-43E5-A304-D217037876A8",
      "PageNumber": 1
    }

    Error codes

    HTTP status codeError codeError messageDescription
    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 changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      delete Error Codes: 500
    Output ParametersThe response structure of the API has changed.
    2023-11-06The Error code has changed. The response structure of the API has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      delete Error Codes: 500
    Output ParametersThe response structure of the API has changed.
    2023-08-15The Error code has changed. The response structure of the API has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      delete Error Codes: 500
    Output ParametersThe response structure of the API has changed.
    2023-07-20The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      delete Error Codes: 500