All Products
Search
Document Center

Server Load Balancer:ListLoadBalancers

Last Updated:Oct 11, 2024

Queries the basic information about a Network Load Balancer (NLB) instance.

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

Request parameters

ParameterTypeRequiredDescriptionExample
LoadBalancerTypestringNo

The type of the Server Load Balancer (SLB) instance. Set the value to network, which specifies NLB.

network
ZoneIdstringNo

The name of the zone. You can call the DescribeZones operation to query the most recent zone list.

cn-hangzhou-a
VpcIdsarrayNo

The ID of the virtual private cloud (VPC) where the NLB instance is deployed. You can specify up to 10 VPC IDs at a time.

VpcIdstringNo

The ID of the VPC where the NLB instance is deployed. You can specify up to 10 VPC IDs at a time.

vpc-bp1b49rqrybk45nio****
AddressTypestringNo

The type of IPv4 address used by the NLB instance. Valid values:

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

The protocol version. Valid values:

  • ipv4: IPv4
  • DualStack: dual stack
ipv4
Ipv6AddressTypestringNo

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

  • Internet: a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
  • Intranet: a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the VPC where the NLB instance is deployed.
Internet
DNSNamestringNo

The domain name of the NLB instance.

nlb-wb7r6dlwetvt5j****.cn-hangzhou.nlb.aliyuncs.com
LoadBalancerStatusstringNo

The status of the NLB instance. Valid values:

  • Inactive: The NLB instance is disabled. Listeners of NLB instances in the Inactive state do not forward traffic.
  • Active: The NLB instance is running.
  • Provisioning: The NLB instance is being created.
  • Configuring: The NLB instance is being modified.
  • Deleting: The NLB instance is being deleted.
  • Deleted: The NLB instance is deleted.
Active
LoadBalancerBusinessStatusstringNo

The business status of the NLB instance. Valid values:

  • Abnormal: The NLB instance is not working as expected.
  • Normal: The NLB instance is working as expected.
Normal
LoadBalancerNamesarrayNo

The name of the NLB instance. You can specify up to 20 names at a time.

LoadBalancerNamestringNo

The name of the NLB instance. You can specify up to 20 names at a time.

NLB1
ResourceGroupIdstringNo

The ID of the resource group.

rg-atstuj3rtop****
LoadBalancerIdsarrayNo

The ID of the NLB instance. You can query up to 20 NLB instances at a time.

LoadBalancerIdstringNo

The ID of the NLB instance. You can query up to 20 NLB instances at a time.

nlb-83ckzc8d4xlp8o****
Tagarray<object>No

The tags of the NLB instance.

objectNo

The tags of the NLB instance.

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 can be up to 64 characters in length and cannot contain http:// or https://. It cannot start with aliyun or acs:.

KeyTest
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 up to 128 characters in length and cannot start with acs: or aliyun. The tag value cannot contain http:// or https://.

ValueTest
NextTokenstringNo

The token that determines the start point of the next query. Valid values:

  • If this is your first query and no subsequent queries are to be sent, ignore this parameter.
  • If a subsequent query is to be sent, set the parameter to the value of NextToken that is returned from the last call.
FFmyTO70tTpLG6I3FmYAXGKPd****
MaxResultsintegerNo

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

20
RegionIdstringNo

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

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

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

response

RequestIdstring

The ID of the request.

CEF72CEB-54B6-4AE8-B225-F876FF7BA984
LoadBalancersarray<object>

The NLB instances.

LoadbalancerInfoobject

The information about the array object.

RegionIdstring

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

cn-hangzhou
LoadBalancerIdstring

The ID of the NLB instance.

nlb-83ckzc8d4xlp8o****
LoadBalancerNamestring

The name of the NLB instance.

NLB1
LoadBalancerTypestring

The type of the SLB instance. Only Network is returned, which indicates NLB.

Network
AddressTypestring

The type of IPv4 address used by the NLB instance. Valid values:

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

The IP version. Valid values:

  • ipv4: IPv4
  • DualStack: dual stack
ipv4
Ipv6AddressTypestring

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

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

The status of the NLB instance. Valid values:

  • Inactive: The NLB instance is disabled. Listeners of NLB instances in the Inactive state do not forward traffic.
  • Active: The NLB instance is running.
  • Provisioning: The NLB instance is being created.
  • Configuring: The NLB instance is being modified.
  • Deleting: The NLB instance is being deleted.
  • Deleted: The NLB instance is deleted.
Active
LoadBalancerBusinessStatusstring

The business status of the NLB instance. Valid values:

  • Abnormal: The NLB instance is not working as expected.
  • Normal: The NLB instance is working as expected.
