Queries the details of a listener on a Network Load Balancer (NLB) instance.
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 only precheck the request. Valid values:
|
false |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can generate the parameter value from your client to ensure that it is unique among different requests. The ClientToken parameter supports only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the RequestId of the API request as the ClientToken. The RequestId of each API request is different. |
123e4567-e89b-12d3-a456-426655440000 |
| RegionId |
string |
No |
The region ID of the Network Load Balancer (NLB) instance. You can invoke the DescribeRegions operation to query region IDs. |
cn-hangzhou |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The listener attributes. |
||
| AlpnEnabled |
boolean |
Specifies whether Application-Layer Protocol Negotiation (ALPN) is enabled. Valid values:
|
false |
| AlpnPolicy |
string |
The ALPN policy. Valid values:
|
HTTP1Only |
| CaCertificateIds |
array |
The CA certificate list. Currently, you can add only one CA certificate. Note
This parameter takes effect only for TCPSSL listeners. |
|
|
string |
The CA certificate list. Currently, you can add only one CA certificate. Note
This parameter takes effect only for TCPSSL listeners. |
139a00****** |
|
| CaEnabled |
boolean |
Specifies whether mutual authentication is enabled. Valid values:
|
false |
| CertificateIds |
array |
The server certificate list. Currently, you can add only one server certificate. Note
This parameter takes effect only for TCPSSL listeners. |
|
|
string |
The server certificate list. Currently, you can add only one server certificate. Note
This parameter takes effect only for TCPSSL listeners. |
123157****** |
|
| Cps |
integer |
The maximum number of new connections per second that the listener can process in each zone (VIP). Valid values: 0 to 1000000. 0 indicates that no limit is applied. |
1000 |
| EndPort |
string |
The end port of the all-port listener. Valid values: 0 to 65535. The end port must be less than the start port. |
455 |
| IdleTimeout |
integer |
The idle timeout period for connections. Unit: seconds. |
900 |
| ListenerDescription |
string |
The custom listener name. The name must be 2 to 256 characters in length, and can contain Chinese characters and English letters. It can also contain digits, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-). |
tcpssl_443 |
| ListenerId |
string |
The listener ID. |
lsn-bp1bpn0kn908w4nbw****@233 |
| ListenerPort |
integer |
The listener port. Valid values: 0 to 65535. 0 indicates that all-port listening is used. If you set this parameter to 0, you must configure StartPort and EndPort. |
233 |
| ListenerProtocol |
string |
The listener protocol. Valid values: TCP, UDP, and TCPSSL. |
TCPSSL |
| ListenerStatus |
string |
The current status of the listener. Valid values:
|
Running |
| LoadBalancerId |
string |
The Network Load Balancer (NLB) instance ID. |
nlb-83ckzc8d4xlp8o**** |
| Mss |
integer |
The maximum segment size (MSS) of a TCP packet. Unit: bytes. Valid values: 0 to 1500. 0 indicates that the MSS value of user TCP packets is not modified. Note
This field is supported only by TCP and TCPSSL listeners. |
166 |
| ProxyProtocolEnabled |
boolean |
Specifies whether to use the Proxy Protocol to pass the client source IP address to backend servers. Valid values:
|
false |
| ProxyProtocolV2Config |
object |
The configuration for passing the VpcId, PrivateLinkEpId, and PrivateLinkEpsId information to backend servers by using the Proxy Protocol. |
|
| Ppv2CnIdEnabled |
boolean |
Specifies whether to use the Proxy Protocol to pass the CN-ID to backend servers. Valid values:
|
false |
| Ppv2PrivateLinkEpIdEnabled |
boolean |
Specifies whether to use the Proxy Protocol to pass the PrivateLinkEpId to backend servers. Valid values:
|
false |
| Ppv2PrivateLinkEpsIdEnabled |
boolean |
Specifies whether to use the Proxy Protocol to pass the PrivateLinkEpsId to backend servers. Valid values:
|
false |
| Ppv2VpcIdEnabled |
boolean |
Specifies whether to use the Proxy Protocol to pass the VpcId to backend servers. Valid values:
|
false |
| RegionId |
string |
The region ID of the Network Load Balancer (NLB) instance. |
cn-hangzhou |
| RequestId |
string |
The request ID. |
CEF72CEB-54B6-4AE8-B225-F876FF7BA984 |
| SecSensorEnabled |
boolean |
Specifies whether to enable the second-level monitoring feature. Valid values:
|
false |
| SecurityPolicyId |
string |
The security policy ID. System security policies and custom security policies are supported.
Note
This parameter takes effect only for TCPSSL listeners. |
tls_cipher_policy_1_0 |
| ServerGroupId |
string |
The server group ID. |
sgp-ppdpc14gdm3x4o**** |
| StartPort |
string |
The start port of the all-port listener. Valid values: 0 to 65535. |
233 |
| Tags |
array<object> |
The tag list. |
|
|
object |
The tag. |
||
| TagKey |
string |
The tag key. |
ac-cus-tag-4 |
| TagValue |
string |
The tag value. |
ON |
Examples
Success response
JSON format
{
"AlpnEnabled": false,
"AlpnPolicy": "HTTP1Only",
"CaCertificateIds": [
"139a00******"
],
"CaEnabled": false,
"CertificateIds": [
"123157******"
],
"Cps": 1000,
"EndPort": "455",
"IdleTimeout": 900,
"ListenerDescription": "tcpssl_443",
"ListenerId": "lsn-bp1bpn0kn908w4nbw****@233",
"ListenerPort": 233,
"ListenerProtocol": "TCPSSL",
"ListenerStatus": "Running",
"LoadBalancerId": "nlb-83ckzc8d4xlp8o****",
"Mss": 166,
"ProxyProtocolEnabled": false,
"ProxyProtocolV2Config": {
"Ppv2CnIdEnabled": false,
"Ppv2PrivateLinkEpIdEnabled": false,
"Ppv2PrivateLinkEpsIdEnabled": false,
"Ppv2VpcIdEnabled": false
},
"RegionId": "cn-hangzhou",
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984",
"SecSensorEnabled": false,
"SecurityPolicyId": "tls_cipher_policy_1_0",
"ServerGroupId": "sgp-ppdpc14gdm3x4o****",
"StartPort": "233",
"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. | The system is busy. 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. | The resource %s does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.