All Products
Search
Document Center

Server Load Balancer:GetLoadBalancerAttribute

Last Updated:Apr 20, 2023

Queries the detailed configuration of an Application Load Balancer (ALB) instance based on an instance ID.

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 keyAssociation operation
alb:GetLoadBalancerAttributeRead
  • ALB
    acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
  • acs:ResourceTag
none

Request parameters

ParameterTypeRequiredDescriptionExample
LoadBalancerIdstringYes

The ID of the ALB instance.

alb-o9ulmq5hgn68jk****

Response parameters

ParameterTypeDescriptionExample
object
AccessLogConfigobject

The configuration of the access log feature.

LogProjectstring

The log project.

sls-setter
LogStorestring

The Logstore.

test
AddressAllocatedModestring

The mode used to assign IP addresses to zones of the ALB instance. Valid values:

  • Fixed: assigns a static IP address to the ALB instance.
  • Dynamic: dynamically assigns an IP address to each zone of the ALB instance.
Dynamic
AddressTypestring

The type of the IPv4 address that is used by the ALB instance. 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. In this case, 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. In this case, the ALB instance can be accessed over the virtual private cloud (VPC) where the ALB instance is deployed.
Intranet
BandwidthPackageIdstring

The ID of the Elastic IP Address (EIP) bandwidth plan which is associated with the ALB instance if the ALB instance uses a public IP address.

cbwp-bp1vevu8h3ieh****
CreateTimestring

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

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

The domain name of the ALB instance.

alb-95qnr2itwu9orb****.cn-hangzhou.alb.aliyuncs.com
DeletionProtectionConfigobject

The configuration of the deletion protection feature.

Enabledboolean

Indicates whether the deletion protection feature is enabled. Valid values:

  • true: The deletion protection feature is enabled.
  • false: The deletion protection feature is disabled.
true
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-08-02T02:49:05Z
LoadBalancerBillingConfigobject

The configuration of the billing method of the ALB instance.

PayTypestring

The billing method.

The value PostPay is returned. The value indicates the pay-as-you-go billing method.

PostPay
LoadBalancerBussinessStatusstring

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.
Normal
LoadBalancerEditionstring

The edition of the ALB instance. The features and billing rules vary based on the edition of the ALB instance. Valid values:

  • Basic: basic.
  • Standard: standard.
  • StandardWithWaf: WAF-enabled.
Standard
LoadBalancerIdstring

The ID of the ALB instance.

alb-o9ulmq5hgn68jk****
LoadBalancerNamestring

The name of the ALB 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.

alb1
LoadBalancerOperationLocksarray

The configuration of the operation lock.

object
LockReasonstring

The reason why the ALB instance was locked. This parameter is available only if you specify the LoadBalancerBussinessStatus parameter to Abnormal.

LockTypestring

The type of the lock. Valid values:

  • SecurityLocked: The ALB instance was locked due to security reasons.
  • RelatedResourceLocked: The ALB instance was locked due to association issues.
  • FinancialLocked: The ALB instance was locked due to overdue payments.
  • ResidualLocked: The ALB instance was locked because the associated EIP bandwidth plans were released.
FinancialLocked
LoadBalancerStatusstring

The status of the ALB instance. Valid values:

  • Inactive: The ALB instance is disabled. ALB instances in the Inactive state do not forward traffic.
  • Active: The ALB instance is running.
  • Provisioning: The ALB instance is being created.
  • Configuring: 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.
Active
ModificationProtectionConfigobject

The configuration of the configuration read-only mode.

Reasonstring

The reason why the configuration read-only mode was 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 you set the ModificationProtectionStatus parameter to ConsoleProtection.

Statusstring

The status of the configuration read-only mode. Valid values:

  • NonProtection: The configuration read-only mode is disabled. In this case, you cannot specify the ModificationProtectionReason parameter. If you specify the ModificationProtectionReason parameter, the value of the parameter is cleared.
  • ConsoleProtection: The configuration read-only mode is enabled. In this case, you can specify the ModificationProtectionReason parameter.
NoteIf you set this parameter to ConsoleProtection, you cannot modify the configurations of the instance in the ALB console. However, you can call API operations to modify the configurations of the instance.
ConsoleProtection
RegionIdstring

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

cn-hangzhou
RequestIdstring

The ID of the request.

365F4154-92F6-4AE4-92F8-7FF34B540710
ResourceGroupIdstring

