Queries Application Load Balancer (ALB) instances based on instance IDs, names, states, resource group IDs, and virtual private cloud (VPC) IDs.

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 ListLoadBalancers

The operation that you want to perform.

Set the value to ListLoadBalancers.

NextToken String No FFmyTO70tTpLG6I3FmYAXGKPd****

The position where the query starts. If this parameter is left empty, the query starts from the beginning.

MaxResults Integer No true

The maximum number of entries to return.

Valid values: 1 to 100.

Default value: 20. This value indicates that this parameter is not set.

Note This parameter is optional.
ZoneId String No cn-hangzhou-a

The ID of the zone to which the ALB instance belongs.

LoadBalancerStatus String No Active

The state of the ALB instance. Valid values:

  • Inactive: The ALB instance is stopped and listeners no longer forward traffic.
  • Active: The ALB instance is running.
  • Provisioning: The ALB instance is being created.
  • Configuring: The configuration of the ALB instance is being modified.
  • CreateFailed: The system failed to create the ALB instance. In this case, you are not charged for the ALB instance and the ALB instance must be deleted. By default, the system deletes the instances that are in the CreateFailed state within the last day.
LoadBalancerBussinessStatus String No Normal

The status of the ALB instance.

  • Abnormal: The ALB instance is not working as expected.
  • Normal: The ALB instance is working as expected.
LoadBalancerIds Array of String No lb-bp1b6c719dfa08ex****

The ID of the ALB instance. You can specify at most 20 IDs.

LoadBalancerNames Array of String No lb-instance-test

The name of the ALB instance. You can specify at most 10 names.

VpcIds Array of String No vpc-bp1aevy8sofi8mh1q****

The ID of the VPC to which the ALB instance belongs. You can specify at most 10 IDs.

Tag Array No

The tags of the ALB instance.

Key String No KeyTest

The tag keys. Valid values: 1 to 20.

Value String No alueTest

The tag values. Valid values: 1 to 20.

AddressType String No Internet

The type of the IP address. Valid values:

  • Internet: The ALB instance uses a public IP address. The domain name of the ALB instance is resolved to the public IP address. Therefore, the ALB instance can be accessed over the Internet.
  • Intranet: The ALB instance uses a private IP address. The domain name of the ALB instance is resolved to the private IP address. Therefore, the ALB instance can be accessed over the VPC where the ALB instance is deployed.
PayType String No PrePay

The billing method of the ALB instance.

Set the value to PostPay. This value indicates a pay-as-you-go billing method.

ResourceGroupId String No rg-acfmxazb4ph****

The ID of the enterprise resource group.

Response parameters

Parameter Type Example Description
LoadBalancers Array of loadBalancer

The ALB instances.

AccessLogConfig Object

The configurations of access logs.

LogProject String sls-setter

The log project.

LogStore String test

Log storage.

AddressAllocatedMode String Fixed

The method in which IP addresses are assigned.

  • Fixed: The ALB instance uses a fixed IP address.
  • Dynamic (default): An IP address is dynamically assigned to each zone of the ALB instance.
AddressType String Internet

The type of IP address that the ALB instance uses to provide services.

  • Internet (default): The ALB instance uses a public IP address. The domain name of the ALB instance is resolved to the public IP address. Therefore, the ALB instance can be accessed over the Internet.
  • Intranet: The ALB instance uses a private IP address. The domain name of the ALB instance is resolved to the private IP address. Therefore, the ALB instance can be accessed over the virtual private cloud (VPC) where the ALB instance is deployed.
BandwidthPackageId String cbwp-bp1vevu8h3ieh****

The ID of the EIP bandwidth plan which is associated with an ALB instance that uses a public IP address.

CreateTime String 2019-06-03T17:22Z

The time when the resource was created.

DNSName String alb-12434.cn-hangzhou.alb.aliyuncs.com

The domain name of the ALB instance.

DeletionProtectionConfig Object

The configuration of deletion protection.

Enabled Boolean true

Indicates whether deletion protection is enabled. Valid values:

  • true: enabled
  • false: disabled
EnabledTime String 2019-06-03T17:22Z

The time when deletion protection is enabled.

LoadBalancerBillingConfig Object

The configuration of the billing method.

PayType String PostPay

The billing method.

The value is set to PostPay. This value indicates a pay-as-you-go billing method.

LoadBalancerBussinessStatus String Normal

The status of the ALB instance. Valid values:

  • Abnormal: The ALB instance is not working as expected.
  • Normal: The ALB instance is working as expected.
LoadBalancerEdition String Standard

The edition of the ALB instance. Different editions have different limits and billing methods.

  • Basic: Basic Edition
  • Standard: Standard Edition
LoadBalancerId String lb-bp1b6c719dfa08ex****

The ID of the ALB instance.

LoadBalancerName String lb-instance-test

The name of the ALB instance.

LoadBalancerOperationLocks Array of LoadBalancerOperationLock

The configuration of the operation lock.

LockReason String OverduePayments

The reason why the ALB instance is locked. This parameter is valid only if LoadBalancerBussinessStatus is set to Abnormal.

LockType String FinancialLocked

The type of the lock. Valid values:

  • SecurityLocked: The ALB instance is locked due to security issues
  • RelatedResourceLocked: The ALB instance is locked due to association issues
  • FinancialLocked: The ALB instance is locked due to overdue payments
  • ResidualLocked: The ALB instance is locked because associated EIP bandwidth plans are released.
LoadBalancerStatus String Active

The state of the ALB instance. Valid values:

  • Inactive: The ALB instance is stopped. This indicates that the listeners no longer forward requests.
  • Active: The ALB instance is running.
  • Provisioning: The ALB instance is being created.
  • Configuring: The configuration of the ALB instance is being modified.
  • CreateFailed: The system failed to create the ALB instance.
