Queries Classic Load Balancer (CLB) instances.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeLoadBalancers

The operation that you want to perform.

Set the value to DescribeLoadBalancers.

RegionId String Yes cn-hangzhou

The ID of the region where the CLB instance is deployed.

You can call the DescribeRegions operation to query the most recent region list.

ServerId String No vm-server-23****

The ID of the Elastic Compute Service (ECS) instance that is specified as a backend server of the CLB instance.

AddressIPVersion String No ipv4

The IP version. Valid values: ipv4 and ipv6.

LoadBalancerStatus String No active

The status of the CLB instance. Valid values:

  • inactive: If a CLB instance is in this state, the listeners that are added to the CLB instance do not forward traffic.
  • active: After you create a CLB instance, it is in the active state by default.
  • locked: The CLB instance is locked.
LoadBalancerId String No lb-bp1b6c719dfa****

The ID of the CLB instance.

You can specify up to 10 IDs in each request. Separate multiple IDs with commas (,).

LoadBalancerName String No lb-bp1o94dp5i6ea****

The name of the CLB instance.

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

You can specify up to 10 names in each request. Separate multiple names with commas (,).

ServerIntranetAddress String No 10.XX.XX.102

The private IP address of the ECS instance that is specified as a backend server of the CLB instance.

You can specify multiple IP addresses to query CLB instances. Separate multiple IP addresses with commas (,).

AddressType String No intranet

The network type of the CLB instance.

Valid values:

  • internet: After an Internet-facing CLB instance is created, the system allocates a public IP address to the CLB instance. Then, the CLB instance can forward requests from the Internet.
  • intranet: After an internal-facing CLB instance is created, the system allocates a private IP address to the CLB instance. Then, the CLB instance can forward only internal requests.
InternetChargeType String No paybybandwidth

The metering method of the Internet-facing CLB instance. Valid values:

  • paybybandwidth: pay-by-bandwidth
  • paybytraffic (default): pay-by-data-transfer
Note If the value of the PayType parameter is set to PrePay, only pay-by-bandwidth is supported.
VpcId String No vpc-bp1aevy8sof****

The ID of the virtual private cloud (VPC) to which the CLB instance belongs.

VSwitchId String No vsw-bp12mw1f8k3****

The ID of the vSwitch to which the CLB instance belongs.

NetworkType String No vpc

The network type of the internal-facing CLB instance. Valid values: vpc and classic.

  • vpc: VPC
  • classic: classic network
Address String No 192.XX.XX.6

The IP address that the CLB instance uses to provide services.

MasterZoneId String No cn-hangzhou-b

The ID of the primary zone to which the CLB instance belongs.

SlaveZoneId String No cn-hangzhou-d

The ID of the secondary zone to which the CLB instance belongs.

Multiple zones are not supported for users whose workloads are deployed on Alibaba Finance Cloud.

Tags String No [{"tagKey":"Key1","tagValue":"Value1"}]

The tags that are added to the CLB instance. The tags must be key-value pairs that are contained in a JSON dictionary.

You can specify up to 10 tags in each request.

PayType String No PayOnDemand

The billing method of the CLB instance. Valid values: PayOnDemand and PrePay.

  • PayOnDemand: pay-as-you-go
  • PrePay: subscription
ResourceGroupId String No rg-acfmxazb4p****

The ID of the enterprise resource group.

PageNumber Integer No 1

The number of the page to return.

PageSize Integer No 50

The number of entries returned per page.

Valid values: 1 to 100.

Note If you set PageSize, you must also set PageNumber.

Response parameters

Parameter Type Example Description
LoadBalancers Array of LoadBalancer

The list of CLB instances.

LoadBalancer
LoadBalancerId String lb-bp1b6c719dfa****

The ID of the CLB instance.

LoadBalancerName String lb-bp1o94dp5i6ea****

The name of the CLB instance.

LoadBalancerStatus String active

The status of the CLB instance. Valid values:

  • inactive: If a CLB instance is in this state, the listeners that are added to the CLB instance do not forward traffic.
  • active: After you create a CLB instance, it is in the active state by default.
  • locked: The CLB instance is locked.
Address String 100.XX.XX.28

The IP address that the CLB instance uses to provide services.

RegionId String cn-hangzhou

The ID of the region where the CLB instance is deployed.

RegionIdAlias String hangzhou

The name of the region where the CLB instance is deployed.

AddressType String intranet

The network type of the CLB instance.

VSwitchId String vsw-255ecr****

The ID of the vSwitch to which the internal-facing CLB instance belongs.

VpcId String vpc-25dvzy9f8****

The ID of the VPC to which the internal-facing CLB instance belongs.

NetworkType String vpc

The network type of the internal-facing CLB instance. Valid values:

  • vpc: VPC
  • classic: classic network
CreateTime String 2017-08-31T02:49:05Z

The time when the CLB instance was created.

MasterZoneId String cn-hangzhou-b

The ID of the primary zone where the CLB instance is deployed.

SlaveZoneId String cn-hangzhou-d

The ID of the secondary zone where the CLB instance is deployed.

AddressIPVersion String ipv4

The IP version. Valid values: ipv4 and ipv6.

Bandwidth Integer -1

The maximum bandwidth value of the listener. Unit: Mbit/s. Valid values:

  • -1: For a pay-by-data-transfer Internet-facing CLB instance, this value is set to -1. This indicates that the maximum bandwidth value is unlimited.
  • 1 to 5120: For a pay-by-bandwidth Internet-facing CLB instance, you can specify a maximum bandwidth value for each listener. The sum of maximum bandwidth values of all listeners cannot exceed the maximum bandwidth value of the CLB instance.
