Queries a list of listeners.
Operation description
This operation queries the listeners of a Global Accelerator (GA) instance. The query returns the routing type, status, creation timestamp, and port information for each listener.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ga:ListListeners |
list |
*Listener
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the GA instance. Set the value to cn-hangzhou. |
cn-hangzhou |
| PageNumber |
integer |
No |
The page number. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page. Maximum value: 50. Default value: 10. |
10 |
| AcceleratorId |
string |
Yes |
The ID of the GA instance. |
ga-bp1odcab8tmno0hdq**** |
| Protocol |
string |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The list of returned information. |
||
| TotalCount |
integer |
The number of entries returned. |
1 |
| Listeners |
array<object> |
The listener information. |
|
|
array<object> |
The listener information. |
||
| Certificates |
array<object> |
The SSL certificate information. |
|
|
object |
The SSL certificate information. |
||
| 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 backend server port information. |
|
|
object |
The backend server port information. |
||
| FromPort |
string |
The start port of the backend server. |
80 |
| ToPort |
string |
The end port of the backend server. |
80 |
| ListenerId |
string |
The listener ID. |
lsr-bp1bpn0kn908w4nbw**** |
| Description |
string |
The description of the listener. |
Listener |
| State |
string |
The status of the listener.
|
active |
| ClientAffinity |
string |
Client affinity.
|
SOURCE_IP |
| Protocol |
string |
The network transport protocol of the listener.
|
TCP |
| CreateTime |
integer |
The timestamp that indicates when the listener was created. Unit: milliseconds. |
1577786252000 |
| PortRanges |
array<object> |
The listener port information. |
|
|
object |
The listener port information. |
||
| 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 enabled to preserve client IP addresses.
|
true |
| AcceleratorId |
string |
The ID of the GA instance. |
ga-bp1odcab8tmno0hdq**** |
| XForwardedForConfig |
object |
The configuration of the |
|
| XForwardedForGaIdEnabled |
boolean |
Indicates whether the
Note
This parameter is available only for HTTP and HTTPS listeners. |
false |
| XRealIpEnabled |
boolean |
Indicates whether the
Note
This parameter is available only for HTTP and HTTPS listeners. |
false |
| XForwardedForGaApEnabled |
boolean |
Indicates whether the
Note
This parameter is available only for HTTP and HTTPS listeners. |
false |
| XForwardedForProtoEnabled |
boolean |
Indicates whether the
Note
This parameter is available only for HTTP and HTTPS listeners. |
false |
| XForwardedForPortEnabled |
boolean |
Indicates whether the
Note
This parameter is available only for HTTP and HTTPS listeners. |
false |
| SecurityPolicyId |
string |
The ID of the security policy.
Note
This parameter is available only for HTTPS listeners. |
tls_cipher_policy_1_0 |
| Type |
string |
The routing type of the listener.
|
Standard |
| ServiceId |
string |
The ID of the service that manages the instance. Note
This parameter is returned only when ServiceManaged is set to True. |
ALB |
| ServiceManaged |
boolean |
Indicates whether the instance is a managed instance. Valid values:
|
true |
| ServiceManagedInfos |
array<object> |
The actions that you can perform on the managed instance. Note
|
|
|
object |
The actions that you can perform on the managed instance. |
||
| Action |
string |
The name of the action on the managed instance. Valid values:
|
Update |
| ChildType |
string |
The type of the child resource. Valid values:
Note
This parameter is returned only when Action is set to CreateChild. |
Listener |
| IsManaged |
boolean |
Indicates whether the action is managed. Valid values:
|
false |
| IdleTimeout |
integer |
The timeout period of idle connections. Unit: seconds. |
900 |
| RequestTimeout |
integer |
The timeout period for HTTP or HTTPS requests. Unit: seconds. Note
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:
Note
This parameter is available only for HTTPS listeners. |
http2 |
| PageSize |
integer |
The number of entries per page. |
10 |
| RequestId |
string |
The request ID. |
6FEA0CF3-D3B9-43E5-A304-D217037876A8 |
| PageNumber |
integer |
The page number. |
1 |
Examples
Success response
JSON format
{
"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 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. | An error occurred while the request was being processed. Try again later. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.