All Products
Search
Document Center

Server Load Balancer:ListLoadBalancers

Last Updated:Dec 05, 2025

Lists Gateway Load Balancer (GWLB) instances.

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 supports 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:ListLoadBalancers

list

LoadBalancer

acs:gwlb:{#regionId}:{#accountId}:loadbalancer/*

LoadBalancer

acs:gwlb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}

VPC

acs:vpc:{#regionId}:{#accountId}:vpc/{#VpcId}

None

None

Request parameters

Parameter

Type

Required

Description

Example

ZoneIds

array

No

The list of zone IDs. You can query up to 20 zone IDs at a time.

string

No

The zone ID.

cn-beijing-h

VpcIds

array

No

The list of virtual private cloud (VPC) IDs. You can query up to 20 VPC IDs at a time.

string

No

The VPC ID.

vpc-bp1xuejaht4o7yhh2****

AddressIpVersion

string

No

The protocol version. Valid value:

  • Ipv4: IPv4.

Valid values:

  • IPv4 :

    IPv4

  • DualStack :

    Dual-stack

Ipv4

LoadBalancerStatus

string

No

The status of the GWLB instance. Valid values:

  • Active: The instance is running.

  • Inactive: The instance is stopped. In this state, the listener of the instance does not forward traffic.

  • Provisioning: The instance is being created.

  • Configuring: The instance is being modified.

Active

LoadBalancerBusinessStatus

string

No

The business status of the GWLB instance. Valid values:

  • Normal: The instance is running as expected.

  • FinancialLocked: The instance is locked due to an overdue payment.

Normal

LoadBalancerNames

array

No

The list of GWLB instance names. You can query up to 20 instance names at a time.

string

No

The name of the GWLB instance.

testGwlbName

ResourceGroupId

string

No

The ID of the resource group.

rg-aek2htf5qsyrn****

LoadBalancerIds

array

No

The list of GWLB instance IDs. You can query up to 20 instance IDs at a time.

string

No

The ID of the GWLB instance.

gwlb-cp6prgqy40hols****

TrafficMode

string

No

The traffic mode. Valid values:

  • LoadBalance: The instance is in load balancing mode.

  • ByPass: The instance is in bypass mode.

LoadBalance

Tag

array<object>

No

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

object

No

The tag object.

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:. It cannot contain http:// or https://.

testTagKey

Value

string

No

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

testTagValue

NextToken

string

No

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 NextToken has a value, the value is the token that is used for the next query.

WyJyb290IiwibiIsIm4iLDEsMCwxNjg1MDY1NTgyNzYwLCI2NDcwMGY2ZTc2Zjc0MWFiZGEyZjQyNzc4ZDk2MmJkOTk3ZGZmM2Nm****

MaxResults

integer

No

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

20

Skip

integer

No

The number of entries to skip.

1

Response elements

Element

Type

Description

Example

object

LoadBalancers

array<object>

The list of GWLB instances.

array<object>

The GWLB instance.

AddressIpVersion

string

The protocol version. Valid value:

  • IPv4: IPv4.

IPv4

CreateTime

string

The time when the resource was created. The time is displayed in UTC and follows the yyyy-MM-ddTHH:mm:ssZ format.

2024-08-05T18:24:07Z

LoadBalancerBusinessStatus

string

The business status of the GWLB instance. Valid values:

  • Normal: The instance is running as expected.

  • FinancialLocked: The instance is locked due to an overdue payment.

Normal

LoadBalancerId

string

The ID of the GWLB instance.

gwlb-9njtjmqt7zfcqm****

LoadBalancerName

string

The name of the GWLB instance.

The name must be 2 to 128 characters in length, start with a letter or a Chinese character, and can contain digits, periods (.), underscores (_), and hyphens (-).

testGwlbName

LoadBalancerStatus

string

The status of the GWLB instance. Valid values:

  • Active: The instance is running.

  • Inactive: The instance is stopped. In this state, the listener of the instance does not forward traffic.

  • Provisioning: The instance is being created.

  • Configuring: The instance is being modified.

Active

ResourceGroupId

string

The ID of the resource group.

rg-aek26jasguy****

Tags

array<object>

The list of tags.

object

The tag.

Key

string

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:. It cannot contain http:// or https://.

testTagKey

Value

string

The tag value. 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, must start with a letter or a Chinese character, and can contain digits, periods (.), underscores (_), and hyphens (-). The tag value cannot start with aliyun or acs:, and cannot contain http:// or https://.

testTagValue

VpcId

string

The VPC ID.

vpc-uf6eg0vndlsa84n7r****

ZoneMappings

array<object>

The list of mappings between zones and vSwitches. You must add at least one zone and can add up to 20 zones. If the current region supports two or more zones, we recommend that you add two or more zones.

array<object>

The mapping between a zone and a vSwitch.

LoadBalancerAddresses

array<object>

The list of addresses of the GWLB instance.

object

The address of the GWLB instance.

EniId

string

The ID of the elastic network interface (ENI).

eni-bp17qv9zbzyqy629****

PrivateIpv4Address

string

The private IPv4 address.

192.168.XX.XX

VSwitchId

string

The vSwitch in the zone. Each zone uses a vSwitch and a subnet by default.

vsw-2zemule5dz7okwqfv****

ZoneId

string

The zone ID. You can call the DescribeZones operation to query the most recent zone list.

cn-hangzhou-g

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:

  • You do not need to specify this parameter for the first request or if no subsequent request is to be sent.

  • If a subsequent query is to be sent, set the value to the `NextToken` value that is returned from the previous API call.

CAESGgoSChAKDGNvbXBsZXRlVGltZRABCgQiAggAGAAiQAoJAIldD2UAAAAACjMDLgAAADFTNzMyZDMwMzAzMDY5NzQzNDM0NmI3NzM2NjUzNzc4NzM2YTc0NjYzOTYz****

RequestId

string

The request ID.

378A80E9-4262-5D8E-8D62-0969E52D7358

TotalCount

integer

The total number of entries returned.

100

Examples

Success response

JSON format

{
  "LoadBalancers": [
    {
      "AddressIpVersion": "IPv4",
      "CreateTime": "2024-08-05T18:24:07Z",
      "LoadBalancerBusinessStatus": "Normal",
      "LoadBalancerId": "gwlb-9njtjmqt7zfcqm****",
      "LoadBalancerName": "testGwlbName",
      "LoadBalancerStatus": "Active",
      "ResourceGroupId": "rg-aek26jasguy****",
      "Tags": [
        {
          "Key": "testTagKey",
          "Value": "testTagValue"
        }
      ],
      "VpcId": "vpc-uf6eg0vndlsa84n7r****",
      "ZoneMappings": [
        {
          "LoadBalancerAddresses": [
            {
              "EniId": "eni-bp17qv9zbzyqy629****",
              "PrivateIpv4Address": "192.168.XX.XX"
            }
          ],
          "VSwitchId": "vsw-2zemule5dz7okwqfv****",
          "ZoneId": "cn-hangzhou-g"
        }
      ]
    }
  ],
  "MaxResults": 20,
  "NextToken": "CAESGgoSChAKDGNvbXBsZXRlVGltZRABCgQiAggAGAAiQAoJAIldD2UAAAAACjMDLgAAADFTNzMyZDMwMzAzMDY5NzQzNDM0NmI3NzM2NjUzNzc4NzM2YTc0NjYzOTYz****",
  "RequestId": "378A80E9-4262-5D8E-8D62-0969E52D7358",
  "TotalCount": 100
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.