CreateTimeStamp Long 1504147745000

The timestamp generated when the CLB instance was created.

DeleteProtection String off

Indicates whether deletion protection is enabled for the CLB instance.

Valid values: on and off.

InternetChargeType String 3

The metering method of the Internet-facing CLB instance. Valid values:

  • 3: pay-by-bandwidth
  • 4: pay-by-data-transfer
Note If the value of the PayType parameter is set to PrePay, only pay-by-bandwidth is supported.
InternetChargeTypeAlias String paybybandwidth

The metering method of the Internet-facing CLB instance. Valid values:

  • paybybandwidth: pay-by-bandwidth
  • paybytraffic: pay-by-data-transfer
    Note If the value of the PayType parameter is set to PrePay, only pay-by-bandwidth is supported.
LoadBalancerSpec String slb.s1.small

The specification of the CLB instance.

ModificationProtectionReason String ManageInstance

The reason why the configuration read-only mode is enabled. The value must be 1 to 80 characters in length. It must start with a letter and can contain digits, periods (.), underscores (_), and hyphens (-).

Note This parameter is valid only if ModificationProtectionStatus is set to ConsoleProtection.
ModificationProtectionStatus String ConsoleProtection

Indicates whether the configuration read-only mode is enabled for the CLB instance. Valid values:

  • NonProtection: indicates that the configuration read-only mode is disabled. After you disable the configuration read-only mode, the value of ModificationProtectionReason is cleared.
  • ConsoleProtection: indicates that the configuration read-only mode is enabled.
PayType String PrePay

The billing method of the CLB instance. Valid values: PayOnDemand and PrePay.

ResourceGroupId String rg-atstuj3r****

The ID of the enterprise resource group.

PageNumber Integer 1

The number of the returned page.

PageSize Integer 50

The number of entries returned on the current page.

RequestId String 365F4154-92F6-4AE4-92F8-7FF34B540710

The ID of the request.

TotalCount Integer 1

The total number of CLB instances returned that match the filter conditions.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeLoadBalancers
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<TotalCount>1</TotalCount>
<PageSize>50</PageSize>
<RequestId>365F4154-92F6-4AE4-92F8-7FF34B540710</RequestId>
<PageNumber>1</PageNumber>
<LoadBalancers>
    <LoadBalancer>
        <ResourceGroupId>rg-atstuj3r****</ResourceGroupId>
        <Address>100.XX.XX.28</Address>
        <AddressIPVersion>ipv4</AddressIPVersion>
        <CreateTime>2017-08-31T02:49:05Z</CreateTime>
        <VSwitchId>vsw-255ecr****</VSwitchId>
        <LoadBalancerId>lb-bp1b6c719dfa****</LoadBalancerId>
        <PayType>PrePay</PayType>
        <SlaveZoneId>cn-hangzhou-d</SlaveZoneId>
        <ModificationProtectionStatus>ConsoleProtection</ModificationProtectionStatus>
        <LoadBalancerSpec>slb.s1.small</LoadBalancerSpec>
        <InternetChargeType>3</InternetChargeType>
        <InternetChargeTypeAlias>paybybandwidth</InternetChargeTypeAlias>
        <RegionIdAlias>hangzhou</RegionIdAlias>
        <LoadBalancerName>lb-bp1o94dp5i6ea****</LoadBalancerName>
        <DeleteProtection>off</DeleteProtection>
        <VpcId>vpc-25dvzy9f8****</VpcId>
        <NetworkType>vpc</NetworkType>
        <Bandwidth>-1</Bandwidth>
        <ModificationProtectionReason>ManagedInstance</ModificationProtectionReason>
        <RegionId>cn-hangzhou</RegionId>
        <AddressType>intranet</AddressType>
        <LoadBalancerStatus>active</LoadBalancerStatus>
        <CreateTimeStamp>1504147745000</CreateTimeStamp>
        <MasterZoneId>cn-hangzhou-b</MasterZoneId>
    </LoadBalancer>
</LoadBalancers>

JSON format

{"TotalCount":"1","PageSize":"50","RequestId":"365F4154-92F6-4AE4-92F8-7FF34B540710","PageNumber":"1","LoadBalancers":{"LoadBalancer":[{"ResourceGroupId":"rg-atstuj3r****","Address":"100.XX.XX.28","AddressIPVersion":"ipv4","CreateTime":"2017-08-31T02:49:05Z","VSwitchId":"vsw-255ecr****","LoadBalancerId":"lb-bp1b6c719dfa****","PayType":"PrePay","SlaveZoneId":"cn-hangzhou-d","ModificationProtectionStatus":"ConsoleProtection","LoadBalancerSpec":"slb.s1.small","InternetChargeType":"3","InternetChargeTypeAlias":"paybybandwidth","RegionIdAlias":"hangzhou","LoadBalancerName":"lb-bp1o94dp5i6ea****","DeleteProtection":"off","VpcId":"vpc-25dvzy9f8****","NetworkType":"vpc","Bandwidth":"-1","ModificationProtectionReason":"ManageInstance","RegionId":"cn-hangzhou","AddressType":"intranet","LoadBalancerStatus":"active","CreateTimeStamp":"1504147745000","MasterZoneId":"cn-hangzhou-b"}]}}

Error codes

For a list of error codes, visit the API Error Center.