All Products
Search
Document Center

Server Load Balancer:GetLoadBalancerAttribute

Last Updated:Jun 10, 2026

Mengkueri detail tentang instans Network Load Balancer (NLB).

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

nlb:GetLoadBalancerAttribute

get

*LoadBalancer

acs:nlb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

LoadBalancerId

string

Yes

ID instans NLB.

nlb-83ckzc8d4xlp8o****

DryRun

boolean

No

Apakah akan menjalankan dry run, tanpa mengirim permintaan aktual. Nilai valid:

  • true: Memeriksa permintaan tanpa menjalankan operasi. Sistem memeriksa parameter yang diperlukan, sintaks permintaan, dan batasan. Jika permintaan gagal dalam dry run, Paket kesalahan dikembalikan. Jika permintaan lolos dry run, kode kesalahan DryRunOperation dikembalikan.

  • false (default): Menjalankan dry run dan mengirim permintaan aktual. Jika permintaan lolos dry run, kode status HTTP 2xx dikembalikan dan operasi dijalankan.

false

ClientToken

string

No

Token klien yang digunakan untuk memastikan idempotensi permintaan.

Anda dapat menggunakan klien untuk menghasilkan token. Pastikan token unik di antara permintaan yang berbeda. Token klien hanya dapat berisi karakter ASCII.

Catatan

Jika Anda tidak menentukan parameter ini, sistem menggunakan ID permintaan sebagai token klien. ID permintaan berbeda untuk setiap permintaan.

123e4567-e89b-12d3-a456-426655440000

RegionId

string

No

ID Wilayah instans NLB.

Anda dapat memanggil operasi DescribeRegions untuk mengkueri daftar Wilayah terbaru.

cn-hangzhou

Elemen respons

Element

Type

Description

Example

object

response

RequestId

string

The request ID.

CEF72CEB-54B6-4AE8-B225-F876FF7BA984

RegionId

string

The region ID of the NLB instance.

cn-hangzhou

LoadBalancerId

string

The NLB instance ID.

nlb-83ckzc8d4xlp8o****

LoadBalancerName

string

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

LoadBalancerType

string

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

network

AddressType

string

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

AddressIpVersion

string

The protocol version. Valid values:

  • ipv4: IPv4

  • DualStack: dual stack

ipv4

Ipv6AddressType

string

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

LoadBalancerStatus

string

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

LoadBalancerBusinessStatus

string

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

  • Abnormal

  • Normal

Normal

OperationLocks

array<object>

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

object

LockType

string

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

LockReason

string

The reason why the NLB instance is locked.

security

VpcId

string

The VPC ID of the NLB instance.

vpc-bp1b49rqrybk45nio****

CreateTime

string

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

Unit: milliseconds.

2022-07-02T02:49:05Z

ResourceGroupId

string

The ID of the resource group.

rg-atstuj3rtop****

DNSName

string

The domain name of the NLB instance.

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

ZoneMappings

array<object>

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

array<object>

The mappings between zones and vSwitches. You must add at least two zones. You can add a maximum of 10 zones.

VSwitchId

string

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

vsw-bp1rmcrwg3erh1fh8****

ZoneId

string

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

cn-hangzhou-a

LoadBalancerAddresses

array<object>

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

object

EniId

string

The ID of the elastic network interface (ENI).

eni-bp12f1xhs5yal61a****

PrivateIPv4Address

string

The private IPv4 address of the NLB instance.

192.168.3.32

AllocationId

string

The ID of the elastic IP address (EIP).

eip-bp1aedxso6u80u0qf****

PublicIPv4Address

string

The public IPv4 address of the NLB instance.

120.XX.XX.69

Ipv6Address

string

The IPv6 address of the NLB instance.

2001:db8:1:1:1:1:1:1

PrivateIPv4HcStatus

string

The health status of the private IPv4 address of the NLB instance. Valid values:

  • Healthy

  • Unhealthy

Catatan

This parameter is returned only when the Status of the zone is Active.

Healthy

PrivateIPv6HcStatus

string

The health status of the IPv6 address of the NLB instance. Valid values:

  • Healthy

  • Unhealthy

Catatan

This parameter is returned only when the Status of the zone is Active.

Healthy

Ipv4LocalAddresses

array

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

string

The IPv4 link-local address.

192.168.36.16

Ipv6LocalAddresses

array

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

string

The IPv6 link-local address.

2408:4005:357:ba00:64a2:221f:5685:8854

Status

string

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

BandwidthPackageId

string

The ID of the EIP bandwidth plan.

cbwp-bp1vevu8h3ieh****

SecurityGroupIds

array

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****

CrossZoneEnabled

boolean

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

  • true

  • false

true

LoadBalancerBillingConfig

object

The billing information of the NLB instance.

PayType

string

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

PostPay

Cps

integer

The maximum number of new connections per second supported by the NLB instance in each zone (virtual IP address). Valid values: 0 to 1000000.

0 indicates that the number of connections is unlimited.

100

DeletionProtectionConfig

object

The configuration of the deletion protection feature.

Enabled

boolean

Specifies whether to enable deletion protection. Valid values:

  • true: yes

  • false (default): no

true

Reason

string

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

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-11-02T02:49:05Z

ModificationProtectionConfig

object

The configuration of the configuration read-only mode.

Status

string

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.

Catatan

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

Reason

string

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.

Catatan

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

create-by-mse-cannot-modify

EnabledTime

string

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

Tags

array<object>

The tags.

object

TagKey

string

The tag key.

KeyTest

TagValue

string

The tag value.

ValueTest

Contoh

Respons sukses

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",
          "Ipv4LocalAddresses": [
            "192.168.36.16"
          ],
          "Ipv6LocalAddresses": [
            "2408:4005:357:ba00:64a2:221f:5685:8854"
          ]
        }
      ],
      "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"
    }
  ]
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 DuplicatedParam.%s The param of %s is duplicated.
400 OperationFailed.GetXipFailed Operation failed because GetXipFailed. The operation failed because the instance is still being created.
403 Forbidden.NoPermission Authentication is failed for NoPermission. Authentication is failed for NoPermission.
404 ResourceNotFound.loadBalancer The specified resource of loadbalancer is not found. The specified load balancer resource was not found. Please check the input parameters.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.