Queries Classic Load Balancer (CLB) instances within your Alibaba Cloud account.

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 backend server that is added to the SLB 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: The CLB instance is disabled. CLB instances in the inactive state do not forward traffic.
  • active: The CLB instance is running as expected. Newly created CLB instances are in the active state by default.
  • locked: The CLB instance is locked. When a CLB instance expires, it is locked for seven days. You cannot perform operations on a locked CLB instance. The CLB instance no longer forwards traffic, but the IP address and other settings are retained.
LoadBalancerId String No lb-bp1b6c719dfa****

The ID of the CLB instance.

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

LoadBalancerName String No test

The name of the CLB instance.

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

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

ServerIntranetAddress String No 10.XX.XX.102

The private IP address of the backend server that is added to the CLB instance.

You can specify multiple IP addresses. 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 over 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 requests within the internal network.
InternetChargeType String No paybytraffic

The metering method of Internet data transfer. 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.
  • If the value of the InstanceChargeType parameter is set to PayByCLCU, only pay-by-data-transfer 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: VPC
  • classic: classic network
Address String No 192.168.XX.XX

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.

CLB instances on Alibaba Finance Cloud do not support cross-zone deployment.

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 call.

PayType String No PayOnDemand

The billing method of the CLB instance. Valid values:

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

The ID of the resource group.

PageNumber Integer No 1

The number of the page to return.

PageSize Integer No 50

The number of entries to return on each page.

Valid values: 1 to 100.

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

Response parameters

Parameter Type Example Description
RequestId String 8B9DB03B-ED39-5DB8-9C9F-1ED5F548D61E

The ID of the request.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 50

The number of entries returned on the current page.

TotalCount Integer 1

The number of instances returned.

LoadBalancers Array of LoadBalancer

A list of CLB instances.

LoadBalancer
VpcId String vpc-25dvzy9f8****

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

CreateTimeStamp Long 1504147745000

The timestamp generated when the CLB instance was created.

LoadBalancerId String lb-bp1b6c719dfa****

The ID of the CLB instance.

CreateTime String 2021-12-02T02:49:05Z

The time when the CLB instance was created. The time follows the YYYY-MM-DDThh:mm:ssZ format.

PayType String PrePay

The billing method of the CLB instance. Valid values:

  • PayOnDemand: pay-as-you-go
  • PrePay: subscription
AddressType String 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 over 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 requests within the internal network.
NetworkType String vpc

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

  • vpc: VPC
  • classic: classic network
AddressIPVersion String ipv4

The IP version. Valid values: ipv4 and ipv6.

LoadBalancerName String lb-bp1o94dp5i6ea****

The name of the CLB instance.

Bandwidth Integer -1

The maximum bandwidth 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 bandwidth is unlimited.
  • 1 to 5120: For a pay-by-bandwidth Internet-facing CLB instance, you can specify a maximum bandwidth for each listener. The sum of the maximum bandwidth values of all listeners cannot exceed the maximum bandwidth value of the CLB instance.
Address String 100.XX.XX.28

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

SlaveZoneId String cn-hangzhou-d

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

MasterZoneId String cn-hangzhou-b

The primary zone ID of the SLB instance.

InternetChargeTypeAlias String paybybandwidth

The metering method of Internet data transfer. 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.
Note If the value of the InstanceChargeType parameter is set to PayByCLCU, only pay-by-data-transfer is supported.
LoadBalancerSpec String slb.s1.small

The specification of the CLB instance.

RegionId String cn-hangzhou

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

ModificationProtectionReason String ManageInstance

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

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

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

  • NonProtection: The configuration read-only mode is disabled. After you disable the configuration read-only mode, the value of ModificationProtectionReason is cleared.
  • ConsoleProtection: The configuration read-only mode is enabled.
VSwitchId String vsw-255ecr****

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

LoadBalancerStatus String active

The status of the CLB instance. Valid values:

  • inactive: The CLB instance is disabled. CLB instances in the inactive state do not forward traffic.
  • active: The CLB instance is running as expected. Newly created CLB instances are in the active state by default.
  • locked: The CLB instance is locked.
ResourceGroupId String rg-atstuj3r****

The ID of the resource group.

InternetChargeType String 3

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

  • 3: pay-by-bandwidth (paybybandwidth)
  • 4: pay-by-data-transfer (paybytraffic)
Note If the value of the PayType parameter is set to PrePay, only pay-by-bandwidth is supported.
Note If the value of the InstanceChargeType parameter is set to PayByCLCU, only pay-by-data-transfer is supported.
DeleteProtection String off

Indicates whether deletion protection is enabled for the CLB instance. Valid values:

  • on: yes
  • off: no
RegionIdAlias String hangzhou

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

Tags Array of Tag

A list of tags.

Tag
TagValue String FinanceJoshua

The tag value.

TagKey String FinanceDept

The tag key.

InstanceChargeType String PayBySpec

The metering method of the CLB instance. Valid values:

  • PayBySpec: pay-by-specification
  • PayByCLCU: Pay-by-LCU