ModificationProtectionConfig Object

The configuration of modification protection.

Reason String ManageInstance

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

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

Status String ConsoleProtection

Indicates whether modification protection is enabled for the ALB instance. Valid values:

  • NonProtection: Modification protection is disabled. In this case, you cannot set the ModificationProtectionReason parameter. If the ModificationProtectionReason parameter is set, the value is cleared.
  • ConsoleProtection: Modification protection is enabled. In this case, you can set the ModificationProtectionReason parameter.
ResourceGroupId String rg-atstuj3rtop****

The ID of the enterprise resource group.

Tags Array of Tag

The list of tags.

Key String FinanceDept

The key of the tag.

Value String FinanceJoshua

The value of the tag.

VpcId String vpc-25dvz****

The ID of the VPC to which the ALB instance belongs.

MaxResults Integer 50

The maximum number of entries returned.

NextToken String t-2343r

The position where the query stopped. If the response does not contain this parameter, all data has been queried.

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

The ID of the request.

TotalCount Integer 1000

The total number of entries returned.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListLoadBalancers
&NextToken=FFmyTO70tTpLG6I3FmYAXGKPd****
&ZoneId=cn-hangzhou-a
&LoadBalancerStatus=Active
&LoadBalancerBussinessStatus=Normal
&LoadBalancerIds=["lb-bp1b6c719dfa08ex****"]
&LoadBalancerNames=["lb-instance-test"]
&VpcIds=["vpc-bp1aevy8sofi8mh1q****"]
&Tag=[{"Key":"KeyTest","Value":"alueTest"}]
&AddressType=Internet
&PayType=PrePay
&ResourceGroupId=rg-acfmxazb4ph****
&Common request parameters

Sample success responses

XML format

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

<ListLoadBalancersResponse>
    <LoadBalancers>
        <AccessLogConfig>
            <LogProject>sls-setter</LogProject>
            <LogStore>test</LogStore>
        </AccessLogConfig>
        <AddressAllocatedMode>Fixed</AddressAllocatedMode>
        <AddressType>Internet</AddressType>
        <BandwidthPackageId>cbwp-bp1vevu8h3ieh****</BandwidthPackageId>
        <CreateTime>2019-06-03T17:22Z</CreateTime>
        <DNSName>alb-12434.cn-hangzhou.alb.aliyuncs.com</DNSName>
        <DeletionProtectionConfig>
            <Enabled>true</Enabled>
            <EnabledTime>2019-06-03T17:22Z</EnabledTime>
        </DeletionProtectionConfig>
        <LoadBalancerBillingConfig>
            <PayType>PostPay</PayType>
        </LoadBalancerBillingConfig>
        <LoadBalancerBussinessStatus>Normal</LoadBalancerBussinessStatus>
        <LoadBalancerEdition>Standard</LoadBalancerEdition>
        <LoadBalancerId>lb-bp1b6c719dfa08ex****</LoadBalancerId>
        <LoadBalancerName>lb-instance-test</LoadBalancerName>
        <LoadBalancerOperationLocks>
            <LockReason>OverduePayments</LockReason>
            <LockType>FinancialLocked</LockType>
        </LoadBalancerOperationLocks>
        <LoadBalancerStatus>Active</LoadBalancerStatus>
        <ModificationProtectionConfig>
            <Reason>ManageInstance</Reason>
            <Status>ConsoleProtection</Status>
        </ModificationProtectionConfig>
        <ResourceGroupId>rg-atstuj3rtop****</ResourceGroupId>
        <Tags>
            <Key>FinanceDept</Key>
            <Value>FinanceJoshua</Value>
        </Tags>
        <VpcId>vpc-25dvz****</VpcId>
    </LoadBalancers>
    <MaxResults>50</MaxResults>
    <NextToken>t-2343r</NextToken>
    <RequestId>365F4154-92F6-4AE4-92F8-7FF34B540710</RequestId>
    <TotalCount>1000</TotalCount>
</ListLoadBalancersResponse>

JSON format

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

{
  "LoadBalancers" : [ {
    "AccessLogConfig" : {
      "LogProject" : "sls-setter",
      "LogStore" : "test"
    },
    "AddressAllocatedMode" : "Fixed",
    "AddressType" : "Internet",
    "BandwidthPackageId" : "cbwp-bp1vevu8h3ieh****",
    "CreateTime" : "2019-06-03T17:22Z",
    "DNSName" : "alb-12434.cn-hangzhou.alb.aliyuncs.com",
    "DeletionProtectionConfig" : {
      "Enabled" : true,
      "EnabledTime" : "2019-06-03T17:22Z"
    },
    "LoadBalancerBillingConfig" : {
      "PayType" : "PostPay"
    },
    "LoadBalancerBussinessStatus" : "Normal",
    "LoadBalancerEdition" : "Standard",
    "LoadBalancerId" : "lb-bp1b6c719dfa08ex****",
    "LoadBalancerName" : "lb-instance-test",
    "LoadBalancerOperationLocks" : [ {
      "LockReason" : "OverduePayments",
      "LockType" : "FinancialLocked"
    } ],
    "LoadBalancerStatus" : "Active",
    "ModificationProtectionConfig" : {
      "Reason" : "ManageInstance",
      "Status" : "ConsoleProtection"
    },
    "ResourceGroupId" : "rg-atstuj3rtop****",
    "Tags" : [ {
      "Key" : "FinanceDept",
      "Value" : "FinanceJoshua"
    } ],
    "VpcId" : "vpc-25dvz****"
  } ],
  "MaxResults" : 50,
  "NextToken" : "t-2343r",
  "RequestId" : "365F4154-92F6-4AE4-92F8-7FF34B540710",
  "TotalCount" : 1000
}

Error codes

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