Queries Server Load Balancer (SLB) 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 SLB instance is deployed.

You can query region IDs from the Regions and zones list or by calling the DescribeRegions operation.

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

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

AddressIPVersion String No ipv4

The IP version. Valid values: ipv4 and ipv6.

You can create IPv6 instances for high-performance SLB instances that are deployed in the following zones:

  • China (Hangzhou): Zone E and Zone F
  • China (Beijing): Zone F and Zone G
  • China (Shanghai): Zone D and Zone E
  • China (Shenzhen): Zone D, Zone C, and Zone E
  • China (Hong Kong): Zone B and Zone C
LoadBalancerStatus String No active

The state of the SLB instance. Valid values:

  • inactive: The listener in this state does not forward requests.
  • active: After you create an instance, it is in the active state by default.
  • locked: The error message returned because the instance is locked.
LoadBalancerId String No lb-bp1b6c719dfa****

The ID of the SLB 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 SLB 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 SLB instance.

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

AddressType String No intranet

The type of network where the SLB instance is deployed.

Valid values: intranet and internet.

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

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

  • paybybandwidth: pay-by-bandwidth.
  • paybytraffic: pay-by-data-transfer.
Note If you do not set this parameter, the billing method of the SLB instance remains unchanged.
VpcId String No vpc-bp1aevy8sof****

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

VSwitchId String No vsw-bp12mw1f8k3****

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

NetworkType String No vpc

The type of network where the internal-facing SLB instance is deployed. Valid values: vpc and classic.

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

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

MasterZoneId String No cn-hangzhou-b

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

SlaveZoneId String No cn-hangzhou-d

The ID of the secondary zone to which the SLB 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 SLB instances. 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 SLB 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 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
LoadBalancers Array of LoadBalancer

The list of SLB instances.

LoadBalancer
LoadBalancerId String lb-bp1b6c719dfa****

The ID of the SLB instance.

LoadBalancerName String lb-bp1o94dp5i6ea****

The name of the SLB instance.

LoadBalancerStatus String active

The state of the SLB instance. Valid values:

  • inactive: The listener in this state does not forward requests.
  • active: After you create an instance, it is in the active state by default.
  • locked: The error message returned because the instance is locked.
Address String 100.XX.XX.28

The IP address of the SLB instance.

RegionId String cn-hangzhou

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

RegionIdAlias String hangzhou

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

AddressType String intranet

The type of network where the SLB instance is deployed.

VSwitchId String vsw-255ecr****

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

VpcId String vpc-25dvzy9f8****

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

NetworkType String vpc

The type of network where the internal-facing SLB instance is deployed. Valid values:

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

The time when the SLB instance was created.

MasterZoneId String cn-hangzhou-b

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

SlaveZoneId String cn-hangzhou-d

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

AddressIPVersion String ipv4

The IP version. Valid values: ipv4 and ipv6.

CreateTimeStamp Long 1504147745000

The timestamp generated when the SLB instance was created.

InternetChargeType String paybybandwidth

The metering method of the Internet-facing SLB instance.

Valid values: paybybandwidth and paybytraffic.

  • paybybandwidth: pay-by-bandwidth
  • paybytraffic (default): pay-by-data-transfer
    Note If the value of the PayType parameter is PrePay, only pay-by-bandwidth is supported.
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 returned only when ModificationProtectionStatus is set to ConsoleProtection.
ModificationProtectionStatus String ConsoleProtection

Indicates whether the configuration read-only mode is enabled for the SLB instance.

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

The billing method of the SLB 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 SLB instances that are returned after the tags are matched against the specified conditions.

Examples

Sample requests

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

Sample success responses

XML format

<DescribeLoadBalancersResponse>
      <PageNumber>1</PageNumber>
	  <TotalCount>1</TotalCount>
	  <PageSize>50</PageSize>
	  <LoadBalancers>
		    <LoadBalancer>
			      <CreateTimeStamp>1541679713000</CreateTimeStamp>
			      <LoadBalancerName>lb-bp1o94dp5i6ea*******</LoadBalancerName>
			      <RegionIdAlias>hangzhou</RegionIdAlias>
			      <ResourceGroupId>rg-acfmxaz*******y</ResourceGroupId>
			      <AddressIPVersion>ipv4</AddressIPVersion>
			      <LoadBalancerId>lb-bp1b6c********fuca5</LoadBalancerId>
			      <VSwitchId>vsw-bp12mw1f********bmlj</VSwitchId>
			      <InternetChargeType>4</InternetChargeType>
			      <VpcId>vpc-bp1aevy8*********5cm</VpcId>
			      <SlaveZoneId>cn-hangzhou-d</SlaveZoneId>
			      <NetworkType>vpc</NetworkType>
			      <MasterZoneId>cn-hangzhou-b</MasterZoneId>
			      <CreateTime>2018-11-08T20:21Z</CreateTime>
			      <Address>192.168.0.**</Address>
			      <RegionId>cn-hangzhou</RegionId>
			      <AddressType>intranet</AddressType>
			      <PayType>PayOnDemand</PayType>
			      <LoadBalancerStatus>active</LoadBalancerStatus>
		    </LoadBalancer>
	  </LoadBalancers>
	  <RequestId>1C7445CB-C21C-4C19-9A3C-65C3190D1944</RequestId>
</DescribeLoadBalancersResponse>

JSON format

{
    "PageNumber": 1, 
    "TotalCount": 1, 
    "PageSize": 50, 
    "LoadBalancers": {
        "LoadBalancer": [
            {
                "CreateTimeStamp": 1541679713000, 
                "LoadBalancerName": "lb-bp1o94dp5i6ea*******", 
                "RegionIdAlias": "hangzhou", 
                "ResourceGroupId": "rg-acfmxazb4p****", 
                "AddressIPVersion": "ipv4", 
                "LoadBalancerId": "lb-bp1b6c719d******exfuca5", 
                "VSwitchId": "vsw-bp12mw1f8k******bmlj", 
                "InternetChargeType": "4", 
                "VpcId": "vpc-bp1aevy8sof*******5cm", 
                "SlaveZoneId": "cn-hangzhou-d", 
                "NetworkType": "vpc", 
                "MasterZoneId": "cn-hangzhou-b", 
                "CreateTime": "2018-11-08T20:21Z", 
                "Address": "192.168.0.6", 
                "RegionId": "cn-hangzhou", 
                "AddressType": "intranet", 
                "PayType": "PayOnDemand", 
                "LoadBalancerStatus": "active"
            }
        ]
    }, 
    "RequestId": "1C7445CB-C21C-4C19-9A3C-65C3190D1944"
}

Error codes

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