Queries the detailed configuration of an Application Load Balancer (ALB) 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 lb-bp1h66tp5uat84khm****

The ID of the ALB instance

Response parameters

Parameter Type Example Description
AccessLogConfig Object

The configurations of access logs.

LogProject String sls-setter

The log project.

LogStore String test

Log storage.

AddressAllocatedMode String Fixed

The method in which IP addresses are assigned. Valid values:

  • Fixed: The ALB instance uses a fixed IP address.
  • Dynamic (default): An IP address is dynamically assigned to each zone of the ALB instance.
AddressType String Internet

The type of IP address that the ALB instance uses to provide services. 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 virtual private cloud (VPC) where the ALB instance is deployed.
BandwidthPackageId String cbwp-bp1vevu8h3ieh****

The ID of the EIP bandwidth plan which is associated with an ALB instance that uses a public IP address.

CreateTime String 2019-06-03T17:22Z

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

DNSName String alb-12434.cn-hangzhou.alb.aliyuncs.com

The domain name of the ALB instance.

DeletionProtectionConfig Object

The configuration of deletion protection.

Enabled Boolean true

Indicates whether deletion protection is enabled. Valid values:

  • true: enabled
  • false: disabled
EnabledTime String 2019-06-03T17:22Z

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

LoadBalancerBillingConfig Object

The configuration of the billing method.

PayType String PostPay

The billing method.

The value is set to PostPay, which indicates a pay-as-you-go billing method.

LoadBalancerBussinessStatus String Normal

The status of the ALB instance. Valid values:

  • Abnormal: The ALB instance is not working as expected.
  • Normal: The ALB instance is working as expected.
LoadBalancerEdition String Standard

The edition of the ALB instance. Different editions have different limits and billing methods.

  • Basic: Basic Edition.
  • Standard: Standard Edition.
LoadBalancerId String lb-bp1o94dp5i6ea****

The ID of the ALB instance.

LoadBalancerName String alb1

The name of the ALB instance.

LoadBalancerOperationLocks Array of LoadBalancerOperationLock

The configuration of the operation lock.

LockReason String OverduePayments

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

LockType String FinancialLocked

The type of the lock. Valid values:

  • SecurityLocked: The ALB instance is locked due to security issues
  • RelatedResourceLocked: The ALB instance is locked due to association issues
  • FinancialLocked: The ALB instance is locked due to overdue payments
  • ResidualLocked: The ALB instance is locked because associated EIP bandwidth plans are released.
LoadBalancerStatus String Active

The state of the ALB instance. Valid values:

  • Inactive: The ALB instance is stopped. This indicates that the listeners no longer forward requests.
  • Active: The ALB instance is running as expected.
  • Provisioning: The ALB instance is being created.
  • Configuring: The configuration of 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 and the ALB instance must be deleted.
ModificationProtectionConfig Object

The configuration of modification protection.

Reason String ManageInstance

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

This parameter is valid only if ModificationProtectionStatus is set to ConsoleProtection.

Status String ConsoleProtection

Indicates whether modification protection 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 set, the value is cleared.
  • ConsoleProtection: Modification protection is enabled. In this case, you can set the ModificationProtectionReason parameter.
RegionId String cn-hangzhou

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

RequestId String 365F4154-92F6-4AE4-92F8-7FF34B540710

The ID of the request.

ResourceGroupId String rg-atstuj3rtop****

The ID of the enterprise resource group.

Tags Array of Tag

The tag of the ALB instance.

Key String FinanceDept

The key of the tag.

Value String FinanceJoshua

The value of the tag.

VpcId String vpc-25dvz****

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

ZoneMappings Array of ZoneMapping

The zones and vSwitches which are mapped to the zones. You must specify at least two zones.

LoadBalancerAddresses Array of LoadBalancerAddress

The endpoint of the ALB instance.

Address String 192.XX.XX.1

The IP address of the ALB instance. The type of the IP address is based on the AddressType parameter.

VSwitchId String vsw-12234****

The ID of the vSwitch that corresponds to the zone. You can use only one vSwitch and one subnet in each zone.

ZoneId String cn-hangzhou-a

The name of the zone.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetLoadBalancerAttribute
&LoadBalancerId=lb-bp1h66tp5uat84khm****
&Common request parameters

Sample success responses

XML format

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

