Queries information about a specified listener of a Global Accelerator (GA) instance.
Description
This API operation is used to query information about a specified listener of a GA instance. The information includes the status of the listener, the timestamp that indicates when the listener was created, and the listener ports.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeListener |
The operation that you want to perform. Set the value to DescribeListener. |
RegionId | String | Yes | cn-hangzhou |
The ID of the region where the GA instance is deployed. Set the value to cn-hangzhou. |
ListenerId | String | Yes | lsr-bp1bpn0kn908w4nbw**** |
The ID of the listener that you want to query. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Description | String | Listener |
The description of the listener. |
RequestId | String | 6FEA0CF3-D3B9-43E5-A304-D217037876A8 |
The ID of the request. |
State | String | active |
The status of the listener. Valid values:
|
CreateTime | String | 1577786252000 |
The timestamp that indicates when the listener was created. |
PortRanges | Array of PortRanges |
The information about the listener ports. |
|
FromPort | Integer | 20 |
The starting listener port that is used to receive and forward requests to endpoints. Note You can configure only one listener port for an HTTP or HTTPS listener. In this case,
the starting and ending listener ports are the same.
|
ToPort | Integer | 20 |
The ending listener port that is used to receive and forward requests to endpoints. |
BackendPorts | Array of BackendPort |
The information about the backend ports. |
|
FromPort | String | 80 |
The starting port that is used by the backend server to receive requests. This parameter is returned only when you configure an HTTPS listener and the listener port is the same port used by the backend server to provide services. |
ToPort | String | 80 |
The ending port that is used by the backend server to receive requests. |
Certificates | Array of Certificate |
The SSL certificates. |
|
Type | String | Server |
The type of the certificate. Only Server can be returned, which indicates a server certificate. |
Id | String | 449****-cn-hangzhou |
The ID of the SSL certificate. |
Protocol | String | TCP |
The network transmission protocol that is used by the listener. Valid values:
|
ListenerId | String | lsr-bp1bpn0kn908w4nbw**** |
The ID of the listener. |
ClientAffinity | String | SOURCE_IP |
Indicates whether client affinity is enabled for the listener.
|
Name | String | Listener |
The name of the listener. |
RelatedAcls | Array of relatedAcls |
The information about the access control list (ACL) that is associated with the listener. |
|
AclId | String | 123 |
The ID of the ACL that is associated with the listener. |
Status | String | off |
Indicates whether the access control feature is enabled. Valid values:
|
AclType | String | white |
The type of the ACL. Valid values:
If the value of Status is on, this parameter is returned. |
AcceleratorId | String | ga-bp1odcab8tmno0hdq**** |
The ID of the GA instance. |
ProxyProtocol | Boolean | false |
Indicates whether client IP addresses are preserved. Valid values:
|
XForwardedForConfig | Object |
The configuration of the |
|
XForwardedForGaIdEnabled | Boolean | false |
Indicates whether the
Note Only HTTP and HTTPS listeners support this parameter.
|
XForwardedForGaApEnabled | Boolean | false |
Indicates whether the
Note Only HTTP and HTTPS listeners support this parameter.
|
XForwardedForProtoEnabled | Boolean | false |
Indicates whether the
Note Only HTTP and HTTPS listeners support this parameter.
|
XForwardedForPortEnabled | Boolean | false |
Indicates whether the
Note Only HTTP and HTTPS listeners support this parameter.
|
XRealIpEnabled | Boolean | false |
Indicates whether the
Note Only HTTP and HTTPS listeners support this parameter.
|
SecurityPolicyId | String | tls_cipher_policy_1_0 |
The ID of the security policy. Valid values:
Note Only HTTPS listeners support this parameter.
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeListener
&RegionId=cn-hangzhou
&ListenerId=lsr-bp1bpn0kn908w4nbw****
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeListenerResponse>
<Description>Listener</Description>
<RequestId>6FEA0CF3-D3B9-43E5-A304-D217037876A8 </RequestId>
<State>active</State>
<CreateTime>1577786252000</CreateTime>
<PortRanges>
<FromPort>20</FromPort>
<ToPort>20</ToPort>
</PortRanges>
<BackendPorts>
<FromPort>80</FromPort>
<ToPort>80</ToPort>
</BackendPorts>
<Certificates>
<Type>Server</Type>
<Id>449****-cn-hangzhou</Id>
</Certificates>
<Protocol>TCP</Protocol>
<ListenerId>lsr-bp1bpn0kn908w4nbw****</ListenerId>
<ClientAffinity>SOURCE_IP</ClientAffinity>
<Name>Listener</Name>
<RelatedAcls>
<AclId>123</AclId>
<Status>off</Status>
</RelatedAcls>
<AclType>white</AclType>
<AcceleratorId>ga-bp1odcab8tmno0hdq****</AcceleratorId>
<ProxyProtocol>false</ProxyProtocol>
<XForwardedForConfig>
<XForwardedForGaIdEnabled>false</XForwardedForGaIdEnabled>
<XForwardedForGaApEnabled>false</XForwardedForGaApEnabled>
<XForwardedForProtoEnabled>false</XForwardedForProtoEnabled>
<XForwardedForPortEnabled>false</XForwardedForPortEnabled>
<XRealIpEnabled>false</XRealIpEnabled>
</XForwardedForConfig>
<SecurityPolicyId>tls_cipher_policy_1_0</SecurityPolicyId>
</DescribeListenerResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"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"
}
Error codes
For a list of error codes, visit the API Error Center.