All Products
Search
Document Center

Server Load Balancer:GetLoadBalancerAttribute

Last Updated:Mar 13, 2024

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

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

Request parameters

ParameterTypeRequiredDescriptionExample
LoadBalancerIdstringYes

The ID of the NLB instance.

nlb-83ckzc8d4xlp8o****
DryRunbooleanNo

Specifies whether only to precheck the request. Valid values:

  • true: checks the request but does not query the listener details. The system prechecks the required parameters, request syntax, and limits. If the request fails the precheck, an error message is returned. If the request passes the precheck, the DryRunOperation error code is returned.
  • false (default): sends the request. If the request passes the precheck, an HTTP 2xx status code is returned and the operation is performed.
false
ClientTokenstringNo

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 all requests. ClientToken can contain only ASCII characters.

Note If you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId for each API request may be different.
123e4567-e89b-12d3-a456-426655440000
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 request ID.

CEF72CEB-54B6-4AE8-B225-F876FF7BA984
RegionIdstring

The region ID of the NLB instance.

cn-hangzhou
LoadBalancerIdstring

The NLB instance ID.

nlb-83ckzc8d4xlp8o****
LoadBalancerNamestring

The NLB instance name.

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.

NLB1
LoadBalancerTypestring

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

network
AddressTypestring

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

  • Internet 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 domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the VPC in which the NLB instance is deployed.
Internet
AddressIpVersionstring

The protocol version. Valid values:

  • ipv4: IPv4
  • DualStack: dual stack
ipv4
Ipv6AddressTypestring

The IPv6 network type of 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. In this case, the NLB instance can be accessed over the VPC where the NLB instance is deployed.
Internet
LoadBalancerStatusstring

The NLB instance status. Valid values:

  • Inactive: The NLB instance is disabled. The 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.
  • CreateFailed: The system failed to create the NLB instance. In this case, you are not charged for the NLB instance. You can only delete the NLB instance.
Active
LoadBalancerBusinessStatusstring

The status of workloads on the NLB instance. Valid values:

  • Abnormal
  • Normal
Normal
OperationLocksobject []

The information about the locked NLB instance. This parameter is returned only when LoadBalancerBussinessStatus is Abnormal.

LockTypestring

The type of the lock. Valid values:

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

The reason why the NLB instance is locked.

security
VpcIdstring

The VPC ID of the NLB instance.

vpc-bp1b49rqrybk45nio****
CreateTimestring

The time when the NLB instance was created. This value is a UNIX timestamp.

Unit: milliseconds.

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

The ID of the resource group.

rg-atstuj3rtop****
DNSNamestring

The domain name of the NLB instance.

nlb-wb7r6dlwetvt5j****.cn-hangzhou.nlb.aliyuncs.com
ZoneMappingsobject []

The list of zones and vSwitches in the zones. You must specify 2 to 10 zones.

VSwitchIdstring

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

vsw-bp1rmcrwg3erh1fh8****
ZoneIdstring

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

cn-hangzhou-a
LoadBalancerAddressesobject []

The information about the IP addresses used by the NLB instance.

EniIdstring

The ID of the elastic network interface (ENI).

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 of 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.

cbwp-bp1vevu8h3ieh****
SecurityGroupIdsarray

The ID of the security group associated with the NLB instance.

string

The ID of the security group associated with the NLB instance.

sg-bp10uag3q0jkxu72****
CrossZoneEnabledboolean

Indicates whether the NLB instance is accessible across zones. Valid values:

  • true
  • false
true
LoadBalancerBillingConfigobject

The billing information of the NLB instance.

PayTypestring

The billing method of the NLB instance. Set the value to PostPay, which specifies the pay-as-you-go billing method.

PostPay
Cpsinteger

The maximum number of connections per second that can be created on the NLB instance. Valid values: 0 to 1000000.

0 indicates that the number of connections is unlimited.

100
DeletionProtectionConfigobject

The configuration of the deletion protection feature.

Enabledboolean

Specifies whether to enable deletion protection. Valid values:

  • true: yes
  • false (default): no
true
Reasonstring

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

create-by-mse-can-not-delete
EnabledTimestring

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

2022-11-02T02:49:05Z
ModificationProtectionConfigobject

The configuration of the configuration read-only mode.

Statusstring

Specifies whether to enable the configuration read-only mode. Valid values:

  • NonProtection: does not enable the configuration read-only mode. You cannot set the Reason parameter. If the Reason parameter is set, the value is cleared.
  • ConsoleProtection: enables the configuration read-only mode. You can set the Reason parameter.
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 value must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter.

Note This parameter takes effect only if the Status parameter is set to ConsoleProtection.
create-by-mse-cannot-modify
EnabledTimestring

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

2022-12-02T02:49:05Z
Tagsobject []

The tags.

TagKeystring

The tag key.

KeyTest
TagValuestring

The tag value.

ValueTest

Examples

Sample success responses

JSONformat

{
  "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"
        }
      ],
      "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 codeError codeError messageDescription
400DuplicatedParam.%sThe param of %s is duplicated.-
403Forbidden.NoPermissionAuthentication is failed for NoPermission.Authentication is failed for NoPermission.
404ResourceNotFound.loadBalancerThe specified resource of loadbalancer is not found.The specified load balancer resource was not found. Please check the input parameters.

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

Change history

Change timeSummary of changesOperation
2024-02-22The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
2024-02-04The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
Output ParametersThe response structure of the API has changed.
2024-02-04The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
2023-12-18The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
2023-09-05The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 403 change
    Error Codes 404 change
    delete Error Codes: 400
2023-08-22The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Added Error Codes: 400
    Added Error Codes: 403
    Added Error Codes: 404
2023-06-07The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2023-04-04The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.