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
Test
RAM authorization
|
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 |
| ServerFailoverMode |
string |
No |
Metode yang digunakan untuk handle koneksi yang ada ketika server backend mengalami pengecualian. Nilai valid:
|
NoRebalance |
| ConnectionDrainConfig |
object |
No |
Konfigurasi pengurasan koneksi. |
|
| ConnectionDrainEnabled |
boolean |
No |
Specifies whether to enable connection draining. Valid values:
|
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:
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 |
| 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:
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: 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 |
| 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:
|
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.