All Products
Search
Document Center

Server Load Balancer:ListListeners

Last Updated:Mar 13, 2024

Queries listeners added to a Network Load Balancer (NLB) instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
nlb:ListListenersList
  • Listener
    acs:nlb:{#regionId}:{#accountId}:listener/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ListenerIdsarrayNo

The listener IDs.

stringNo

The ID of the listener. You can specify at most 20 IDs.

lsn-bp1bpn0kn908w4nbw****
LoadBalancerIdsarrayNo

The ID of the NLB instance. You can query up to 20 NLB instances at a time.

stringNo

The ID of the NLB instance. You can specify at most 20 IDs.

nlb-83ckzc8d4xlp8o****
ListenerProtocolstringNo

The listening protocol. Valid values: TCP, UDP, and TCPSSL.

TCPSSL
Tagobject []No

The tags.

KeystringNo

The key of the tag. 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 contain http:// or https://. It cannot start with aliyun or acs:.

env
ValuestringNo

The value of the tag. You can specify up to 10 tag values.

The tag value can be up to 128 characters in length, and cannot contain http:// or https://. It cannot start with aliyun or acs:.

product
NextTokenstringNo

The token that is used for the next query. Valid values:

  • If this is your first query or no next query is to be sent, ignore this parameter.
  • If a next query is to be sent, set the parameter to the value of NextToken that is returned from the last call.
NextToken FFmyTO70tTpLG6I3FmYAXGKPd****
MaxResultsintegerNo

The number of entries to return on each page. Valid values: 1 to 100. Default value: 20.

20
RegionIdstringNo

The ID of the region where the NLB instance is deployed.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

Queries listeners.

RequestIdstring

The ID of the request.

CEF72CEB-54B6-4AE8-B225-F876FF7BA984
Listenersobject []

A list of listeners.

Tagsobject []

A list of tags.

Keystring

The tag key.

Created
Valuestring

The tag value.

TF
LoadBalancerIdstring

The CLB instance ID.

nlb-83ckzc8d4xlp8o****
ListenerIdstring

The listener ID.

lsn-ga6sjjcll6ou34l1et****
ListenerProtocolstring

The listener protocol. Valid values: TCP, UDP, and TCPSSL.

TCPSSL
ListenerPortinteger

The information about the listener port of your server.

443
StartPortstring

The first port in the listener port range.

233
EndPortstring

The last port in the listener port range.

455
ListenerDescriptionstring

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
ServerGroupIdstring

The server group ID.

sgp-ppdpc14gdm3x4o****
IdleTimeoutinteger

The timeout period of idle connections. Unit: seconds. Valid values: 1 to 900. Default value: 900.

900
SecurityPolicyIdstring

The ID of the security policy.

Note This parameter takes effect only for listeners that use SSL over TCP.
tls_cipher_policy_1_1
CertificateIdsarray

The server certificate.

Note This parameter takes effect only for listeners that use SSL over TCP.
string

The server certificate.

Note This parameter takes effect only for listeners that use SSL over TCP.
12315790212_166f8204689_1714763408_70998****
CaCertificateIdsarray

A list of CA certificates.

Note This parameter takes effect only for listeners that use SSL over TCP.
string

A list of CA certificates.

Note This parameter takes effect only for listeners that use SSL over TCP.
139a00604ad-cn-east-hangzh****
CaEnabledboolean

Indicates whether mutual authentication is enabled. Valid values:

  • true
  • false
false
ListenerStatusstring

The status of the listener. Valid values:

  • Provisioning: The listener is being created.
  • Running: The listener is running.
  • Configuring: The listener is being configured.
  • Stopping: The listener is being stopped.
  • Stopped: The listener is stopped.
  • Starting: The listener is being started.
  • Deleting: The listener is being deleted.
  • Deleted: The listener is deleted.
Running
RegionIdstring

The region ID of the NLB instance.

cn-hangzhou
AlpnEnabledboolean

Indicates whether Application-Layer Protocol Negotiation (ALPN) is enabled. Valid values:

  • true
  • false
false
AlpnPolicystring

The ALPN policy. Valid values:

  • HTTP1Only
  • HTTP2Only
  • HTTP2Preferred
  • HTTP2Optional
HTTP1Only
SecSensorEnabledboolean

Indicates whether fine-grained monitoring is enabled. Valid values:

  • true
  • false
false
ProxyProtocolEnabledboolean

Indicates whether the Proxy protocol passes source client IP addresses to backend servers. Valid values:

  • true
  • false
false
ProxyProtocolV2Configobject

Indicates whether the Proxy protocol passes the VpcId, PrivateLinkEpId, and PrivateLinkEpsId parameters to backend servers.

Ppv2VpcIdEnabledboolean

Indicates whether the Proxy protocol passes the VpcId parameter to backend servers. Valid values:

  • true
  • false
false
Ppv2PrivateLinkEpIdEnabledboolean

Indicates whether the Proxy protocol passes the PrivateLinkEpId parameter to backend servers. Valid values:

  • true
  • false
false
Ppv2PrivateLinkEpsIdEnabledboolean

Indicates whether the Proxy protocol passes the PrivateLinkEpsId parameter to backend servers. Valid values:

  • true
  • false
false
Cpsinteger

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 is unlimited.

1000
Mssinteger

The size of the largest TCP packet segment. Unit: bytes. Valid values: 0 to 1500. 0 indicates that the Mss value of TCP packets remains unchanged.

Note This parameter takes effect only for listeners that use SSL over TCP.
200
TotalCountinteger

The number of entries returned.

4
NextTokenstring

The token that is used for the next query. Valid values:

  • If NextToken is empty, it indicates that no next query is to be sent.
  • If a value of NextToken is returned, the value is the token used for the next query.
FFmyTO70tTpLG6I3FmYAXGKPd****
MaxResultsinteger

The number of entries returned per page.

20

Examples

Sample success responses

JSONformat

{
  "RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984",
  "Listeners": [
    {
      "Tags": [
        {
          "Key": "Created",
          "Value": "TF"
        }
      ],
      "LoadBalancerId": "nlb-83ckzc8d4xlp8o****",
      "ListenerId": "lsn-ga6sjjcll6ou34l1et****",
      "ListenerProtocol": "TCPSSL",
      "ListenerPort": 443,
      "StartPort": "233",
      "EndPort": "455",
      "ListenerDescription": "tcpssl_443",
      "ServerGroupId": "sgp-ppdpc14gdm3x4o****",
      "IdleTimeout": 900,
      "SecurityPolicyId": "tls_cipher_policy_1_1",
      "CertificateIds": [
        "12315790212_166f8204689_1714763408_70998****"
      ],
      "CaCertificateIds": [
        "139a00604ad-cn-east-hangzh****"
      ],
      "CaEnabled": false,
      "ListenerStatus": "Running",
      "RegionId": "cn-hangzhou",
      "AlpnEnabled": false,
      "AlpnPolicy": "HTTP1Only",
      "SecSensorEnabled": false,
      "ProxyProtocolEnabled": false,
      "ProxyProtocolV2Config": {
        "Ppv2VpcIdEnabled": false,
        "Ppv2PrivateLinkEpIdEnabled": false,
        "Ppv2PrivateLinkEpsIdEnabled": false
      },
      "Cps": 1000,
      "Mss": 200
    }
  ],
  "TotalCount": 4,
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "MaxResults": 20
}

Error codes

HTTP status codeError codeError messageDescription
400SystemBusySystem is busy, please try again later.-
403Forbidden.NoPermissionAuthentication is failed for NoPermission.Authentication is failed for NoPermission.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-02-29The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
2023-12-12The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
Output ParametersThe response structure of the API has changed.
2023-11-27The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
Output ParametersThe response structure of the API has changed.
2023-09-26The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 403
    Added Error Codes: 400
2023-09-05The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 403 change
2023-08-22The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Added Error Codes: 403
2023-06-29The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: Tag
Output ParametersThe response structure of the API has changed.