All Products
Search
Document Center

Server Load Balancer:GetListenerHealthStatus

Last Updated:Jun 10, 2026

Mengkueri status pemeriksaan kesehatan listener 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:GetListenerHealthStatus

get

*LoadBalancer

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

*Listener

acs:gwlb:{#regionId}:{#accountId}:listener/{#ListenerId}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

ListenerId

string

Yes

ID listener.

lsn-7sixpvm5fc3v0b****

NextToken

string

No

Token pagination yang digunakan dalam permintaan berikutnya untuk mengambil halaman hasil baru. Nilai yang valid:

  • Jika NextToken kosong, tidak ada halaman berikutnya.

  • Jika nilai NextToken dikembalikan, nilai tersebut menunjukkan token yang digunakan untuk kueri berikutnya.

4f1d7cc9f51e18904e8a063603a6b0c3d03bc69f78734254e0b5e8707e68****

MaxResults

integer

No

Jumlah entri per halaman. Nilai yang valid: 1 hingga 1000. Nilai default: 20.

20

Skip

integer

No

Jumlah entri yang akan dilewati dalam panggilan.

10

Filter

array<object>

No

Kondisi filter. Anda dapat menentukan paling banyak 20 kondisi filter.

object

No

Kondisi filter.

Name

string

No

Nama kondisi filter. Anda dapat memfilter berdasarkan satu atau beberapa nama kondisi filter. URL harus memenuhi persyaratan berikut:

  • Status: status kesehatan.

  • ReasonCode: penyebab server yang tidak sehat.

  • ServerId: ID server backend.

  • ServerIp: alamat IP server backend.

Status

Values

array

No

Nilai kondisi filter. Anda dapat menentukan paling banyak 20 nilai kondisi.

string

No

Nilai kondisi filter. Nilai yang valid bervariasi berdasarkan nama kondisi filter yang ditentukan dalam respons.

Unhealthy

Elemen respons

Element

Type

Description

Example

object

Parameter respons.

ListenerHealthStatus

array<object>

Status pemeriksaan kesehatan grup server yang terkait dengan listener.

array<object>

Status pemeriksaan kesehatan grup server yang terkait dengan listener.

ListenerId

string

ID listener.

lsn-sg8aha6pzjavvo****

ServerGroupInfos

array<object>

Informasi tentang grup server.

array<object>

Informasi tentang grup server.

HealthCheckEnabled

boolean

Indicates whether the health check feature is enabled. Valid values:

  • true

  • false

true

ServerGroupId

string

The server group ID.

sgp-0vdsbyszro3nr6****

Servers

array<object>

The backend servers.

array<object>

The backend server.

Port

integer

The backend port.

6081

Reason

object

The reason why Status indicates an unhealthy status.

ReasonCode

string

The reason why Status indicates an unhealthy status. Valid values:

  • CONNECT_TIMEOUT: The GWLB instance failed to connect to the backend server within the specified period of time.

  • CONNECT_FAILED: The GWLB instance failed to connect to the backend server.

  • RECV_RESPONSE_TIMEOUT: The GWLB instance failed to receive a response from the backend server within the specified period of time.

  • CONNECT_INTERRUPT: The connection between the health check and the backend server was interrupted.

  • HTTP_CODE_NOT_MATCH: The HTTP status code from the backend server is not the expected one.

  • HTTP_INVALID_HEADER: The format of the response from the backend servers is invalid.

CONNECT_TIMEOUT

ServerId

string

The backend server ID.

i-2ze4rnh8yj9kif3z****

ServerIp

string

The IP address of the server.

192.168.0.XXX

Status

string

The health status of the backend server. Valid values:

  • Initial: Health checks are configured for the GWLB instance, but no data is found.

  • Unhealthy: The backend server consecutively fails health checks.

  • Unused: The backend server is not in use.

  • Unavailable: Health checks are disabled.

  • Healthy: The backend server is healthy.

Healthy

MaxResults

integer

Jumlah entri per halaman. Nilai yang valid: 1 hingga 1000. Nilai default: 20.

20

NextToken

string

Token pagination. Dapat digunakan dalam permintaan berikutnya untuk mengambil halaman hasil baru. Nilai yang valid:

  • Jika NextToken kosong, tidak ada halaman berikutnya.

  • Jika nilai NextToken dikembalikan, nilai tersebut menunjukkan token yang digunakan untuk kueri berikutnya.

U12WEI6Ro2ol3wA54rBNSwdC5+lYy6q5SjIQEvc1wz5mjZxV+YjsHRdXV8XauY1BpOQIvwX63E0en54H3D****

RequestId

string

ID permintaan.

0ED4F222-36A0-5470-8A9A-AAB4E96BAC1A

TotalCount

integer

Jumlah total entri yang dikembalikan.

31

Contoh

Respons sukses

JSONformat

{
  "ListenerHealthStatus": [
    {
      "ListenerId": "lsn-sg8aha6pzjavvo****",
      "ServerGroupInfos": [
        {
          "HealthCheckEnabled": true,
          "ServerGroupId": "sgp-0vdsbyszro3nr6****",
          "Servers": [
            {
              "Port": 6081,
              "Reason": {
                "ReasonCode": "CONNECT_TIMEOUT"
              },
              "ServerId": "i-2ze4rnh8yj9kif3z****",
              "ServerIp": "192.168.0.XXX",
              "Status": "Healthy"
            }
          ]
        }
      ]
    }
  ],
  "MaxResults": 20,
  "NextToken": "U12WEI6Ro2ol3wA54rBNSwdC5+lYy6q5SjIQEvc1wz5mjZxV+YjsHRdXV8XauY1BpOQIvwX63E0en54H3D****",
  "RequestId": "0ED4F222-36A0-5470-8A9A-AAB4E96BAC1A",
  "TotalCount": 31
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 IllegalParam.FilterValue The param of %s is illegal. The parameter of FilterValue is illegal.
400 IllegalParam.FilterName The param of %s is illegal. The parameter of FilterName is illegal.
404 ResourceNotFound.Listener The specified resource of %s is not found. The specified resource of %s is not found.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.