All Products
Search
Document Center

Server Load Balancer:UpdateServerGroupAttribute

Last Updated:Jun 10, 2026

Memperbarui atribut kelompok server Server Load Balancer.

Deskripsi operasi

UpdateServerGroupAttribute is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. The server group configuration is not updated immediately. You can call the ListServerGroups operation to query the status of the server group.

  • If a server group is in the Configuring state, its configuration is being updated.

  • If a server group is in the Available state, its configuration is updated.

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:UpdateServerGroupAttribute

update

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

ServerGroupId

string

Yes

ID kelompok server.

sgp-atstuj3rtoptyui****

ServerGroupName

string

No

Nama kelompok server.

Nama harus terdiri dari 2 hingga 128 karakter, diawali dengan huruf atau karakter China, dan dapat berisi digit, periode (.), garis bawah (_), dan tanda hubung (-).

testServerGroupName

Scheduler

string

No

Algoritma penjadwalan. Nilai valid:

  • 5TCH: 5-tuple penghashan. Paket didistribusikan ke server backend berdasarkan hash 5-tupel dari alamat IP sumber, alamat IP tujuan, port sumber, port tujuan, dan protokol. Ini memastikan bahwa aliran yang sama selalu dijadwalkan ke server backend yang sama.

  • 3TCH: 3-tuple penghashan. Paket didistribusikan ke server backend berdasarkan hash 3-tupel dari alamat IP sumber, alamat IP tujuan, dan protokol. Ini memastikan bahwa aliran yang sama selalu dijadwalkan ke server backend yang sama.

  • 2TCH: 2-tuple penghashan. Paket didistribusikan ke server backend berdasarkan hash 2-tupel dari alamat IP sumber dan alamat IP tujuan. Ini memastikan bahwa aliran yang sama selalu dijadwalkan ke server backend yang sama.

5TCH

ServerFailoverMode

string

No

Metode yang digunakan untuk handle koneksi yang ada ketika server backend mengalami pengecualian. Nilai valid:

  • NoRebalance: Koneksi yang ada tidak diseimbangkan ulang.

  • Rebalance: Koneksi yang ada diseimbangkan ulang.

NoRebalance

ConnectionDrainConfig

object

No

Konfigurasi pengurasan koneksi.

ConnectionDrainEnabled

boolean

No

Specifies whether to enable connection draining. Valid values:

  • true

  • false

false

ConnectionDrainTimeout

integer

No

The timeout period of connection draining.

Unit: seconds.

Valid values: 1 to 3600.

300

HealthCheckConfig

object

No

Konfigurasi pemeriksaan kesehatan.

HealthCheckConnectPort

integer

No

The port that is used for health checks on backend servers.

Valid values: 1 to 65535.

80

HealthCheckConnectTimeout

integer

No

The maximum timeout period of a health check response.

Unit: seconds.

Valid values: 1 to 300.

5

HealthCheckDomain

string

No

The domain name that is used for health checks. Valid values:

  • $SERVER_IP: the private IP address of a backend server.

  • domain: a specified domain name. The domain name must be 1 to 80 characters in length and can contain letters, digits, hyphens (-), and periods (.).

Catatan

This parameter takes effect only when HealthCheckProtocol is set to HTTP.

$SERVER_IP

HealthCheckEnabled

boolean

No

Specifies whether to enable health checks. Valid values:

  • true

  • false

true

HealthCheckHttpCode

array

No

The list of HTTP status codes that indicate a healthy state.

string

No

The HTTP status code that indicates a healthy state. You can specify multiple HTTP status codes. Separate multiple status codes with commas (,). Valid values:

  • http_2xx: An HTTP 2xx status code indicates a healthy state.

  • http_3xx: An HTTP 3xx status code indicates a healthy state.

  • http_4xx: An HTTP 4xx status code indicates a healthy state.

  • http_5xx: An HTTP 5xx status code indicates a healthy state.

Default value: http_2xx.

Catatan

This parameter takes effect only when HealthCheckProtocol is set to HTTP.

http_2xx

HealthCheckInterval

integer

No

The interval at which health checks are performed.

Unit: seconds.

Valid values: 1 to 50.

10

HealthCheckPath

string

No

The path that is used for health checks.

The path must be 1 to 80 characters in length and can contain letters, digits, and the following special characters: -/.%?#&. It must start with a forward slash (/).

Catatan

This parameter takes effect only when HealthCheckProtocol is set to HTTP.

/test/index.html

HealthCheckProtocol

string

No

The protocol that is used for health checks. Valid values:

  • TCP: TCP SYN packets are sent to a backend server to check whether the port of the backend server is reachable.

  • HTTP: GET requests are sent to a backend server to check whether the server application is healthy.

TCP

HealthyThreshold

integer

No

The number of consecutive successful health checks required to change the health check status of a backend server from failed to successful.

Valid values: 2 to 10.

2

UnhealthyThreshold

integer

No

The number of consecutive failed health checks required to change the health check status of a backend server from successful to failed.

Valid values: 2 to 10.

2

HealthCheckReq

string

No

HealthCheckExp

string

No

DryRun

boolean

No

Apakah akan menjalankan dry run. Nilai valid:

  • true: Menjalankan dry run. Sistem memeriksa parameter yang diperlukan, format permintaan, dan batas layanan. Jika permintaan gagal dry run, Paket kesalahan dikembalikan. Jika permintaan lolos dry run, kode kesalahan DryRunOperation dikembalikan.

  • false (default): Menjalankan dry run dan mengirim permintaan. 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, tetapi Anda harus memastikan bahwa token tersebut unik di antara permintaan yang berbeda. Token hanya dapat berisi karakter ASCII.

Catatan

Jika Anda tidak menentukan parameter ini, sistem secara otomatis menggunakan RequestId dari permintaan sebagai ClientToken. RequestId mungkin berbeda untuk setiap permintaan.

123e4567-e89b-12d3-a456-42665544****

Elemen respons

Element

Type

Description

Example

object

The response data.

RequestId

string

The request ID.

54B48E3D-DF70-471B-AA93-08E683A1B45

Contoh

Respons sukses

JSONformat

{
  "RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45\n"
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 IllegalParam.HealthCheckProtocol The param of %s is illegal.
400 IncorrectStatus.ServerGroup The status of %s [%s] is incorrect.
400 OperationDenied.SchedulerNotConfigurable The scheduling algorithm of server group is configurable only when TCP idle timeout of listener is default value.
404 ResourceNotFound.ServerGroup The specified resource of %s is not found.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.