All Products
Search
Document Center

Server Load Balancer:ListListeners

Last Updated:Aug 06, 2025

Queries listeners for Gateway Load Balancers.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that support authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

gwlb:ListListeners

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ListenerIds

array

No

The listener IDs. You can specify up to 20 listener IDs.

string

No

The listener ID.

lsn-w3t3vpgjj12b2i****

LoadBalancerIds

array

No

The IDs of the Gateway Load Balancer (GWLB) instances. You can specify up to 20 instance IDs.

string

No

The ID of the Gateway Load Balancer (GWLB) instance.

gwlb-rbtjolkkbudmrr****

NextToken

string

No

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

  • If NextToken is empty, no subsequent query is performed.

  • If a value is returned for NextToken, the value is the token that is used for the next query.

d209f4e63ec942c967c50c888a13****

MaxResults

integer

No

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

20

Tag

array<object>

No

The tags. You can specify up to 20 tags in each call.

object

No

The tag.

Key

string

No

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

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

tagKey

Value

string

No

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

tagValue

Skip

integer

No

The number of entries to skip for a paged query.

10

Response parameters

Parameter

Type

Description

Example

object

The returned data.

Listeners

array<object>

A list of listeners for the Gateway Load Balancer (GWLB) instance.

object

The information about the listener.

ListenerDescription

string

The description of the listener.

listener-description

ListenerId

string

The listener ID.

lsn-vu7folhh5ntm8u****

ListenerStatus

string

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

LoadBalancerId

string

The ID of the Gateway Load Balancer (GWLB) instance.

gwlb-uf6hbeh795xlqln7g****

ServerGroupId

string

The server group ID.

sgp-5yapcb422i51ru****

TcpIdleTimeout

integer

The timeout period of an idle TCP connection.

350

Tags

array<object>

The tags.

object

The tags.

Key

string

The tag key.

testKey

Value

string

The tag value.

testValue

MaxResults

integer

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

20

NextToken

string

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

  • If NextToken is empty, no subsequent query is performed.

  • If a value is returned for NextToken, the value is the token that is used for the next query.

5c281c0a0d6bfb6355ed088c2108aca8e0b5e8707e68****

RequestId

string

The request ID.

7DBFC67C-A272-5952-8287-6C3EBE4E04D9

TotalCount

integer

The total number of entries.

8

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

400 MissingParam.TagKey The param of TagKey is missing. The parameter of tag key is missing.
400 DuplicatedParam.TagKey The param of %s is duplicated. The parameter of tag key is duplicated.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.