Normal
OperationLocksarray<object>

The configuration of the operation lock. This parameter takes effect if the value of LoadBalancerBussinessStatus is Abnormal.

OperationLockobject

The configuration of the operation lock.

LockTypestring

The type of lock. Valid values:

  • SecurityLocked: The NLB instance is locked due to security reasons.
  • RelatedResourceLocked: The NLB instance is locked due to association issues.
  • FinancialLocked: The NLB instance is locked due to overdue payments.
  • ResidualLocked: The NLB instance is locked because the payments of the associated resources are overdue and the resources are released.
SecurityLocked
LockReasonstring

The reason why the NLB instance is locked.

Service exception
VpcIdstring

The ID of the VPC where the NLB instance is deployed.

vpc-bp1b49rqrybk45nio****
CreateTimestring

The time when the resource was created. The time is displayed in UTC in the yyyy-MM-ddTHH:mm:ssZ format.

2022-07-18T17:22Z
ResourceGroupIdstring

The ID of the resource group.

rg-atstuj3rtop****
DNSNamestring

The domain name of the NLB instance.

nlb-wb7r6dlwetvt5j****.cn-hangzhou.nlb.aliyuncs.com
ZoneMappingsarray<object>

The mappings between zones and vSwitches.

ZoneMappingobject

The information about the array object.

VSwitchIdstring

The ID of the vSwitch in the zone. By default, each zone contains one vSwitch and one subnet.

vsw-bp1rmcrwg3erh1fh8****
ZoneIdstring

The name of the zone. You can call the DescribeZones operation to query the zones.

cn-hangzhou-a
LoadBalancerAddressesarray<object>

The IP addresses that are used by the NLB instance.

LoadBalancerAddressobject

The information about the array object.

EniIdstring

The ID of the elastic network interface (ENI) attached to the NLB instance.

eni-bp12f1xhs5yal61a****
PrivateIPv4Addressstring

The private IPv4 address of the NLB instance.

192.168.3.32
AllocationIdstring

The ID of the elastic IP address (EIP).

eip-bp1aedxso6u80u0qf****
PublicIPv4Addressstring

The public IPv4 address of the NLB instance.

120.XX.XX.69
Ipv6Addressstring

The IPv6 address used by the NLB instance.

2001:db8:1:1:1:1:1:1
PrivateIPv4HcStatusstring

The health status of the private IPv4 address of the NLB instance. Valid values:

  • Healthy
  • Unhealthy
Note This parameter is returned only when the Status of the zone is Active.
Healthy
PrivateIPv6HcStatusstring

The health status of the IPv6 address of the NLB instance. Valid values:

  • Healthy
  • Unhealthy
Note This parameter is returned only when the Status of the zone is Active.
Healthy
Statusstring

The zone status. Valid values:

  • Active: The zone is available.

  • Stopped: The zone is disabled. You can set the zone to this status only by using Cloud Architect Design Tools (CADT).

  • Shifted: The DNS record is removed.

  • Starting: The zone is being enabled. You can set the zone to this status only by using CADT.

  • Stopping You can set the zone to this status only by using CADT.

Active
BandwidthPackageIdstring

The ID of the EIP bandwidth plan that is associated with the NLB instance if the NLB instance uses a public IP address.

cbwp-bp1vevu8h3ieh****
SecurityGroupIdsarray

The security group to which the NLB instance is added.

SecurityGroupIdstring

The security group to which the NLB instance is added.

sg-bp10uag3q0jkxu72****
CrossZoneEnabledboolean

Indicates whether cross-zone load balancing is enabled for the NLB instance. Valid values:

  • true: enabled
  • false: disabled
true
LoadBalancerBillingConfigobject

The billing settings of the NLB instance.

PayTypestring

The billing method of the NLB instance. Only PostPay is supported, which indicates the pay-as-you-go billing method.

PostPay
DeletionProtectionConfigobject

The configuration of the deletion protection feature.

Enabledboolean

Indicates whether deletion protection is enabled. Valid values:

  • true: enabled
  • false: disabled
true
Reasonstring

The reason why the deletion protection feature is enabled or disabled. The reason must be 2 to 128 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The reason must start with a letter.

The instance is running
EnabledTimestring

The time when deletion protection was enabled. The time is displayed in UTC in yyyy-MM-ddTHH:mm:ssZ format.

2022-12-01T17:22Z
ModificationProtectionConfigobject

The configuration of the configuration read-only mode.

Statusstring

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

  • NonProtection: disabled. In this case, Reason is not returned. If Reason is set, the value is cleared.
  • ConsoleProtection: enabled. In this case, Reason is returned.
