Queries the details of a Network Load Balancer (NLB) listener.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
nlb:GetListenerAttribute |
get |
*LoadBalancer
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ListenerId |
string |
Yes |
The listener ID. |
lsn-bp1bpn0kn908w4nbw****@233 |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run, without sending the actual request. Valid values:
|
false |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among all requests. ClientToken can contain only ASCII characters. Note
If you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId is different for each request. |
123e4567-e89b-12d3-a456-426655440000 |
| RegionId |
string |
No |
The region ID of the NLB instance. You can call the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The operation to query the attributes of a listener. |
||
| RequestId |
string |
The ID of the request. |
CEF72CEB-54B6-4AE8-B225-F876FF7BA984 |
| RegionId |
string |
The ID of the region where the NLB instance is deployed. |
cn-hangzhou |
| LoadBalancerId |
string |
The ID of the NLB instance. |
nlb-83ckzc8d4xlp8o**** |
| ListenerId |
string |
The ID of the listener. |
lsn-bp1bpn0kn908w4nbw****@233 |
| ListenerProtocol |
string |
The listening protocol. Valid values: TCP, UDP, and TCPSSL. |
TCPSSL |
| ListenerPort |
integer |
The listening port. Valid values: 0 to 65535. A value of 0 specifies all ports. If you set the value to 0, you must also set the StartPort and EndPort parameters. |
233 |
| StartPort |
string |
The first port in the listening port range. Valid values: 0 to 65535. |
233 |
| EndPort |
string |
The last port in the listening port range. Valid values: 0 to 65535. The number of the last port must be smaller than that of the first port. |
455 |
| ListenerDescription |
string |
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 (-). |
tcpssl_443 |
| ServerGroupId |
string |
The ID of the server group. |
sgp-ppdpc14gdm3x4o**** |
| IdleTimeout |
integer |
The timeout period of an idle connection. Unit: seconds. Valid values: 1 to 900. |
900 |
| SecurityPolicyId |
string |
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. |
tls_cipher_policy_1_0 |
| CertificateIds |
array |
The server certificates. Only one server certificate is supported. Note
This parameter takes effect only for listeners that use SSL over TCP. |
|
|
string |
The server certificates. |
123157****** |
|
| CaCertificateIds |
array |
The CA certificates. Only one CA certificate is supported. Note
This parameter takes effect only for listeners that use SSL over TCP. |
|
|
string |
The CA certificates. Only one CA certificate is supported. Note
This parameter takes effect only for listeners that use SSL over TCP. |
139a00****** |
|
| CaEnabled |
boolean |
Indicates whether mutual authentication is enabled. Valid values:
|
false |
| AlpnEnabled |
boolean |
Indicates whether Application-Layer Protocol Negotiation (ALPN) is enabled. Valid values:
|
false |
| AlpnPolicy |
string |
The ALPN policy. Valid values:
|
HTTP1Only |
| ProxyProtocolEnabled |
boolean |
Indicates whether the Proxy protocol is used to pass client IP addresses to backend servers. Valid values:
|
false |
| ProxyProtocolV2Config |
object |
Indicates whether the Proxy protocol passes the VpcId, PrivateLinkEpId, and PrivateLinkEpsId parameters to backend servers. |
|
| Ppv2VpcIdEnabled |
boolean |
Indicates whether the Proxy protocol passes the VpcId parameter to backend servers. Valid values:
|
false |
| Ppv2PrivateLinkEpIdEnabled |
boolean |
Indicates whether the Proxy protocol passes the PrivateLinkEpId parameter to backend servers. Valid values:
|
false |
| Ppv2PrivateLinkEpsIdEnabled |
boolean |
Indicates whether the Proxy protocol passes the PrivateLinkEpsId parameter to backend servers. Valid values:
|
false |
| SecSensorEnabled |
boolean |
Indicates whether fine-grained monitoring is enabled. Valid values:
|
false |
| ListenerStatus |
string |
The status of the listener. Valid values:
|
Running |
| Cps |
integer |
The maximum number of new connections per second supported by the listener in each zone (virtual IP address). Valid values: 0 to 1000000. 0 indicates that the number of connections is unlimited. |
1000 |
| Mss |
integer |
The size of the largest TCP segment. Unit: bytes. Valid values: 0 to 1500. 0 specifies that the maximum segment size remains unchanged. Note
This parameter is supported only by listeners that use SSL over TCP. |
166 |
| Tags |
array<object> |
The tags. |
|
|
object |
The tags for the execution. |
||
| TagKey |
string |
The tag key. |
ac-cus-tag-4 |
| TagValue |
string |
The tag value. |
ON |
Examples
Success response
JSON format
{
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984",
"RegionId": "cn-hangzhou",
"LoadBalancerId": "nlb-83ckzc8d4xlp8o****",
"ListenerId": "lsn-bp1bpn0kn908w4nbw****@233",
"ListenerProtocol": "TCPSSL",
"ListenerPort": 233,
"StartPort": "233",
"EndPort": "455",
"ListenerDescription": "tcpssl_443",
"ServerGroupId": "sgp-ppdpc14gdm3x4o****",
"IdleTimeout": 900,
"SecurityPolicyId": "tls_cipher_policy_1_0",
"CertificateIds": [
"123157******"
],
"CaCertificateIds": [
"139a00******"
],
"CaEnabled": false,
"AlpnEnabled": false,
"AlpnPolicy": "HTTP1Only",
"ProxyProtocolEnabled": false,
"ProxyProtocolV2Config": {
"Ppv2VpcIdEnabled": false,
"Ppv2PrivateLinkEpIdEnabled": false,
"Ppv2PrivateLinkEpsIdEnabled": false
},
"SecSensorEnabled": false,
"ListenerStatus": "Running",
"Cps": 1000,
"Mss": 166,
"Tags": [
{
"TagKey": "ac-cus-tag-4",
"TagValue": "ON"
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | SystemBusy | System is busy, please try again later. | |
| 404 | ResourceNotFound.loadBalancer | The specified resource of loadbalancer is not found. | The specified load balancer resource was not found. Please check the input parameters. |
| 404 | ResourceNotFound.listener | The specified resource %s is not found. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.