Queries the detailed configuration of a Network Load Balancer (NLB) instance based on an instance ID.

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 GetLoadBalancerAttribute

The operation that you want to perform. Set the value to GetLoadBalancerAttribute.

LoadBalancerId String Yes nlb-83ckzc8d4xlp8o****

The ID of the NLB instance.

DryRun Boolean No false

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 code is returned based on the cause of the failure. If the request passes the dry run, the DryRunOperation error code is returned.
  • false: performs a dry run and sends the request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed. This is the default value.
ClientToken String No 123e4567-e89b-12d3-a456-426655440000

The client token that you want to use to ensure the idempotence of the request.

You can use the client to generate the value, but you must make sure that the value is unique among all requests. The ClientToken value contains only ASCII characters.

Note If you do not set this parameter, the system automatically uses the value of RequestId as the value of ClientToken. The value of RequestId for each API request is different.
RegionId String No cn-hangzhou

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

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

Response parameters

Parameter Type Example Description
RequestId String CEF72CEB-54B6-4AE8-B225-F876FF7BA984

The ID of the request.

RegionId String cn-hangzhou

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

LoadBalancerId String nlb-83ckzc8d4xlp8o****

The ID of the NLB instance.

LoadBalancerName String NLB1

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.

LoadBalancerType String network

The type of the instance. Only network is returned, which indicates an NLB instance.

AddressType String Internet

The type of IPv4 address that is 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 virtual private cloud (VPC) where the NLB instance is deployed.
AddressIpVersion String ipv4

The protocol version. Valid values:

  • ipv4: IPv4
  • DualStack: dual stack
Ipv6AddressType String Internet

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.
LoadBalancerStatus String Active

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.
  • 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.
LoadBalancerBusinessStatus String Normal

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.
OperationLocks Array of OperationLock

The list of NLB instances that are locked. This parameter is returned if LoadBalancerBussinessStatus is set to Abnormal.

LockType String SecurityLocked

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.
LockReason String Service exceptions.

The reason why the NLB instance is locked.

VpcId String vpc-bp1b49rqrybk45nio****

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

CreateTime String 2022-07-02T02:49:05Z

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

ResourceGroupId String rg-atstuj3rtop****

The ID of the resource group.

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

The domain name of the NLB instance.

ZoneMappings Array of ZoneMapping

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

VSwitchId String vsw-bp1rmcrwg3erh1fh8****

The ID of the vSwitch in the zone. By default, you can specify only one vSwitch (subnet) for each zone of an NLB instance.

ZoneId String cn-hangzhou-a

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

LoadBalancerAddresses Array of LoadBalancerAddress

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

EniId String eni-bp12f1xhs5yal61a****

The ID of the elastic network interface (ENI).

PrivateIPv4Address String 192.168.3.32

The private IPv4 address of the NLB instance.

AllocationId String eip-bp1aedxso6u80u0qf****

The ID of the elastic IP address (EIP).

PublicIPv4Address String 120.XX.XX.69

The public IPv4 address of the NLB instance.

Ipv6Address String 2001:db8:1:1:1:1:1:1

The IPv6 address of the NLB instance.

BandwidthPackageId String cbwp-bp1vevu8h3ieh****

The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.

SecurityGroupIds Array of String sg-bp10uag3q0jkxu72****

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

CrossZoneEnabled Boolean true

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

  • true: enabled
  • false: disabled
LoadBalancerBillingConfig Object

The configuration of the billing method.

PayType String PostPay

The billing method of the NLB instance.

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

Cps Integer 100

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

0 indicates that the number of connections is unlimited.

DeletionProtectionConfig Object

The configuration of the deletion protection feature.

Enabled Boolean true

Indicates whether deletion protection is enabled. Valid values:

  • true: enabled
  • false: disabled
Reason String The instance is in the Running state.

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.

EnabledTime String 2022-11-02T02:49:05Z

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

ModificationProtectionConfig Object

The configuration of the configuration read-only mode.

Status String ConsoleProtection

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

  • NonProtection: disabled. The Reason parameter cannot be set. If Reason is set, the value is cleared.
  • ConsoleProtection: enabled. In this case, the Reason parameter is returned.