Note If you set this parameter to ConsoleProtection, you cannot use the NLB console to modify instance configurations. However, you can call API operations to modify instance configurations.
ConsoleProtection
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 (-). The reason must start with a letter.

This parameter takes effect only if Status is set to ConsoleProtection.

Service guarantee period
EnabledTimestring

The time when the configuration read-only mode was enabled. The time is displayed in UTC in yyyy-MM-ddTHH:mm:ssZ format.

2022-12-01T17:22Z
Tagsarray<object>

A list of tags.

tagModelsobject

A list of tags.

Keystring

The tag key.

KeyTest
Valuestring

The tag value.

ValueTest
TotalCountinteger

The total number of entries returned.

10
NextTokenstring

The token that determines the start point of the next query. Valid values:

  • If this is your first query and no subsequent queries are to be sent, ignore this parameter.
  • If a subsequent query is to be sent, set the parameter to the value of NextToken that is returned from the last call.
FFmyTO70tTpLG6I3FmYAXGKPd****
MaxResultsinteger

The number of entries returned per page.

20

Examples

Sample success responses

JSONformat

{
  "RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984",
  "LoadBalancers": [
    {
      "RegionId": "cn-hangzhou",
      "LoadBalancerId": "nlb-83ckzc8d4xlp8o****",
      "LoadBalancerName": "NLB1",
      "LoadBalancerType": "Network",
      "AddressType": "Internet",
      "AddressIpVersion": "ipv4",
      "Ipv6AddressType": "Internet",
      "LoadBalancerStatus": "Active",
      "LoadBalancerBusinessStatus": "Normal",
      "OperationLocks": [
        {
          "LockType": "SecurityLocked",
          "LockReason": "Service exception\n"
        }
      ],
      "VpcId": "vpc-bp1b49rqrybk45nio****",
      "CreateTime": "2022-07-18T17:22Z",
      "ResourceGroupId": "rg-atstuj3rtop****",
      "DNSName": "nlb-wb7r6dlwetvt5j****.cn-hangzhou.nlb.aliyuncs.com",
      "ZoneMappings": [
        {
          "VSwitchId": "vsw-bp1rmcrwg3erh1fh8****",
          "ZoneId": "cn-hangzhou-a",
          "LoadBalancerAddresses": [
            {
              "EniId": "eni-bp12f1xhs5yal61a****",
              "PrivateIPv4Address": "192.168.3.32",
              "AllocationId": "eip-bp1aedxso6u80u0qf****",
              "PublicIPv4Address": "120.XX.XX.69",
              "Ipv6Address": "2001:db8:1:1:1:1:1:1",
              "PrivateIPv4HcStatus": "Healthy",
              "PrivateIPv6HcStatus": "Healthy"
            }
          ],
          "Status": "Active"
        }
      ],
      "BandwidthPackageId": "cbwp-bp1vevu8h3ieh****",
      "SecurityGroupIds": [
        "sg-bp10uag3q0jkxu72****"
      ],
      "CrossZoneEnabled": true,
      "LoadBalancerBillingConfig": {
        "PayType": "PostPay"
      },
      "DeletionProtectionConfig": {
        "Enabled": true,
        "Reason": "The instance is running\n",
        "EnabledTime": "2022-12-01T17:22Z"
      },
      "ModificationProtectionConfig": {
        "Status": "ConsoleProtection",
        "Reason": "Service guarantee period\n",
        "EnabledTime": "2022-12-01T17:22Z"
      },
      "Tags": [
        {
          "Key": "KeyTest",
          "Value": "ValueTest"
        }
      ]
    }
  ],
  "TotalCount": 10,
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "MaxResults": 20
}

Error codes

HTTP status codeError codeError messageDescription
400IllegalParam.%sThe param of %s is illegal.-
400IllegalParam.LoadBalancerTypeThe LoadBalancerType value is invalid.-
400SystemBusySystem is busy, please try again later.-
400IllegalParam.loadBalancerNameParam loadBalancerName is illegal.The instance name is invalid. Check the parameters.
403Forbidden.NoPermissionAuthentication is failed for NoPermission.Authentication is failed for NoPermission.

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

Change history

Change timeSummary of changesOperation
2024-01-29The Error code has changedView Change Details
2023-09-26The Error code has changedView Change Details
2023-09-19The Error code has changedView Change Details
2023-09-13The Error code has changedView Change Details
2023-08-22The Error code has changedView Change Details
2023-06-07The response structure of the API has changedView Change Details
2023-04-04The response structure of the API has changedView Change Details