Queries the list of Network Load Balancer (NLB) listeners.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
nlb:ListListeners |
get |
*Listener
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ListenerIds |
array |
No |
The instance IDs. You can specify up to 20 instance IDs. |
|
|
string |
No |
The instance IDs. You can specify up to 20 instance IDs. |
lsn-bp1bpn0kn908w4nbw****@443 |
|
| LoadBalancerIds |
array |
No |
The IDs of the Network Load Balancer (NLB) instances. You can specify up to 20 instance IDs. |
|
|
string |
No |
The IDs of the Network Load Balancer (NLB) instances. You can specify up to 20 instance IDs. |
nlb-83ckzc8d4xlp8o**** |
|
| ListenerProtocol |
string |
No |
The listener protocol. Valid values: TCP, UDP, and TCPSSL. |
TCPSSL |
| Tag |
array<object> |
No |
The list of tags. |
|
|
object |
No |
The tag. |
||
| Key |
string |
No |
The tag key of the instance. You can specify up to 20 tag keys. The tag key cannot be an empty string. The tag key can be up to 64 characters in length, and cannot start with |
env |
| Value |
string |
No |
The tag value of the instance. You can specify up to 20 tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length, and cannot start with |
product |
| NextToken |
string |
No |
The pagination token. Valid values:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| MaxResults |
integer |
No |
The number of entries to return per page. Valid values: 1 to 100. Default value: 20. |
20 |
| RegionId |
string |
No |
The region ID of the Network Load Balancer (NLB) instance. You can invoke the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| SecSensorEnabled |
string |
No |
Specifies whether to enable second-level monitoring. Valid values:
|
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The list of listeners. |
||
| Listeners |
array<object> |
The list of Network Load Balancer (NLB) listeners. |
|
|
array<object> |
The list of Network Load Balancer (NLB) listeners. |
||
| AlpnEnabled |
boolean |
Indicates whether Application-Layer Protocol Negotiation (ALPN) is enabled. Valid values:
|
false |
| AlpnPolicy |
string |
The ALPN policy. Valid values:
|
HTTP1Only |
| CaCertificateIds |
array |
The list of CA certificates. Note
This parameter takes effect only for TCPSSL listeners. |
|
|
string |
The list of CA certificates. Note
This parameter takes effect only for TCPSSL listeners. |
139a00****** |
|
| CaEnabled |
boolean |
Indicates whether mutual authentication is enabled. Valid values:
|
false |
| CertificateIds |
array |
The list of server certificates. Note
This parameter takes effect only for TCPSSL listeners. |
|
|
string |
The list of server certificates. 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. A value of 0 indicates that no limit is applied. |
1000 |
| EndPort |
string |
The end port for all-port listening. |
455 |
| IdleTimeout |
integer |
The idle timeout period for connections. Unit: seconds. |
900 |
| ListenerDescription |
string |
The custom name of the listener. The name must be 2 to 256 characters in length and can contain Chinese characters, English letters, digits, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-). |
tcpssl_443 |
| ListenerId |
string |
The listener ID. |
lsn-ga6sjjcll6ou34l1et**** |
| ListenerPort |
integer |
The listener port. |
443 |
| ListenerProtocol |
string |
The listener protocol. Valid values: TCP, UDP, and TCPSSL. |
TCPSSL |
| ListenerStatus |
string |
The status of the listener. Valid values:
|
Running |
| LoadBalancerId |
string |
The ID of the Network Load Balancer (NLB) instance. |
nlb-83ckzc8d4xlp8o**** |
| Mss |
integer |
The maximum segment size (MSS) of TCP packets. Unit: bytes. Valid values: 0 to 1500. A value of 0 indicates that the MSS value of user TCP packets is not modified. Note
This parameter is supported only by TCP and TCPSSL listeners. |
200 |
| ProxyProtocolEnabled |
boolean |
Indicates whether the Proxy Protocol is enabled 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 |
Indicates whether the Common Name (CN) field of the client certificate is passed to backend servers by using Proxy Protocol V2. Note: This parameter takes effect only when the listener protocol is TCPSSL, mutual authentication (mTLS) is enabled, and Proxy Protocol V2 is enabled. Valid values:
|
false |
| Ppv2PrivateLinkEpIdEnabled |
boolean |
Indicates whether the Proxy Protocol is enabled to pass the PrivateLinkEpId to backend servers. Valid values:
|
false |
| Ppv2PrivateLinkEpsIdEnabled |
boolean |
Indicates whether the Proxy Protocol is enabled to pass the PrivateLinkEpsId to backend servers. Valid values:
|
false |
| Ppv2VpcIdEnabled |
boolean |
Indicates whether the Proxy Protocol is enabled to pass the VpcId to backend servers. Valid values:
|
false |
| RegionId |
string |
The region ID of the Network Load Balancer (NLB) instance. |
cn-hangzhou |
| SecSensorEnabled |
boolean |
Indicates whether second-level monitoring is enabled. Valid values:
|
false |
| SecurityPolicyId |
string |
The ID of the security policy. Note
This parameter takes effect only for TCPSSL listeners. |
tls_cipher_policy_1_1 |
| ServerGroupId |
string |
The ID of the server group. |
sgp-ppdpc14gdm3x4o**** |
| StartPort |
string |
The start port for all-port listening. |
233 |
| Tags |
array<object> |
The list of tags. |
|
|
object |
The tag. |
||
| Key |
string |
The tag key. |
Created |
| Value |
string |
The tag value. |
TF |
| MaxResults |
integer |
The number of entries returned per page. |
20 |
| NextToken |
string |
The pagination token. Valid values:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| RequestId |
string |
The request ID. |
CEF72CEB-54B6-4AE8-B225-F876FF7BA984 |
| TotalCount |
integer |
The total number of entries. |
4 |
Examples
Success response
JSON format
{
"Listeners": [
{
"AlpnEnabled": false,
"AlpnPolicy": "HTTP1Only",
"CaCertificateIds": [
"139a00******"
],
"CaEnabled": false,
"CertificateIds": [
"123157******"
],
"Cps": 1000,
"EndPort": "455",
"IdleTimeout": 900,
"ListenerDescription": "tcpssl_443",
"ListenerId": "lsn-ga6sjjcll6ou34l1et****",
"ListenerPort": 443,
"ListenerProtocol": "TCPSSL",
"ListenerStatus": "Running",
"LoadBalancerId": "nlb-83ckzc8d4xlp8o****",
"Mss": 200,
"ProxyProtocolEnabled": false,
"ProxyProtocolV2Config": {
"Ppv2CnIdEnabled": false,
"Ppv2PrivateLinkEpIdEnabled": false,
"Ppv2PrivateLinkEpsIdEnabled": false,
"Ppv2VpcIdEnabled": false
},
"RegionId": "cn-hangzhou",
"SecSensorEnabled": false,
"SecurityPolicyId": "tls_cipher_policy_1_1",
"ServerGroupId": "sgp-ppdpc14gdm3x4o****",
"StartPort": "233",
"Tags": [
{
"Key": "Created",
"Value": "TF"
}
]
}
],
"MaxResults": 20,
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984",
"TotalCount": 4
}
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. |
| 400 | IllegalParam | The param of %s is illegal. | The input parameters contain invalid values. Check the input. |
| 403 | Forbidden.NoPermission | Authentication is failed for NoPermission. | Authentication is failed for NoPermission. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.