Note This parameter is supported only on the Alibaba Cloud China site.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeLoadBalancers
&RegionId=cn-hangzhou
&ServerId=vm-server-23****
&AddressIPVersion=ipv4
&LoadBalancerStatus=active
&LoadBalancerId=lb-bp1b6c719dfa****
&LoadBalancerName=test
&ServerIntranetAddress=10.XX.XX.102
&AddressType=intranet
&InternetChargeType=paybytraffic
&VpcId=vpc-bp1aevy8sof****
&VSwitchId=vsw-bp12mw1f8k3****
&NetworkType=vpc
&Address=192.168.XX.XX
&MasterZoneId=cn-hangzhou-b
&SlaveZoneId=cn-hangzhou-d
&Tags=[{"tagKey":"Key1","tagValue":"Value1"}]
&PayType=PayOnDemand
&ResourceGroupId=rg-acfmxazb4p****
&PageNumber=1
&PageSize=50
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeLoadBalancersResponse>
    <RequestId>8B9DB03B-ED39-5DB8-9C9F-1ED5F548D61E</RequestId>
    <PageNumber>1</PageNumber>
    <PageSize>50</PageSize>
    <TotalCount>1</TotalCount>
    <LoadBalancers>
        <VpcId>vpc-25dvzy9f8****</VpcId>
        <CreateTimeStamp>1504147745000</CreateTimeStamp>
        <LoadBalancerId>lb-bp1b6c719dfa****</LoadBalancerId>
        <CreateTime>2021-12-02T02:49:05Z</CreateTime>
        <PayType>PrePay</PayType>
        <AddressType>intranet</AddressType>
        <NetworkType>vpc</NetworkType>
        <AddressIPVersion>ipv4</AddressIPVersion>
        <LoadBalancerName>lb-bp1o94dp5i6ea****</LoadBalancerName>
        <Bandwidth>-1</Bandwidth>
        <Address>100.XX.XX.28</Address>
        <SlaveZoneId>cn-hangzhou-d</SlaveZoneId>
        <MasterZoneId>cn-hangzhou-b</MasterZoneId>
        <InternetChargeTypeAlias>paybybandwidth</InternetChargeTypeAlias>
        <LoadBalancerSpec>slb.s1.small</LoadBalancerSpec>
        <RegionId>cn-hangzhou</RegionId>
        <ModificationProtectionReason>ManagedInstance</ModificationProtectionReason>
        <ModificationProtectionStatus>ConsoleProtection</ModificationProtectionStatus>
        <VSwitchId>vsw-255ecr****</VSwitchId>
        <LoadBalancerStatus>active</LoadBalancerStatus>
        <ResourceGroupId>rg-atstuj3r****</ResourceGroupId>
        <InternetChargeType>3</InternetChargeType>
        <DeleteProtection>off</DeleteProtection>
        <RegionIdAlias>hangzhou</RegionIdAlias>
        <Tags>
            <TagValue>FinanceJoshua</TagValue>
            <TagKey>FinanceDept</TagKey>
        </Tags>
        <InstanceChargeType>PayBySpec</InstanceChargeType>
    </LoadBalancers>
</DescribeLoadBalancersResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "8B9DB03B-ED39-5DB8-9C9F-1ED5F548D61E",
  "PageNumber" : 1,
  "PageSize" : 50,
  "TotalCount" : 1,
  "LoadBalancers" : [ {
    "VpcId" : "vpc-25dvzy9f8****",
    "CreateTimeStamp" : 1504147745000,
    "LoadBalancerId" : "lb-bp1b6c719dfa****",
    "CreateTime" : "2021-12-02T02:49:05Z",
    "PayType" : "PrePay",
    "AddressType" : "intranet",
    "NetworkType" : "vpc",
    "AddressIPVersion" : "ipv4",
    "LoadBalancerName" : "lb-bp1o94dp5i6ea****",
    "Bandwidth" : -1,
    "Address" : "100.XX.XX.28",
    "SlaveZoneId" : "cn-hangzhou-d",
    "MasterZoneId" : "cn-hangzhou-b",
    "InternetChargeTypeAlias" : "paybybandwidth",
    "LoadBalancerSpec" : "slb.s1.small",
    "RegionId" : "cn-hangzhou",
    "ModificationProtectionReason":"ManagedInstance",
    "ModificationProtectionStatus" : "ConsoleProtection",
    "VSwitchId" : "vsw-255ecr****",
    "LoadBalancerStatus" : "active",
    "ResourceGroupId" : "rg-atstuj3r****",
    "InternetChargeType" : "3",
    "DeleteProtection" : "off",
    "RegionIdAlias" : "hangzhou",
    "Tags" : [ {
      "TagValue" : "FinanceJoshua",
      "TagKey" : "FinanceDept"
    } ],
    "InstanceChargeType" : "PayBySpec"
  } ]
}

Error codes

HttpCode Error code Error message Description
400 InvalidTag The specified tags is invalid. The error message returned because the specified tag key is invalid. Specify a valid tag key and try again.
400 TooManyResult fuzzy query retrieve too many instances. The error message returned because the number of CLB instances returned exceeds the upper limit. Specify a filter condition and try again.

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