All Products
Search
Document Center

Server Load Balancer:ListLoadBalancers

Last Updated:Oct 26, 2026

Queries a list of load balancing 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 VPC IDs. You can query up to 20 VPC IDs at a time.

string

No

The VPC ID.

vpc-bp1xuejaht4o7yhh2****

AddressIpVersion

string

No

The IP version. Valid values:

  • Ipv4: IPv4.

Valid values:

  • IPv4 :

    IPv4

  • DualStack :

    DualStack

Ipv4

LoadBalancerStatus

string

No

The instance status of the Gateway Load Balancer (GWLB). Valid values:

  • Active: The instance is running.

  • Inactive: The instance is stopped. Listeners of the instance no longer forward traffic.

  • Provisioning: The instance is being created.

  • Configuring: The instance is being upgraded or downgraded.

Active

LoadBalancerBusinessStatus

string

No

The business status of the Gateway Load Balancer (GWLB). Valid values:

  • Normal: The instance is in a normal state.

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

Normal

LoadBalancerNames

array

No

The list of Gateway Load Balancer (GWLB) instance names. You can query up to 20 instance names at a time.

string

No

The name of the Network Load Balancer (NLB) instance.

testGwlbName

ResourceGroupId

string

No

The ID of the resource group.

rg-aek2htf5qsyrn****

LoadBalancerIds

array

No

The list of Gateway Load Balancer (GWLB) instance IDs. You can query up to 20 instances at a time.

string

No

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

gwlb-cp6prgqy40hols****

TrafficMode

string

No

The traffic mode. Valid values:

  • LoadBalance: Load balancing.

  • ByPass: Bypass mode.

LoadBalance

Tag

array<object>

No

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

object

No

The tag object.

Key

string

No

The tag key. It cannot be an empty string.

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

testTagKey

Value

string

No

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

testTagValue

NextToken

string

No

The pagination token. Valid values:

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

  • If NextToken returns a value, the value is the token used to start the next query.

WyJyb290IiwibiIsIm4iLDEsMCwxNjg1MDY1NTgyNzYwLCI2NDcwMGY2ZTc2Zjc0MWFiZGEyZjQyNzc4ZDk2MmJkOTk3ZGZmM2Nm****

MaxResults

integer

No

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

20

Skip

integer

No

The number of entries to skip during the query.

1

Response elements

Element

Type

Description

Example

object

LoadBalancers

array<object>

The list of Gateway Load Balancer (GWLB) instances.

array<object>

The Gateway Load Balancer (GWLB) instance object.

AddressIpVersion

string

The IP version. Valid values:

  • IPv4: IPv4.

IPv4

CreateTime

string

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

2024-08-05T18:24:07Z

LoadBalancerBusinessStatus

string

The business status of the Gateway Load Balancer (GWLB). Valid values:

  • Normal: The instance is in a normal state.

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

Normal

LoadBalancerId

string

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

gwlb-9njtjmqt7zfcqm****

LoadBalancerName

string

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

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

testGwlbName

LoadBalancerStatus

string

The instance status of the Gateway Load Balancer (GWLB). Valid values:

  • Active: The instance is running.

  • Inactive: The instance is stopped. Listeners of the instance no longer forward traffic.

  • Provisioning: The instance is being created.

  • Configuring: The instance is being upgraded or downgraded.

Active

ResourceGroupId

string

The ID of the resource group.

rg-aek26jasguy****

Tags

array<object>

The list of tags.

object

The tag object.

Key

string

The tag key. It cannot be an empty string.

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

testTagKey

Value

string

The tag value. You can specify up to 20 tag values. This parameter can be an empty string.

A tag value can be up to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter or Chinese character. It 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 zone and vSwitch mappings. You must add at least one zone and can add up to 20 zones. If the current region supports two or more zones, add at least two zones.

array<object>

The zone and vSwitch mapping object.

LoadBalancerAddresses

array<object>

The list of Gateway Load Balancer (GWLB) instance addresses.

object

The Gateway Load Balancer (GWLB) instance address object.

EniId

string

The elastic network interface (ENI) ID.

eni-bp17qv9zbzyqy629****

PrivateIpv4Address

string

The private IPv4 address.

192.168.XX.XX

VSwitchId

string

The vSwitch associated with the zone. By default, each zone uses one vSwitch and one subnet.

vsw-2zemule5dz7okwqfv****

ZoneId

string

The zone ID. You can invoke the DescribeZones operation of Gateway Load Balancer (GWLB) to obtain the zone ID.

cn-hangzhou-g

MaxResults

integer

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

20

NextToken

string

The pagination token. Valid values:

  • If this is the first query or no subsequent query is available, you do not need to specify this parameter.

  • If a subsequent query is available, set this parameter to the NextToken value returned from the previous API call.

CAESGgoSChAKDGNvbXBsZXRlVGltZRABCgQiAggAGAAiQAoJAIldD2UAAAAACjMDLgAAADFTNzMyZDMwMzAzMDY5NzQzNDM0NmI3NzM2NjUzNzc4NzM2YTc0NjYzOTYz****

RequestId

string

The ID of the request.

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

TotalCount

integer

The total number of entries.

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.