Note If this parameter is set to ConsoleProtection, you cannot modify instance configurations in the NLB console. However, you can modify instance configurations by calling API operations.
Reason String Service guarantee period

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 is valid only if the Status parameter is set to ConsoleProtection.

EnabledTime String 2022-12-02T02:49:05Z

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

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetLoadBalancerAttribute
&LoadBalancerId=nlb-83ckzc8d4xlp8o****
&DryRun=false
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&RegionId=cn-hangzhou
&Common request parameters

Sample success responses

XML format

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

<GetLoadBalancerAttributeResponse>
    <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
    <RegionId>cn-hangzhou</RegionId>
    <LoadBalancerId>nlb-83ckzc8d4xlp8o****</LoadBalancerId>
    <LoadBalancerName>NLB1</LoadBalancerName>
    <LoadBalancerType>network</LoadBalancerType>
    <AddressType>Internet</AddressType>
    <AddressIpVersion>ipv4</AddressIpVersion>
    <Ipv6AddressType>Internet</Ipv6AddressType>
    <LoadBalancerStatus>Active</LoadBalancerStatus>
    <LoadBalancerBusinessStatus>Normal</LoadBalancerBusinessStatus>
    <OperationLocks>
        <LockType>SecurityLocked</LockType>
        <LockReason>Service exception. </LockReason>
    </OperationLocks>
    <VpcId>vpc-bp1b49rqrybk45nio****</VpcId>
    <CreateTime>2022-07-02T02:49:05Z</CreateTime>
    <ResourceGroupId>rg-atstuj3rtop****</ResourceGroupId>
    <DNSName>nlb-wb7r6dlwetvt5j****.cn-hangzhou.nlb.aliyuncs.com</DNSName>
    <ZoneMappings>
        <VSwitchId>vsw-bp1rmcrwg3erh1fh8****</VSwitchId>
        <ZoneId>cn-hangzhou-a</ZoneId>
        <LoadBalancerAddresses>
            <EniId>eni-bp12f1xhs5yal61a****</EniId>
            <PrivateIPv4Address>192.168.3.32</PrivateIPv4Address>
            <AllocationId>eip-bp1aedxso6u80u0qf****</AllocationId>
            <PublicIPv4Address>120.XX.XX.69</PublicIPv4Address>
            <Ipv6Address>2001:db8:1:1:1:1:1:1</Ipv6Address>
        </LoadBalancerAddresses>
    </ZoneMappings>
    <BandwidthPackageId>cbwp-bp1vevu8h3ieh****</BandwidthPackageId>
    <SecurityGroupIds>sg-bp10uag3q0jkxu72****</SecurityGroupIds>
    <CrossZoneEnabled>true</CrossZoneEnabled>
    <LoadBalancerBillingConfig>
        <PayType>PostPay</PayType>
    </LoadBalancerBillingConfig>
    <Cps>100</Cps>
    <DeletionProtectionConfig>
        <Enabled>true</Enabled>
        <Reason>The instance is in the Running state.</Reason>
        <EnabledTime>2022-11-02T02:49:05Z</EnabledTime>
    </DeletionProtectionConfig>
    <ModificationProtectionConfig>
        <Status>ConsoleProtection</Status>
        <Reason>Service guarantee period</Reason>
        <EnabledTime>2022-12-02T02:49:05Z</EnabledTime>
    </ModificationProtectionConfig>
</GetLoadBalancerAttributeResponse>

JSON format

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

{
  "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" : "Service exception."
  } ],
  "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"
    } ]
  } ],
  "BandwidthPackageId" : "cbwp-bp1vevu8h3ieh****",
  "SecurityGroupIds" : [ "sg-bp10uag3q0jkxu72****" ],
  "CrossZoneEnabled" : true,
  "LoadBalancerBillingConfig" : {
    "PayType" : "PostPay"
  },
  "Cps" : 100,
  "DeletionProtectionConfig" : {
    "Enabled" : true,
    "Reason" : "The instance is in the Running state.",
    "EnabledTime" : "2022-11-02T02:49:05Z"
  },
  "ModificationProtectionConfig" : {
    "Status" : "ConsoleProtection",
    "Reason" : "Service guarantee period",
    "EnabledTime" : "2022-12-02T02:49:05Z"
  }
}

Error codes

For a list of error codes, see Service error codes.