All Products
Search
Document Center

Server Load Balancer:ListLoadBalancers

Last Updated:Dec 12, 2024

Queries Gateway Load Balancer (GWLB) instances.

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:ListLoadBalancerslist
*LoadBalancer
acs:gwlb:{#regionId}:{#accountId}:loadbalancer/*
*LoadBalancer
acs:gwlb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
*VPC
acs:vpc:{#regionId}:{#accountId}:vpc/{#VpcId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ZoneIdsarrayNo

The zone IDs. You can query at most 20 zone IDs in each call.

stringNo

The zone ID of the cluster.

cn-beijing-h
VpcIdsarrayNo

The virtual private cloud (VPC) IDs. You can query at most 20 IDs in each call.

VpcIdstringNo

The VPC ID.

vpc-bp1xuejaht4o7yhh2****
AddressIpVersionstringNo

The IP version. Valid values:

  • Ipv4: IPv4

Enumeration values:

  • IPv4: IPv4
  • DualStack: DualStack
IPv4
LoadBalancerStatusstringNo

The GWLB instance status. Valid values:

  • Active: The GWLB instance is running.
  • Inactive: The GWLB instance is disabled. Listeners of GWLB instances in the Inactive state do not forward traffic.
  • Provisioning: The GWLB instance is being created.
  • Configuring: The GWLB instance is being modified.
Active
LoadBalancerBusinessStatusstringNo

The business status of the GWLB instance. Valid values:

  • Normal: running as expected
  • FinancialLocked: locked due to overdue payments
Normal
LoadBalancerNamesarrayNo

The GWLB instance names. You can specify at most 20 GWLB instance names in each call.

LoadBalancerNamestringNo

The GWLB instance name.

testGwlbName
ResourceGroupIdstringNo

The resource group ID.

rg-aek2htf5qsyrn****
LoadBalancerIdsarrayNo

The GWLB instance IDs. You can query at most 20 GWLB instances in each call.

LoadBalancerIdstringNo

The GWLB instance ID.

gwlb-cp6prgqy40hols****
Tagarray<object>No

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

TagModelobjectNo

The information about 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://.

testTagKey
ValuestringNo

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

testTagValue
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.
WyJyb290IiwibiIsIm4iLDEsMCwxNjg1MDY1NTgyNzYwLCI2NDcwMGY2ZTc2Zjc0MWFiZGEyZjQyNzc4ZDk2MmJkOTk3ZGZmM2Nm****
MaxResultsintegerNo

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

20
SkipintegerNo

The number of entries to be skipped in the call.

1

Response parameters

ParameterTypeDescriptionExample
object
LoadBalancersarray<object>

The GWLB instances.

Dataobject

The information about the GWLB instances.

AddressIpVersionstring

The IP version. Valid values:

  • IPv4
IPv4
CreateTimestring

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

2024-08-05 18:24:07
LoadBalancerBusinessStatusstring

The business status of the GWLB instance. Valid values:

  • Normal: running as expected
  • FinancialLocked: locked due to overdue payments
Normal
LoadBalancerIdstring

The GWLB instance ID.

gwlb-9njtjmqt7zfcqm****
LoadBalancerNamestring

The GWLB instance name.

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

testGwlbName
LoadBalancerStatusstring

The GWLB instance status. Valid values:

  • Active: The GWLB instance is running.
  • Inactive: The GWLB instance is disabled. Listeners of GWLB instances in the Inactive state do not forward traffic.
  • Provisioning: The GWLB instance is being created.
  • Configuring: The GWLB instance is being modified.
Active
ResourceGroupIdstring

The resource group ID.

rg-aek26jasguy****
Tagsarray<object>

The tags.

TagModelobject

The information about the tag.

Keystring

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://.

testTagKey
Valuestring

The tag value. You can specify at most 20 tag values. The tag value cannot be an empty string.

The tag value can be up to 128 characters in length. It must start with a letter and can contain digits, periods (.), underscores (_), and hyphens (-). It cannot start with aliyun or acs:, and cannot contain http:// or https://.

testTagValue
VpcIdstring

The VPC ID.

vpc-uf6eg0vndlsa84n7r****
ZoneMappingsarray<object>

The mappings between zones and vSwitches. You must specify at least one zone. You can specify at most 20 zones. If the region supports two or more zones, specify at least two zones.

ZoneEniModelobject

The information about the zones and vSwitches.

LoadBalancerAddressesarray<object>

The GWLB instance addresses.

EniModelsobject

The information about the GWLB instance addresses.

EniIdstring

The ID of the elastic network interface (ENI) used by the GWLB instance.

eni-bp17qv9zbzyqy629****
PrivateIpv4Addressstring

The private IPv4 address.

192.168.XX.XX
VSwitchIdstring

The ID of the vSwitch in the zone. By default, each zone contains one vSwitch and one subnet.

vsw-2zemule5dz7okwqfv****
ZoneIdstring

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

cn-hangzhou-g
MaxResultsinteger

The number of entries per page. 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.
  • You must specify the token that is obtained from the previous query as the value of NextToken.
CAESGgoSChAKDGNvbXBsZXRlVGltZRABCgQiAggAGAAiQAoJAIldD2UAAAAACjMDLgAAADFTNzMyZDMwMzAzMDY5NzQzNDM0NmI3NzM2NjUzNzc4NzM2YTc0NjYzOTYz****
RequestIdstring

The request ID.

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

The total number of entries returned.

100

Examples

Sample success responses

JSONformat

{
  "LoadBalancers": [
    {
      "AddressIpVersion": "IPv4",
      "CreateTime": "2024-08-05 18:24:07",
      "LoadBalancerBusinessStatus": "Normal",
      "LoadBalancerId": "gwlb-9njtjmqt7zfcqm****\n",
      "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

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