All Products
Search
Document Center

Server Load Balancer:ListLoadBalancers

Last Updated:Sep 11, 2024

Queries the configurations of Application Load Balancer (ALB) instances.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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
alb:ListLoadBalancersget
  • LoadBalancer
    acs:alb:{#regionId}:{#accountId}:loadbalancer/*
  • LoadBalancer
    acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
NextTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results. Valid values:

  • You do not need to specify this parameter for the first request.
  • You must specify the token that is obtained from the previous query as the value of NextToken.
FFmyTO70tTpLG6I3FmYAXGKPd****
MaxResultsintegerNo

The number of entries to return on each page. Valid values: 1 to 100. Default value: 20.

20
ZoneIdstringNo

The ID of the zone where the ALB instance is deployed.

You can call the DescribeZones operation to query zones.

cn-hangzhou-a
LoadBalancerStatusstringNo

The status of the ALB instance. Valid values:

  • Inactive: The ALB instance is disabled. The listeners do not forward traffic.
  • Active: The ALB instance is running.
  • Provisioning: The ALB instance is being created.
  • Configuring: 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. You can only delete the ALB instance. By default, the system deletes the ALB instances that are in the CreateFailed state within the last day.
Active
LoadBalancerBussinessStatusstringNo

The service status of the ALB instance. Valid values:

  • Abnormal
  • Normal
Normal
LoadBalancerIdsarrayNo

The instance IDs. You can specify at most 20 ALB instance IDs.

stringNo

The instance ID.

alb-o9ulmq5hgn68jk****
LoadBalancerNamesarrayNo

The instance names. You can specify at most 10 instance names.

stringNo

The instance name.

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

alb-instance-test
VpcIdsarrayNo

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

stringNo

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

vpc-bp1b49rqrybk45nio****
Tagarray<object>No

The tags added to the ALB instance.

objectNo

The tag structure.

KeystringNo

The tag key. You can specify at most 20 tag keys. The tag key cannot be an empty string.

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

KeyTest
ValuestringNo

The tag value. You can specify at most 20 tag values. The tag value can be an empty string.

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

alueTest
AddressTypestringNo

The network type. 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. In this case, the ALB instance can be accessed over the VPC where the ALB instance is deployed.
Intranet
PayTypestringNo

The billing method of the ALB instance. Set the value to

PostPay, which specifies the pay-as-you-go billing method. This is the default value.

PostPay
ResourceGroupIdstringNo

The ID of the resource group.

rg-acfmxazb4ph****
AddressIpVersionstringNo

The IP version. Valid values:

  • IPv4
  • DualStack
IPv4
Ipv6AddressTypestringNo

The type of IPv6 address that is used by the ALB instance. 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 in which the ALB instance is deployed.
Intranet
DNSNamestringNo

The domain name.

alb-95qnr2itwu9orb****.cn-hangzhou.alb.aliyuncs.com

Response parameters

ParameterTypeDescriptionExample
object

The configurations of the ALB instance.

LoadBalancersarray<object>

A list of ALB instances.

object

The structure of the ALB instance.

AccessLogConfigobject

The configurations of access logs.

LogProjectstring

The Simple Log Service project.

sls-setter
LogStorestring

The Logstore.

test
AddressAllocatedModestring

The mode in which IP addresses are allocated. Valid values:

  • Fixed: The ALB instance uses a static IP address.
  • Dynamic: dynamically allocates an IP address to each zone of the ALB instance.
Fixed
AddressTypestring

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

  • Internet: The ALB instance is assigned a public IP address. The domain name is resolved to the public IP address. The ALB instance is accessible over the Internet.
  • Intranet: The ALB instance is assigned only a private IP address. The domain name is resolved to the private IP address. The ALB instance is accessible only within the VPC of the ALB instance.
Intranet
BandwidthPackageIdstring

The ID of the Internet Shared Bandwidth instance that is associated with the Internet-facing ALB instance.

cbwp-bp1vevu8h3ieh****
CreateTimestring

The time when the resource was created.

2022-07-02T02:49:05Z
DNSNamestring

The domain name.

alb-95qnr2itwu9orb****.cn-hangzhou.alb.aliyuncs.com
DeletionProtectionConfigobject

The configuration of the deletion protection feature.

Enabledboolean

Indicates whether deletion protection is enabled. Valid values:

  • true
  • false
true
EnabledTimestring

The time when deletion protection is enabled.

2022-08-02T02:49:05Z
LoadBalancerBillingConfigobject

The billing information about the ALB instance.

PayTypestring

The billing method. Valid values:

Only PostPay may be returned, which indicates the pay-as-you-go billing method.

PostPay
LoadBalancerBussinessStatusstring

The status of the ALB instance. Valid values:

  • Abnormal
  • Normal
Normal
LoadBalancerEditionstring

The edition of the ALB instance. The features and billing rules vary based on the edition. Valid values:

  • Basic
  • Standard
  • StandardWithWaf
Standard
LoadBalancerIdstring

The ID of the ALB instance.

alb-o9ulmq5hgn68jk****
LoadBalancerNamestring

The name of the ALB instance.

alb-instance-test
LoadBalancerOperationLocksarray<object>

The configuration of the operation lock.

object

The structure of the operation lock.

LockReasonstring

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

Test LockReason
LockTypestring

The lock type. Valid values:

  • SecurityLocked: The ALB instance is locked due to security risks.
  • RelatedResourceLocked: The ALB instance is locked due to other resources associated with the ALB instance.
  • FinancialLocked: The ALB instance is locked due to overdue payments.
  • ResidualLocked: The ALB instance is locked because the associated resources have overdue payments and the resources are released.
FinancialLocked
LoadBalancerStatusstring

The status of the ALB instance. Valid values:

  • Inactive: The ALB instance is disabled. ALB instances in the Inactive state do not forward traffic.
  • Active: The ALB instance is running.
  • Provisioning: The ALB instance is being created.
  • Configuring: The ALB instance is being modified.
  • CreateFailed: The system failed to create the ALB instance.
Active
ModificationProtectionConfigobject

The configuration of modification protection.

Reasonstring

The reason why the configuration read-only mode is enabled.

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

This parameter is available only if the ModificationProtectionStatus parameter is set to ConsoleProtection.

Test Reason
Statusstring

Indicates whether the configuration read-only mode 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 specified, the value is cleared.
  • ConsoleProtection: Modification protection is enabled. In this case, you can set the ModificationProtectionReason parameter.
Note If the value is ConsoleProtection, modification protection is enabled. You cannot modify the configurations of the ALB instance in the ALB console. However, you can call API operations to modify the configurations of the ALB instance.
ConsoleProtection
ResourceGroupIdstring

The ID of the resource group.

rg-atstuj3rtop****
Tagsarray<object>

The information about the tags.

object

The tag structure.

Keystring

The tag key of the ALB instance.

KeyTest
Valuestring

The tag value of the ALB instance.

alueTest
VpcIdstring

The ID of the VPC in which the ALB instance is deployed.

vpc-bp1b49rqrybk45nio****
AddressIpVersionstring

The IP version. Valid values:

  • IPv4
  • DualStack
DualStack
Ipv6AddressTypestring

The type of IPv6 address used by the ALB instance. Valid values:

  • Internet The ALB instance is assigned a public IP address. The domain name is resolved to the public IP address. The ALB instance is accessible over the Internet.
  • Intranet The ALB instance is assigned only a private IP address. The domain name is resolved to the private IP address. The ALB instance is accessible only within the VPC of the ALB instance.
Intranet
MaxResultsinteger

The number of entries returned per page.

20
NextTokenstring

A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:

  • If NextToken is empty, no next page exists.
  • If a value is returned for NextToken, the value is used to retrieve a new page of results.
FFmyTO70tTpLG6I3FmYAXGKPd****
RequestIdstring

The request ID.

365F4154-92F6-4AE4-92F8-7FF34B540710
TotalCountinteger

The total number of entries returned.

100

Examples

Sample success responses

JSONformat

{
  "LoadBalancers": [
    {
      "AccessLogConfig": {
        "LogProject": "sls-setter",
        "LogStore": "test"
      },
      "AddressAllocatedMode": "Fixed",
      "AddressType": "Intranet",
      "BandwidthPackageId": "cbwp-bp1vevu8h3ieh****",
      "CreateTime": "2022-07-02T02:49:05Z",
      "DNSName": "alb-95qnr2itwu9orb****.cn-hangzhou.alb.aliyuncs.com",
      "DeletionProtectionConfig": {
        "Enabled": true,
        "EnabledTime": "2022-08-02T02:49:05Z"
      },
      "LoadBalancerBillingConfig": {
        "PayType": "PostPay"
      },
      "LoadBalancerBussinessStatus": "Normal",
      "LoadBalancerEdition": "Standard",
      "LoadBalancerId": "alb-o9ulmq5hgn68jk****",
      "LoadBalancerName": "alb-instance-test",
      "LoadBalancerOperationLocks": [
        {
          "LockReason": "Test LockReason",
          "LockType": "FinancialLocked"
        }
      ],
      "LoadBalancerStatus": "Active",
      "ModificationProtectionConfig": {
        "Reason": "Test Reason",
        "Status": "ConsoleProtection"
      },
      "ResourceGroupId": "rg-atstuj3rtop****",
      "Tags": [
        {
          "Key": "KeyTest",
          "Value": "alueTest"
        }
      ],
      "VpcId": "vpc-bp1b49rqrybk45nio****",
      "AddressIpVersion": "DualStack",
      "Ipv6AddressType": "Intranet"
    }
  ],
  "MaxResults": 20,
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "RequestId": "365F4154-92F6-4AE4-92F8-7FF34B540710",
  "TotalCount": 100
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-11-06The request parameters of the API has changedView Change Details
2023-11-06The request parameters of the API has changedView Change Details