Queries the details of a listener.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | GetListenerAttribute | The operation that you want to perform. Set the value to GetListenerAttribute. |
ListenerId | String | Yes | lsn-bp1bpn0kn908w4nbw**** | The listener ID. |
DryRun | Boolean | No | false | Specifies whether to perform only a dry run, without performing the actual request. Valid values:
|
ClientToken | String | No | 123e4567-e89b-12d3-a456-426655440000 | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters. Note If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request. |
RegionId | String | No | cn-hangzhou | The region ID of the Network Load Balancer (NLB) instance. You can call the DescribeRegions operation to query the most recent region list. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | CEF72CEB-54B6-4AE8-B225-F876FF7BA984 | The request ID. |
RegionId | String | cn-hangzhou | The region ID of the NLB instance. |
LoadBalancerId | String | nlb-83ckzc8d4xlp8o**** | The ID of the NLB instance. |
ListenerId | String | lsn-ga6sjjcll6ou34l1et**** | The listener ID. |
ListenerProtocol | String | TCPSSL | The listener protocol. Valid values: TCP, UDP, and TCPSSL. |
ListenerPort | Integer | 233 | The listener port. Valid values: 0 to 65535. A value of 0 indicates all ports. If the value is set to 0, StartPort and EndPort must be set. |
StartPort | String | 233 | The first port in the listener port range. Valid values: 0 to 65535. |
EndPort | String | 455 | The last port in the listener port range. Valid values: 0 to 65535. The number of the last port must be greater than the number of the first port. |
ListenerDescription | String | tcpssl_443 | The name of the listener. The name must be 2 to 256 characters in length, and can contain letters, digits, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-). |
ServerGroupId | String | sgp-ppdpc14gdm3x4o**** | The server group ID. |
IdleTimeout | Integer | 900 | The timeout period of idle connections. Unit: seconds. Valid values: 1 to 900. |
SecurityPolicyId | String | tls_cipher_policy_1_0 | The ID of the security policy. System security policies and custom security policies are supported.
Note This parameter takes effect only for listeners that use SSL over TCP. |
CertificateIds | Array of String | 12315790212_166f8204689_1714763408_70998**** | The server certificates. Only one server certificate is supported. Note This parameter takes effect only for listeners that use SSL over TCP. |
CaCertificateIds | Array of String | 139a00604ad-cn-east-hangzh**** | The certificate authority (CA) certificates. Only one CA certificate is supported. Note This parameter takes effect only for listeners that use SSL over TCP. |
CaEnabled | Boolean | false | Indicates whether mutual authentication is enabled. Valid values:
|
AlpnEnabled | Boolean | false | Indicates whether Application-Layer Protocol Negotiation (ALPN) is enabled. Valid values:
|
AlpnPolicy | String | HTTP1Only | The ALPN policy. Valid values:
|
ProxyProtocolEnabled | Boolean | false | Indicates whether the Proxy protocol is used to pass client IP addresses to backend servers. Valid values:
|
SecSensorEnabled | Boolean | false | Indicates whether fine-grained monitoring is enabled. Valid values:
|
ListenerStatus | String | Running | The status of the listener. Valid values:
|
Cps | Integer | 1000 | The maximum number of connections that can be created per second on the NLB instance. Valid values: 0 to 1000000. 0 indicates that the number of connections per second is unlimited. |
Mss | Integer | 166 | The maximum size of a TCP segment. Unit: bytes. Valid values: 0 to 1500. 0 indicates that the maximum segment size remains unchanged. Note This parameter is supported only by TCP listeners and listeners that use SSL over TCP. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=GetListenerAttribute
&ListenerId=lsn-bp1bpn0kn908w4nbw****
&DryRun=false
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&RegionId=cn-hangzhou
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<GetListenerAttributeResponse>
<RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
<RegionId>cn-hangzhou</RegionId>
<LoadBalancerId>nlb-83ckzc8d4xlp8o****</LoadBalancerId>
<ListenerId>lsn-ga6sjjcll6ou34l1et****</ListenerId>
<ListenerProtocol>TCPSSL</ListenerProtocol>
<ListenerPort>233</ListenerPort>
<StartPort>233</StartPort>
<EndPort>455</EndPort>
<ListenerDescription>tcpssl_443</ListenerDescription>
<ServerGroupId>sgp-ppdpc14gdm3x4o****</ServerGroupId>
<IdleTimeout>900</IdleTimeout>
<SecurityPolicyId>tls_cipher_policy_1_0</SecurityPolicyId>
<CertificateIds>12315790212_166f8204689_1714763408_70998****</CertificateIds>
<CaCertificateIds>139a00604ad-cn-east-hangzh****</CaCertificateIds>
<CaEnabled>false</CaEnabled>
<AlpnEnabled>false</AlpnEnabled>
<AlpnPolicy>HTTP1Only</AlpnPolicy>
<ProxyProtocolEnabled>false</ProxyProtocolEnabled>
<SecSensorEnabled>false</SecSensorEnabled>
<ListenerStatus>Running</ListenerStatus>
<Cps>1000</Cps>
<Mss>166</Mss>
</GetListenerAttributeResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "CEF72CEB-54B6-4AE8-B225-F876FF7BA984",
"RegionId" : "cn-hangzhou",
"LoadBalancerId" : "nlb-83ckzc8d4xlp8o****",
"ListenerId" : "lsn-ga6sjjcll6ou34l1et****",
"ListenerProtocol" : "TCPSSL",
"ListenerPort" : 233,
"StartPort" : "233",
"EndPort" : "455",
"ListenerDescription" : "tcpssl_443",
"ServerGroupId" : "sgp-ppdpc14gdm3x4o****",
"IdleTimeout" : 900,
"SecurityPolicyId" : "tls_cipher_policy_1_0",
"CertificateIds" : [ "12315790212_166f8204689_1714763408_70998****" ],
"CaCertificateIds" : [ "139a00604ad-cn-east-hangzh****" ],
"CaEnabled" : false,
"AlpnEnabled" : false,
"AlpnPolicy" : "HTTP1Only",
"ProxyProtocolEnabled" : "false",
"SecSensorEnabled" : "false",
"ListenerStatus" : "Running",
"Cps" : 1000,
"Mss" : 166
}
Error codes
For a list of error codes, visit the API Error Center.