All Products
Search
Document Center

Server Load Balancer:GetLoadBalancerAttribute

Last Updated:Jul 22, 2026

Queries the details of a specified Network Load Balancer (NLB) instance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

nlb:GetLoadBalancerAttribute

get

*LoadBalancer

acs:nlb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}

None None

Request parameters

Parameter

Type

Required

Description

Example

LoadBalancerId

string

Yes

The Network Load Balancer (NLB) instance ID.

nlb-83ckzc8d4xlp8o****

DryRun

boolean

No

Specifies whether to perform a dry run. Valid values:

  • true: performs a dry run. The system checks the required parameters, request syntax, and limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.

  • false (default): performs a dry run and sends the request. If the request passes the dry run, an HTTP 2xx status code is returned and the operation is performed.

false

ClientToken

string

No

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the value, but you must ensure that it is unique among different requests. The client token can contain only ASCII characters.

Note

If you do not specify this parameter, the system uses the value of RequestId as ClientToken. The value of RequestId may be different for each API request.

123e4567-e89b-12d3-a456-426655440000

RegionId

string

No

The region ID of the Network Load Balancer (NLB) instance.

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

cn-hangzhou

Response elements

Element

Type

Description

Example

object

response

RequestId

string

The request ID.

CEF72CEB-54B6-4AE8-B225-F876FF7BA984

RegionId

string

The region ID of the NLB instance.

cn-hangzhou

LoadBalancerId

string

The NLB instance ID.

nlb-83ckzc8d4xlp8o****

LoadBalancerName

string

The name of the NLB instance.

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

NLB1

LoadBalancerType

string

The load balancing type. Only network is returned, which indicates Network Load Balancer (NLB).

network

AddressType

string

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

  • Internet: The load balancing instance has a public IP address. The DNS domain name is resolved to the public IP address. Therefore, the instance can be accessed over the Internet.

  • Intranet: The load balancing instance has only a private IP address. The DNS domain name is resolved to the private IP address. Therefore, the instance can be accessed only within the internal network of the VPC where the load balancing instance is deployed.

Internet

AddressIpVersion

string

The protocol version. Valid values:

  • ipv4: IPv4.

  • DualStack: dual stack.

ipv4

Ipv6AddressType

string

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

  • Internet: The load balancing instance has a public IP address. The DNS domain name is resolved to the public IP address. Therefore, the instance can be accessed over the Internet.

  • Intranet: The load balancing instance has only a private IP address. The DNS domain name is resolved to the private IP address. Therefore, the instance can be accessed only within the internal network of the VPC where the load balancing instance is deployed.

Internet

LoadBalancerStatus

string

The NLB instance status. Valid values:

  • Inactive: The NLB instance is stopped. The listeners of the instance no longer forward traffic.

  • Active: The NLB instance is running.

  • Provisioning: The NLB instance is being created.

  • Configuring: The NLB instance is being reconfigured (Upgrade/Downgrade).

  • CreateFailed: The NLB instance failed to be created. In this case, no fees are incurred, and the instance can only be deleted.

Active

LoadBalancerBusinessStatus

string

The business status of the NLB instance. Valid values:

  • Abnormal: The NLB instance is in an abnormal state.

  • Normal: The NLB instance is in a normal state.

Normal

OperationLocks

array<object>

The lock state list of the NLB instance. This parameter is returned only when LoadBalancerBussinessStatus is Abnormal.

object

The lock state list of the Network Load Balancer (NLB) instance. This parameter is returned only when LoadBalancerBussinessStatus is Abnormal.

LockType

string

The type of the lock. Valid values:

  • SecurityLocked: The instance is locked due to security reasons.

  • RelatedResourceLocked: The instance is locked due to associate lock.

  • FinancialLocked: The instance is locked due to overdue payment.

  • ResidualLocked: The instance is locked due to residual resources.

SecurityLocked

LockReason

string

The reason for the lock.

Business exception.

VpcId

string

The VPC ID of the NLB instance.

vpc-bp1b49rqrybk45nio****

CreateTime

string

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

2022-07-02T02:49:05Z

ResourceGroupId

string

The resource group ID.

rg-atstuj3rtop****

DNSName

string

The domain name of the NLB instance.

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

ZoneMappings

array<object>

The mappings between zones and vSwitches. A maximum of 10 zones are returned. If the current region supports two or more zones, at least two zones are returned.

array<object>

The mappings between zones and vSwitches. A maximum of 10 zones are returned. If the current region supports two or more zones, at least two zones are returned.

VSwitchId

string

The vSwitch in the zone. Each zone uses one vSwitch and one subnet by default.

vsw-bp1rmcrwg3erh1fh8****

ZoneId

string

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

cn-hangzhou-a

LoadBalancerAddresses

array<object>

The Network Load Balancing (NLB) instance address information.

object

The Network Load Balancing (NLB) instance address information.

EniId

string

The ID of the elastic network interface (ENI).

eni-bp12f1xhs5yal61a****

PrivateIPv4Address

string

The private IPv4 address of the NLB instance.

192.168.3.32

AllocationId

string

The ID of the elastic IP address (EIP).

eip-bp1aedxso6u80u0qf****

PublicIPv4Address

string

The public IPv4 address of the NLB instance.

120.XX.XX.69

Ipv6Address

string

The IPv6 address of the NLB instance.

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

PrivateIPv4HcStatus

string

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