The ID of the resource group.

rg-atstuj3rtop****
Tagsarray

The tags that were added to the ALB instance.

object
Keystring

The key of tag N.

The key can be up to 128 characters in length, and cannot start with acs: or aliyun. The key cannot contain http:// or https://.

FinanceDept
Valuestring

The value of tag N.

The value can be up to 128 characters in length and cannot start with acs: or aliyun. The value cannot contain http:// or https://.

FinanceJoshua
VpcIdstring

The ID of the VPC in which the ALB instance was deployed.

vpc-bp1b49rqrybk45nio****
ZoneMappingsarray

The zones and the vSwitches. You must specify at least two zones.

object
LoadBalancerAddressesarray

The IP addresses that are used by the ALB instance.

object
Addressstring

The IPv4 address that is used by the ALB instance.

This parameter is available only if you set the AddressIPVersion parameter to IPv4. The AddressType parameter determines whether the IPv4 address is public or private.

192.168.10.1
Ipv6Addressstring

The IPv6 address that is used by the ALB instance.

This parameter is available only if you set the AddressIPVersion parameter to DualStack. The AddressType parameter determines whether the IPv6 address is public or private.

2408:XXXX:39d:eb00::/56
VSwitchIdstring

The ID of the vSwitch in the zone. Each zone can contain only one vSwitch and one subnet.

vsw-bp12mw1f8k3jgy****
ZoneIdstring

The ID of the zone where the ALB instance was deployed.

You can call the DescribeZones operation to query the zones of the ALB instance.

cn-hangzhou-a
AddressIpVersionstring

The protocol version. Valid values:

  • IPv4: IPv4.
  • DualStack: dual stack.
DualStack
Ipv6AddressTypestring

The type of IPv6 address that is used by the ALB instance. 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 VPC in which the ALB instance is deployed.
Intranet

Examples

Sample success responses

JSONformat

{
  "AccessLogConfig": {
    "LogProject": "sls-setter",
    "LogStore": "test"
  },
  "AddressAllocatedMode": "Dynamic",
  "AddressType": "Intranet",
  "BandwidthPackageId": "cbwp-bp1vevu8h3ieh****",
  "CreateTime": "2022-07-02T02:49:05Z",
  "DNSName": "alb-95qnr2itwu9orb****.cn-hangzhou.alb.aliyuncs.com",
  "DeletionProtectionConfig": {
    "Enabled": true,
    "EnabledTime": "2022-08-02T02:49:05Z"
  },
  "LoadBalancerBillingConfig": {
    "PayType": "PostPay"
  },
  "LoadBalancerBussinessStatus": "Normal",
  "LoadBalancerEdition": "Standard",
  "LoadBalancerId": "alb-o9ulmq5hgn68jk****",
  "LoadBalancerName": "alb1",
  "LoadBalancerOperationLocks": [
    {
      "LockReason": "",
      "LockType": "FinancialLocked"
    }
  ],
  "LoadBalancerStatus": "Active",
  "ModificationProtectionConfig": {
    "Reason": "",
    "Status": "ConsoleProtection"
  },
  "RegionId": "cn-hangzhou",
  "RequestId": "365F4154-92F6-4AE4-92F8-7FF34B540710",
  "ResourceGroupId": "rg-atstuj3rtop****",
  "Tags": [
    {
      "Key": "FinanceDept",
      "Value": "FinanceJoshua"
    }
  ],
  "VpcId": "vpc-bp1b49rqrybk45nio****",
  "ZoneMappings": [
    {
      "LoadBalancerAddresses": [
        {
          "Address": "192.168.10.1",
          "Ipv6Address": "2408:XXXX:39d:eb00::/56"
        }
      ],
      "VSwitchId": "vsw-bp12mw1f8k3jgy****",
      "ZoneId": "cn-hangzhou-a"
    }
  ],
  "AddressIpVersion": "DualStack",
  "Ipv6AddressType": "Intranet"
}

Error codes

HTTP status codeError codeError messageDescription
404ResourceNotFound.LoadBalancerThe specified resource %s is not found.The specified resource %s is not found.

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

Change history

Change timeSummary of changesOperation
2023-04-11The error codes of the API operation change.,The response structure of the API operation changes.
Change itemChange content
Error CodesThe error codes of the API operation change.
    delete Error Codes: 404
Output ParametersThe response structure of the API operation changes.