All Products
Search
Document Center

Server Load Balancer:GetLoadBalancerAttribute

Last Updated:Jun 10, 2026

Mengkueri detail instans Gateway Load Balancer (GWLB).

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

gwlb:GetLoadBalancerAttribute

get

*LoadBalancer

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

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

LoadBalancerId

string

Yes

ID instans GWLB.

gwlb-9njtjmqt7zfcqm****

Elemen respons

Element

Type

Description

Example

object

AddressIpVersion

string

The protocol version. Valid values:

  • Ipv4: IPv4.

IPv4

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.

2024-07-08T10:12:58Z

LoadBalancerBusinessStatus

string

The business status of the GWLB instance. Valid values:

  • Normal: running as expected

  • FinancialLocked: locked due to overdue payments

Normal

LoadBalancerId

string

The GWLB instance ID.

gwlb-9njtjmqt7zfcqm****

LoadBalancerName

string

The GWLB 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.

gwlb

LoadBalancerStatus

string

The GWLB instance status. Valid values:

  • Active: The GWLB instance is running.

  • Inactive: The GWLB instance is disabled. Listeners of GWLB instances in the Inactive state do not forward traffic.

  • Provisioning: The GWLB instance is being created.

  • Configuring: The GWLB instance is being modified.

Active

RequestId

string

The request ID.

B6DC5DDC-9560-59BF-80FA-ED1E5CB417DF

ResourceGroupId

string

The resource group ID.

rg-acfmx7pmxcy****

Tags

array<object>

The tags.

object

The information about the tag.

Key

string

The tag key. The tag key cannot be an empty string.

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

testTagKey

Value

string

The tag value. The tag value can be up to 256 characters in length and cannot contain http:// or https://.

testTagValue

VpcId

string

The VPC ID.

vpc-k1aajsbwbaq4todet****

ZoneMappings

array<object>

The mappings between zones and vSwitches. You must specify at least one zone. You can specify at most 20 zones. If the region supports two or more zones, specify at least two zones.

array<object>

The information about the zones and vSwitches.

LoadBalancerAddresses

array<object>

The GWLB instance addresses.

object

The details about the GWLB instance addresses.

EniId

string

The ID of the elastic network interface (ENI) used by the GWLB instance.

eni-bp1iahwz3rzgvltz****

PrivateIpv4Address

string

The private IPv4 address.

192.168.XX.XX

VSwitchId

string

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

vsw-uf6v8l7d2f1k53xrl****

ZoneId

string

The zone ID.

cn-hangzhou-j

TrafficMode

string

Traffic processing mode. Valid values:

  • LoadBalance: load balancing mode. GWLB forwards traffic to backend servers.

  • ByPass: bypass mode. GWLB directly returns traffic to the GWLB endpoint without forwarding it to the backend servers.

LoadBalance

Contoh

Respons sukses

JSONformat

{
  "AddressIpVersion": "IPv4",
  "CreateTime": "2024-07-08T10:12:58Z",
  "LoadBalancerBusinessStatus": "Normal",
  "LoadBalancerId": "gwlb-9njtjmqt7zfcqm****",
  "LoadBalancerName": "gwlb",
  "LoadBalancerStatus": "Active",
  "RequestId": "B6DC5DDC-9560-59BF-80FA-ED1E5CB417DF",
  "ResourceGroupId": "rg-acfmx7pmxcy****",
  "Tags": [
    {
      "Key": "testTagKey",
      "Value": "testTagValue"
    }
  ],
  "VpcId": "vpc-k1aajsbwbaq4todet****",
  "ZoneMappings": [
    {
      "LoadBalancerAddresses": [
        {
          "EniId": "eni-bp1iahwz3rzgvltz****",
          "PrivateIpv4Address": "192.168.XX.XX"
        }
      ],
      "VSwitchId": "vsw-uf6v8l7d2f1k53xrl****",
      "ZoneId": "cn-hangzhou-j"
    }
  ],
  "TrafficMode": "LoadBalance"
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 ResourceNotFound.LoadBalancer The specified resource of %s is not found.
400 MissingParam.LoadBalancerId The param of LoadBalancerId is missing. Load balancing ID parameter missing

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.