All Products
Search
Document Center

Server Load Balancer:ListListeners

Last Updated:Dec 02, 2024

Queries Gateway Load Balancer (GWLB) listeners.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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
gwlb:ListListenerslist
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ListenerIdsarrayNo

The listener IDs. You can specify at most 20 listener IDs.

ListenerIdstringNo

The listener ID.

lsn-w3t3vpgjj12b2i****
LoadBalancerIdsarrayNo

The GWLB instance IDs. You can specify at most 20 instance IDs.

LoadBalancerIdstringNo

The GWLB instance ID.

gwlb-rbtjolkkbudmrr****
NextTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results. Valid values:

  • If NextToken is empty, no next page exists.
  • If a value of NextToken is returned, the value indicates the token that is used for the next query.
d209f4e63ec942c967c50c888a13****
MaxResultsintegerNo

The maximum number of results to be returned from a single query when the NextToken parameter is used in the query. Valid values: 1 to 1000. Default value: 20.

20
Tagarray<object>No

The tags. You can specify at most 20 tags in each call.

TagModelobjectNo

The tag.

KeystringNo

The tag key. The tag key cannot be an empty string.

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

tagKey
ValuestringNo

The tag value. The tag value can be up to 256 characters in length and cannot contain http:// or https://.

tagValue
SkiplongNo

The number of entries to be skipped in the call.

10

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

Listenersarray<object>

The GWLB listeners.

listenerobject

The information about the listeners.

ListenerDescriptionstring

The description of the listener.

listener-description
ListenerIdstring

The listener ID.

lsn-vu7folhh5ntm8u****
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.
  • Deleting: The listener is being deleted.
Running
LoadBalancerIdstring

The GWLB instance ID.

gwlb-uf6hbeh795xlqln7g****
ServerGroupIdstring

The server group ID.

sgp-5yapcb422i51ru****
Tagsarray<object>

The tags.

TagModelobject

The tags.

Keystring

The tag key.

testKey
Valuestring

The tag value.

testValue
MaxResultsinteger

The maximum number of results to be returned from a single query when the NextToken parameter is used in the query. Valid values: 1 to 1000. Default value: 20.

20
NextTokenstring

A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:

  • If NextToken is empty, no next page exists.
  • If a value of NextToken is returned, the value indicates the token that is used for the next query.
5c281c0a0d6bfb6355ed088c2108aca8e0b5e8707e68****
RequestIdstring

The request ID.

7DBFC67C-A272-5952-8287-6C3EBE4E04D9
TotalCountinteger

The total number of entries returned.

8

Examples

Sample success responses

JSONformat

{
  "Listeners": [
    {
      "ListenerDescription": "listener-description",
      "ListenerId": "lsn-vu7folhh5ntm8u****",
      "ListenerStatus": "Running",
      "LoadBalancerId": "gwlb-uf6hbeh795xlqln7g****",
      "ServerGroupId": "sgp-5yapcb422i51ru****",
      "Tags": [
        {
          "Key": "testKey",
          "Value": "testValue"
        }
      ]
    }
  ],
  "MaxResults": 20,
  "NextToken": "5c281c0a0d6bfb6355ed088c2108aca8e0b5e8707e68****",
  "RequestId": "7DBFC67C-A272-5952-8287-6C3EBE4E04D9",
  "TotalCount": 8
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParam.TagKeyThe param of TagKey is missing.The parameter of tag key is missing.
400DuplicatedParam.TagKeyThe param of %s is duplicated.The parameter of tag key is duplicated.

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