All Products
Search
Document Center

Global Accelerator:ListListeners

Last Updated:Jun 10, 2026

Mengambil daftar Pendengar.

Deskripsi operasi

This operation retrieves the listeners of a Global Accelerator instance. The response includes the routing type, status, creation timestamp, and port details for each listener.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

ga:ListListeners

list

*Listener

acs:ga:{#regionId}:{#accountId}:listener/*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

RegionId

string

Yes

ID Wilayah tempat instans Akselerator Global di-deploy. Atur nilainya ke ap-southeast-1.

cn-hangzhou

PageNumber

integer

No

Nomor halaman. Nilai default: 1.

1

PageSize

integer

No

Jumlah entri per halaman. Nilai maksimum: 50. Nilai default: 10.

10

AcceleratorId

string

Yes

ID instans Akselerator Global.

ga-bp1odcab8tmno0hdq****

Protocol

string

No

Protokol lapisan Transport yang digunakan oleh Pendengar dari daftar.

HTTP

Elemen respons

Element

Type

Description

Example

object

A list of returned information.

TotalCount

integer

The total number of entries returned.

1

Listeners

array<object>

The details of the listeners.

array<object>

The details of the listener.

Certificates

array<object>

The details of the SSL certificate.

object

The details of the SSL certificate.

Type

string

The type of the certificate.

Only Server is returned, which indicates a server certificate.

Server

Id

string

The ID of the SSL certificate.

44983xxxx-cn-hangzhou

BackendPorts

array<object>

The port mapping of the backend server.

object

The port mapping of the backend server.

FromPort

string

The start port of the backend server.

80

ToPort

string

The end port of the backend server.

80

ListenerId

string

The ID of the listener.

lsr-bp1bpn0kn908w4nbw****

Description

string

The description of the listener.

Listener

State

string

The status of the listener.

  • active: The listener is running.

  • init: The listener is being initialized.

  • updating: The listener is being updated.

  • deleting: The listener is being deleted.

active

ClientAffinity

string

Client affinity.

  • NONE: Client affinity is disabled. Requests from the same client are not always routed to the same endpoint.

  • SOURCE_IP: Client affinity is enabled. When a client accesses a stateful application, all requests from the same client are routed to the same endpoint regardless of the source port or protocol.

SOURCE_IP

Protocol

string

The transport layer protocol used by the listener.

  • TCP: TCP.

  • UDP: UDP.

  • HTTP: HTTP.

  • HTTPS: HTTPS.

TCP

CreateTime

integer

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

1577786252000

PortRanges

array<object>

The listener port range.

object

The listener port range.

FromPort

integer

The start port of the listener port range that is used to receive and forward requests to endpoints.

20

ToPort

integer

The end port of the listener port range that is used to receive and forward requests to endpoints.

20

Name

string

The name of the listener.

Listener

ProxyProtocol deprecated

boolean

Indicates whether the proxy protocol is used to preserve client IP addresses.

  • true: The proxy protocol is used to preserve client IP addresses. After you enable the proxy protocol, you can retrieve the source IP addresses of clients from the backend servers.

  • false: The proxy protocol is not used to preserve client IP addresses.

true

AcceleratorId

string

The ID of the Global Accelerator instance.

ga-bp1odcab8tmno0hdq****

XForwardedForConfig

object

The configuration of the XForward fields.

XForwardedForGaIdEnabled

boolean

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

  • true: Yes.

  • false: No.

Catatan

This parameter is available only for HTTP and HTTPS listeners.

false

XRealIpEnabled

boolean

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

  • true: Yes.

  • false: No.

Catatan

This parameter is available only for HTTP and HTTPS listeners.

false

XForwardedForGaApEnabled

boolean

Indicates whether the GA-AP header is used to retrieve the acceleration region information.

  • true: Yes.

  • false: No.

Catatan

This parameter is available only for HTTP and HTTPS listeners.

false

XForwardedForProtoEnabled

boolean

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

  • true: Yes.

  • false: No.

Catatan

This parameter is available only for HTTP and HTTPS listeners.

false

XForwardedForPortEnabled

boolean

Indicates whether the GA-X-Forward-Port header is used to retrieve the listener port of the GA instance.

  • true: Yes.

  • false: No.

Catatan

This parameter is available only for HTTP and HTTPS listeners.

false

SecurityPolicyId

string

The ID of the security policy instance.

  • tls_cipher_policy_1_0

    • Supported TLS versions: TLSv1.0, TLSv1.1, and TLSv1.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: TLSv1.1 and TLSv1.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: TLSv1.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: TLSv1.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: TLSv1.2 and TLSv1.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.

Catatan

This parameter is available only for HTTPS listeners.

tls_cipher_policy_1_0

Type

string

The routing type of the listener.

  • Standard: smart routing.

  • CustomRouting: custom routing.

Standard

ServiceId

string

The ID of the service that manages the instance.

Catatan

This parameter is returned only if ServiceManaged is set to True.

ALB

ServiceManaged

boolean

Indicates whether the instance is a managed instance. Valid values:

  • true: The instance is a managed instance.

  • false: The instance is not a managed instance.

true

ServiceManagedInfos

array<object>

The actions that you can perform on the managed instance.

Catatan
  • This parameter is returned only if ServiceManaged is set to True.

  • When an instance is managed, you cannot perform some operations on the instance.

object

The actions that you can perform on the managed instance.

Action

string

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

  • Create: Create an instance.

  • Update: Update the current instance.

  • Delete: Delete the current instance.

  • Associate: Associate the current instance with another instance.

  • UserUnmanaged: Unmanage the instance.

  • CreateChild: Create a child resource in the current instance.

Update

ChildType

string

The type of the child resource. Valid values:

  • Listener: listener.

  • IpSet: acceleration region.

  • EndpointGroup: endpoint group.

  • ForwardingRule: forwarding rule.

  • Endpoint: endpoint.

  • EndpointGroupDestination: a protocol mapping of an endpoint group for a custom routing listener.

  • EndpointPolicy: a traffic policy for an endpoint of a custom routing listener.

Catatan

This parameter is returned only when Action is set to CreateChild.

Listener

IsManaged

boolean

Indicates whether the action is managed. Valid values:

  • true: The action is managed. You cannot perform the specified action on the managed instance.

  • false: The action is not managed. You can perform the specified action on the managed instance.

false

IdleTimeout

integer

The timeout period of idle connections. Unit: seconds.

900

RequestTimeout

integer

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

Catatan

This parameter is available only for HTTP and HTTPS listeners. If a backend server does not respond within the timeout period, Global Accelerator returns an HTTP 504 error to the client.

60

HttpVersion

string

The maximum version of the HTTP protocol. Valid values:

  • http3: HTTP/3.

  • http2: HTTP/2.

  • http1.1: HTTP/1.1.

Catatan

This parameter is available only for HTTPS listeners.

http2

PageSize

integer

The number of entries returned per page.

10

RequestId

string

The ID of the request.

6FEA0CF3-D3B9-43E5-A304-D217037876A8

PageNumber

integer

The page number of the returned page.

1

Contoh

Respons sukses

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
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

500 UnknownError An error occurred while processing your request. Please try again. If the error persists, please submit a ticket.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.