PrivateIPv6HcStatus

string

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

Ipv4LocalAddresses

array

The IPv4 link-local addresses. The IP addresses that the NLB instance uses to communicate with the backend servers.

string

The IPv4 link-local address.

192.168.36.16

Ipv6LocalAddresses

array

The IPv6 link-local addresses. The IP addresses that the NLB instance uses to communicate with the backend servers.

string

The IPv6 link-local address.

2408:4005:357:ba00:64a2:221f:5685:8854

Status

string

The zone status. Valid values:

  • Active: enabled.

  • Stopped: stopped. This status can be set only through the CADT disaster recovery management service invocation.

  • Shifted: DNS manually removed. You can call the CancelShiftLoadBalancerZones operation to restore the DNS of the zone.

  • AutoShifted: DNS automatically removed. When a zone encounters an exception, the system automatically removes the IP address of the abnormal zone to ensure that you can access services normally through the NLB domain name. The IP address is automatically restored when the zone recovers. No manual operation is required.

  • Starting: starting. This status can be set only through the CADT disaster recovery management service invocation.

  • Stopping: stopping. This status can be set only through the CADT disaster recovery management service invocation.

Active

BandwidthPackageId

string

The ID of the Internet Shared Bandwidth instance associated with the Internet-facing NLB instance.

cbwp-bp1vevu8h3ieh****

SecurityGroupIds

array

The security group IDs associated with the NLB instance.

string

The security group IDs associated with the NLB instance.

sg-bp10uag3q0jkxu72****

CrossZoneEnabled

boolean

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

  • true: enabled.

  • false: disabled.

true

LoadBalancerBillingConfig

object

The billing configuration of the load balancing instance.

PayType

string

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

PostPay

Cps

integer

The maximum number of new connections per second that the NLB instance can process per zone (VIP). Valid values: 0 to 1000000.

0 indicates that no limit is imposed.

100

DeletionProtectionConfig

object

The deletion protection configuration.

Enabled

boolean

The deletion protection status. Valid values:

  • true: enabled.

  • false: disabled.

true

Reason

string

The reason for changing the deletion protection status. 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 or a Chinese character.

Instance running.

EnabledTime

string

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

2022-11-02T02:49:05Z

ModificationProtectionConfig

object

The modification protection configuration.

Status

string

The modification protection status of the Network Load Balancer (NLB) instance. Valid values:

  • NonProtection: Modification protection is disabled. You cannot specify the Reason parameter. If the Reason parameter is specified, the value is cleared.

  • ConsoleProtection: Console modification protection is enabled. You can specify the Reason parameter.

Note

If the value is ConsoleProtection, you cannot modify the instance configuration in the load balancing console, but you can modify the instance configuration by invoking API operations.

ConsoleProtection

Reason

string

The reason for enabling modification protection. 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 or a Chinese character.

This parameter is valid and required only when Status is set to ConsoleProtection.

Business protection period.

EnabledTime

string

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

2022-12-02T02:49:05Z

Tags

array<object>

The tag list.

object

The tag list.

TagKey

string

The tag key of the instance.

KeyTest

TagValue

string

The tag value of the instance.

ValueTest

Examples

Success response

JSON format

{
  "RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984",
  "RegionId": "cn-hangzhou",
  "LoadBalancerId": "nlb-83ckzc8d4xlp8o****",
  "LoadBalancerName": "NLB1",
  "LoadBalancerType": "network",
  "AddressType": "Internet",
  "AddressIpVersion": "ipv4",
  "Ipv6AddressType": "Internet",
  "LoadBalancerStatus": "Active",
  "LoadBalancerBusinessStatus": "Normal",
  "OperationLocks": [
    {
      "LockType": "SecurityLocked",
      "LockReason": "security"
    }
  ],
  "VpcId": "vpc-bp1b49rqrybk45nio****",
  "CreateTime": "2022-07-02T02:49:05Z",
  "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",
          "Ipv4LocalAddresses": [
            "192.168.36.16"
          ],
          "Ipv6LocalAddresses": [
            "2408:4005:357:ba00:64a2:221f:5685:8854"
          ]
        }
      ],
      "Status": "Active"
    }
  ],
  "BandwidthPackageId": "cbwp-bp1vevu8h3ieh****",
  "SecurityGroupIds": [
    "sg-bp10uag3q0jkxu72****"
  ],
  "CrossZoneEnabled": true,
  "LoadBalancerBillingConfig": {
    "PayType": "PostPay"
  },
  "Cps": 100,
  "DeletionProtectionConfig": {
    "Enabled": true,
    "Reason": "create-by-mse-can-not-delete",
    "EnabledTime": "2022-11-02T02:49:05Z"
  },
  "ModificationProtectionConfig": {
    "Status": "ConsoleProtection",
    "Reason": "create-by-mse-cannot-modify",
    "EnabledTime": "2022-12-02T02:49:05Z"
  },
  "Tags": [
    {
      "TagKey": "KeyTest",
      "TagValue": "ValueTest"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 DuplicatedParam.%s The param of %s is duplicated.
400 OperationFailed.GetXipFailed Operation failed because GetXipFailed. The operation failed because the instance is still being created.
403 Forbidden.NoPermission Authentication is failed for NoPermission. Authentication is failed for NoPermission.
404 ResourceNotFound.loadBalancer The specified resource of loadbalancer is not found. The specified load balancer resource was not found. Please check the input parameters.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.