<GetLoadBalancerAttributeResponse>
    <AccessLogConfig>
        <LogProject>sls-setter</LogProject>
        <LogStore>test</LogStore>
    </AccessLogConfig>
    <AddressAllocatedMode>Fixed</AddressAllocatedMode>
    <AddressType>Internet</AddressType>
    <BandwidthPackageId>cbwp-bp1vevu8h3ieh****</BandwidthPackageId>
    <CreateTime>2019-06-03T17:22Z</CreateTime>
    <DNSName>alb-12434.cn-hangzhou.alb.aliyuncs.com</DNSName>
    <DeletionProtectionConfig>
        <Enabled>true</Enabled>
        <EnabledTime>2019-06-03T17:22Z</EnabledTime>
    </DeletionProtectionConfig>
    <LoadBalancerBillingConfig>
        <PayType>PostPay</PayType>
    </LoadBalancerBillingConfig>
    <LoadBalancerBussinessStatus>Normal</LoadBalancerBussinessStatus>
    <LoadBalancerEdition>Standard</LoadBalancerEdition>
    <LoadBalancerId>lb-bp1o94dp5i6ea****</LoadBalancerId>
    <LoadBalancerName>alb1</LoadBalancerName>
    <LoadBalancerOperationLocks>
        <LockReason>OverduePayments</LockReason>
        <LockType>FinancialLocked</LockType>
    </LoadBalancerOperationLocks>
    <LoadBalancerStatus>Active</LoadBalancerStatus>
    <ModificationProtectionConfig>
        <Reason>ManageInstance</Reason>
        <Status>ConsoleProtection</Status>
    </ModificationProtectionConfig>
    <RegionId>cn-hangzhou</RegionId>
    <RequestId>365F4154-92F6-4AE4-92F8-7FF34B540710</RequestId>
    <ResourceGroupId>rg-atstuj3rtop****</ResourceGroupId>
    <Tags>
        <Key>FinanceDept</Key>
        <Value>FinanceJoshua</Value>
    </Tags>
    <VpcId>vpc-25dvz****</VpcId>
    <ZoneMappings>
        <LoadBalancerAddresses>
            <Address>192.XX.XX.1</Address>
        </LoadBalancerAddresses>
        <VSwitchId>vsw-12234****</VSwitchId>
        <ZoneId>cn-hangzhou-a</ZoneId>
    </ZoneMappings>
</GetLoadBalancerAttributeResponse>

JSON format

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

{
  "AccessLogConfig" : {
    "LogProject" : "sls-setter",
    "LogStore" : "test"
  },
  "AddressAllocatedMode" : "Fixed",
  "AddressType" : "Internet",
  "BandwidthPackageId" : "cbwp-bp1vevu8h3ieh****",
  "CreateTime" : "2019-06-03T17:22Z",
  "DNSName" : "alb-12434.cn-hangzhou.alb.aliyuncs.com",
  "DeletionProtectionConfig" : {
    "Enabled" : true,
    "EnabledTime" : "2019-06-03T17:22Z"
  },
  "LoadBalancerBillingConfig" : {
    "PayType" : "PostPay"
  },
  "LoadBalancerBussinessStatus" : "Normal",
  "LoadBalancerEdition" : "Standard",
  "LoadBalancerId" : "lb-bp1o94dp5i6ea****",
  "LoadBalancerName" : "alb1",
  "LoadBalancerOperationLocks" : [ {
    "LockReason" : "OverduePayments",
    "LockType" : "FinancialLocked"
  } ],
  "LoadBalancerStatus" : "Active",
  "ModificationProtectionConfig" : {
    "Reason" : "ManageInstance",
    "Status" : "ConsoleProtection"
  },
  "RegionId" : "cn-hangzhou",
  "RequestId" : "365F4154-92F6-4AE4-92F8-7FF34B540710",
  "ResourceGroupId" : "rg-atstuj3rtop****",
  "Tags" : [ {
    "Key" : "FinanceDept",
    "Value" : "FinanceJoshua"
  } ],
  "VpcId" : "vpc-25dvz****",
  "ZoneMappings" : [ {
    "LoadBalancerAddresses" : [ {
      "Address" : "192.XX.XX.1"
    } ],
    "VSwitchId" : "vsw-12234****",
    "ZoneId" : "cn-hangzhou-a"
  } ]
}

Error codes

HttpCode Error code Error message Description
404 ResourceNotFound.LoadBalancer The specified resource %s is not found. The error message returned because the specified resource %s does not exist.

For a list of error codes, visit the API Error Center.