All Products
Search
Document Center

Server Load Balancer:GetLoadBalancerAttribute

Last Updated:Jun 10, 2026

Mengkueri detail instans Application Load Balancer (ALB).

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

alb:GetLoadBalancerAttribute

get

*LoadBalancer

acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

LoadBalancerId

string

Yes

ID instans ALB.

alb-o9ulmq5hgn68jk****

Elemen respons

Element

Type

Description

Example

object

The details of the ALB instance configuration.

AccessLogConfig

object

The configuration of the access log feature.

LogProject

string

The Log Service project.

sls-setter

LogStore

string

The Logstore.

test

AddressAllocatedMode

string

The mode in which IP addresses are allocated. Valid values:

  • Fixed: allocates a static IP address to the ALB instance.

  • Dynamic: dynamically allocates an IP address to each zone of the ALB instance.

Dynamic

AddressType

string

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

Intranet

BandwidthPackageId

string

The ID of the elastic IP address (EIP) bandwidth plan that is associated with the Internet-facing ALB instance.

cbwp-bp1vevu8h3ieh****

CreateTime

string

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

DNSName

string

The domain name of the ALB instance.

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

DeletionProtectionConfig

object

The configuration of deletion protection.

Enabled

boolean

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

  • true

  • false

true

EnabledTime

string

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

LoadBalancerBillingConfig

object

The billing method of the ALB instance.

PayType

string

The billing method.

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

PostPay

LoadBalancerBussinessStatus

string

The service status of the ALB instance. Valid values:

  • Abnormal

  • Normal

Normal

LoadBalancerEdition

string

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

  • Basic

  • Standard

  • StandardWithWaf

Standard

LoadBalancerId

string

The ALB instance ID.

alb-o9ulmq5hgn68jk****

LoadBalancerName

string

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

LoadBalancerOperationLocks

array<object>

The type of the lock. Valid values:

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

  • 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 the associated resources have overdue payments and the resources are released.

object

LockReason

string

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

nolock

LockType

string

The lock type. Valid values:

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

  • RelatedResourceLocked: The ALB instance is locked due to other resources that are associated with the ALB instance.

  • FinancialLocked: The ALB instance is locked due to overdue payments.

  • ResidualLocked: The ALB instance is locked because the associated resources have overdue payments and the resources are released.

FinancialLocked

LoadBalancerStatus

string

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. You can only delete the ALB instance.

Active

ModificationProtectionConfig

object

The configuration read-only mode settings.

Reason

string

The reason why the configuration read-only mode is enabled.

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

This parameter takes effect only if Status is set to ConsoleProtection.

test

Status

string

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

  • NonProtection: The configuration read-only mode is disabled. In this case, the value of the Reason parameter that you specify does not take effect. If you set Reason, the value is cleared.

  • ConsoleProtection: The configuration read-only mode is enabled. In this case, the value of the Reason parameter takes effect.****

Catatan

If the parameter is set to ConsoleProtection, the configuration read-only mode is enabled. You cannot modify the configurations of the ALB instance in the ALB console. However, you can call API operations to modify the configurations of the ALB instance.

ConsoleProtection

RegionId

string

The region ID of the ALB instance.

cn-hangzhou

RequestId

string

The request ID.

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

ResourceGroupId

string

The resource group ID.

rg-atstuj3rtop****

Tags

array<object>

The tag value.

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

object

Key

string

The tag key.

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

FinanceDept

Value

string

The tag value.

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

FinanceJoshua

VpcId

string

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

vpc-bp1b49rqrybk45nio****

ZoneMappings

array<object>

The mappings between zones and vSwitches. At most 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. At most 10 zones are returned. If the current region supports two or more zones, at least two zones are returned.

LoadBalancerAddresses

array<object>

The address of the ALB instance.

object

The address of the ALB instance.

Address

string

An IPv4 address.

This parameter takes effect when AddressIPVersion is set to IPv4 or DualStack. The network type is determined by the value of AddressType.

192.168.10.1

Ipv6Address

string

An IPv6 address.

This parameter takes effect only when AddressIPVersion is set to DualStack. The network type is determined by the value of Ipv6AddressType.

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

IntranetAddress

string

The private IPv4 address.

10.0.1.181

AllocationId

string

The elastic IP address (EIP).

eip-uf6wm****1zj9

EipType

string

The type of EIP. Valid values:

  • Common: an EIP.

  • Anycast: an Anycast EIP.

Catatan

For more information about the regions in which ALB supports Anycast EIPs, see Limits.

Common

IntranetAddressHcStatus

string

The health status of the private IPv4 address of the ALB instance. This parameter is returned only when the Status of the zone is Active.Valid values:

  • Healthy

  • Unhealthy

Healthy

Ipv6AddressHcStatus

string

The health status of the private IPv6 address of the ALB instance. This parameter is returned only when the Status of the zone is Active.Valid values:

  • Healthy

  • Unhealthy

Healthy

Ipv4LocalAddresses

array

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

string

The IPv4 link-local address.

10.1.0.62

Ipv6LocalAddresses

array

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

string

The IPv6 link-local address.

2408:xxxx:249:dd01:6f4:750f:xxxx:bcda

VSwitchId

string

The vSwitch in the zone. You can specify only one vSwitch (subnet) in each zone of an ALB instance.

vsw-bp12mw1f8k3jgy****

ZoneId

string

The zone ID of the ALB instance.

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

cn-hangzhou-a

Status

string

The zone status. Valid values:

  • Active: The ALB instance is running.

  • Stopped: The ALB instance is disabled.

  • Shifted: The ALB instance is removed.

  • Starting: The ALB instance is starting.

  • Stopping: The ALB instance is stopping.

Active

AddressIpVersion

string

The IP version. Valid values:

  • IPv4

  • DualStack

DualStack

Ipv6AddressType

string

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

SecurityGroupIds

array

The IDs of the security groups to which the ALB instance is added.

string

The ID of the security group to which the ALB instance is added.

sg-uf63j385dzwlm6cy****

Contoh

Respons sukses

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": "nolock",
      "LockType": "FinancialLocked"
    }
  ],
  "LoadBalancerStatus": "Active",
  "ModificationProtectionConfig": {
    "Reason": "test",
    "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",
          "IntranetAddress": "10.0.1.181",
          "AllocationId": "eip-uf6wm****1zj9",
          "EipType": "Common",
          "IntranetAddressHcStatus": "Healthy",
          "Ipv6AddressHcStatus": "Healthy",
          "Ipv4LocalAddresses": [
            "10.1.0.62"
          ],
          "Ipv6LocalAddresses": [
            "2408:xxxx:249:dd01:6f4:750f:xxxx:bcda"
          ]
        }
      ],
      "VSwitchId": "vsw-bp12mw1f8k3jgy****",
      "ZoneId": "cn-hangzhou-a",
      "Status": "Active"
    }
  ],
  "AddressIpVersion": "DualStack",
  "Ipv6AddressType": "Intranet",
  "SecurityGroupIds": [
    "sg-uf63j385dzwlm6cy****"
  ]
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 Forbidden.LoadBalancer Authentication has failed for LoadBalancer.
404 ResourceNotFound.LoadBalancer The specified resource %s is not found. The specified resource %s is not found.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.