All Products
Search
Document Center

Server Load Balancer:DescribeLoadBalancers

Last Updated:Oct 11, 2024

Queries Classic Load Balancer (CLB) 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
slb:DescribeLoadBalancersget
  • LoadBalancer
    acs:slb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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

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

cn-hangzhou
ServerIdstringNo

The ID of the backend server that is added to the CLB instance.

vm-server-23****
AddressIPVersionstringNo

The IP version that is used by the CLB instance. Valid values: ipv4 and ipv6.

ipv4
LoadBalancerStatusstringNo

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 runs as expected. By default, newly created CLB instances are in the active state.
  • locked: The CLB instance is locked. After a CLB instance expires, it is locked for seven days. A locked CLB instance cannot forward traffic and you cannot perform operations on the locked CLB instance. However, other settings such as the IP address are retained.
active
LoadBalancerIdstringNo

The ID of the CLB instance.

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

lb-bp1b6c719dfa****
LoadBalancerNamestringNo

The name of the CLB instance.

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

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

test
ServerIntranetAddressstringNo

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 (,).

10.XX.XX.102
AddressTypestringNo

The network type of the CLB instance. Valid values:

  • internet: After an Internet-facing CLB instance is created, the system assigns 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 assigns a private IP address to the CLB instance. Then, the CLB instance can forward requests only over internal networks.
intranet
InternetChargeTypestringNo

The metering method of Internet data transfer. Valid values:

  • paybybandwidth: pay-by-bandwidth.
  • paybytraffic: pay-by-data-transfer.
paybytraffic
VpcIdstringNo

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

vpc-bp1aevy8sof****
VSwitchIdstringNo

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

vsw-bp12mw1f8k3****
NetworkTypestringNo

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

  • vpc: VPC.
  • classic: classic network.
vpc
AddressstringNo

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

192.168.XX.XX
MasterZoneIdstringNo

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

cn-hangzhou-b
SlaveZoneIdstringNo

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

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

cn-hangzhou-d
TagsstringNo

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.

[{"tagKey":"Key1","tagValue":"Value1"}]
PayTypestringNo

The billing method of the CLB instance. Valid values:

  • Set the value to PayOnDemand.
PayOnDemand
ResourceGroupIdstringNo

The ID of the resource group.

rg-acfmxazb4p****
PageNumberintegerNo

The page number of the page to return.

1
PageSizeintegerNo

The number of entries to return on each page.

Valid values: 1 to 100.

Note If you specify the PageSize parameter, you must also specify the PageNumber parameter.
50
Tagarray<object>No

The tags.

objectNo
KeystringNo

The key of the tag. You can specify up to 20 tag keys. The tag key cannot be an empty string.

The tag key must be 1 to 64 characters in length and cannot start with aliyun or acs:. It cannot contain http:// or https://.

FinanceDept
ValuestringNo

The value of the tag. You can specify up to 20 tag values. The tag value can be an empty string.

The tag value can be at most 128 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

FinanceJoshua

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

8B9DB03B-ED39-5DB8-9C9F-1ED5F548D61E
PageNumberinteger

The page number of the returned page.

1
PageSizeinteger

The number of entries returned on the current page.

50
TotalCountinteger

The number of instances returned.

1
LoadBalancersarray<object>

An array of CLB instances.

LoadBalancerobject
VpcIdstring

The ID of the VPC in which the internal-facing CLB instance was deployed.

vpc-25dvzy9f8****
CreateTimeStamplong

The timestamp when the instance was created.

1504147745000
LoadBalancerIdstring

The ID of the CLB instance.

lb-bp1b6c719dfa****
CreateTimestring

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

2021-12-02T02:49:05Z
PayTypestring

The billing method of the CLB instance.

  • PayOnDemand is returned, which indicates the pay-as-you-go billing method.
PayOnDemand
AddressTypestring

The network type of the CLB instance. Valid values:

  • internet: After an Internet-facing CLB instance is created, the system assigns 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 assigns a private IP address to the CLB instance. Then, the CLB instance can forward requests only over internal networks.
intranet
NetworkTypestring

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

  • vpc: VPC.
  • classic: classic network.
vpc
AddressIPVersionstring

The IP version that is used by the CLB instance. Valid values: ipv4 and ipv6.

ipv4
LoadBalancerNamestring

The name of the CLB instance.

lb-bp1o94dp5i6ea****
Bandwidthinteger

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

-1
Addressstring

The endpoint of the CLB instance.

100.XX.XX.28
SlaveZoneIdstring

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

cn-hangzhou-d
MasterZoneIdstring

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

cn-hangzhou-b
InternetChargeTypeAliasstring

The metering method of Internet data transfer. Valid values:

  • paybybandwidth: pay-by-bandwidth.
  • paybytraffic: pay-by-data-transfer.
paybybandwidth
LoadBalancerSpecstring

The specification of the CLB instance.

Note Pay-as-you-go CLB instances are not subject to specifications. slb.lcu.elastic is returned by default.
slb.s1.small
RegionIdstring

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

cn-hangzhou
ModificationProtectionReasonstring

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

Note This parameter takes effect only when you set the ModificationProtectionStatus parameter to ConsoleProtection.
ManagedInstance
ModificationProtectionStatusstring

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

  • NonProtection: The configuration read-only mode is disabled. In this case, you cannot specify the ModificationProtectionReason parameter. If you specify the ModificationProtectionReason parameter, the value is cleared.
  • ConsoleProtection: The configuration read-only mode is enabled.
Note If you set this parameter to ConsoleProtection, you cannot modify the configurations of the CLB instance in the CLB console. However, you can call API operations to modify the configurations of the CLB instance.
ConsoleProtection
VSwitchIdstring

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

vsw-255ecr****
LoadBalancerStatusstring

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 runs as expected. By default, newly created CLB instances are in the active state.
  • locked: The CLB instance is locked.
active
ResourceGroupIdstring

The ID of the resource group.

rg-atstuj3r****
InternetChargeTypestring

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

  • 3: pay-by-bandwidth (paybybandwidth).
  • 4: pay-by-data-transfer (paybytraffic).
3
DeleteProtectionstring

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

  • on: Deletion protection is enabled.
  • off: Deletion protection is disabled.
off
RegionIdAliasstring

The region where the CLB instance was deployed.

hangzhou
Tagsarray<object>

The tags of the CLB instance.

Tagobject
TagValuestring

The value of the tag.

FinanceJoshua
TagKeystring

The key of the tag.

FinanceDept

Examples

Sample success responses

JSONformat

{
  "RequestId": "8B9DB03B-ED39-5DB8-9C9F-1ED5F548D61E",
  "PageNumber": 1,
  "PageSize": 50,
  "TotalCount": 1,
  "LoadBalancers": {
    "LoadBalancer": [
      {
        "VpcId": "vpc-25dvzy9f8****",
        "CreateTimeStamp": 1504147745000,
        "LoadBalancerId": "lb-bp1b6c719dfa****",
        "CreateTime": "2021-12-02T02:49:05Z",
        "PayType": "PayOnDemand",
        "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\n",
        "ModificationProtectionStatus": "ConsoleProtection",
        "VSwitchId": "vsw-255ecr****",
        "LoadBalancerStatus": "active",
        "ResourceGroupId": "rg-atstuj3r****",
        "InternetChargeType": "3",
        "DeleteProtection": "off",
        "RegionIdAlias": "hangzhou",
        "Tags": {
          "Tag": [
            {
              "TagValue": "FinanceJoshua",
              "TagKey": "FinanceDept"
            }
          ]
        },
        "InstanceChargeType": "PayBySpec"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError message
400InvalidTagThe specified tags is invalid.
400TooManyResultfuzzy query retrieve too many instances.
400LocationServiceTimeoutLocation service connection timeout. Please try again later.

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

Change history

Change timeSummary of changesOperation
2023-09-08The Error code has changedView Change Details
2023-07-04The Error code has changed. The request parameters of the API has changedView Change Details