Membuat kelompok server untuk instans Gateway Load Balancer (GWLB).
Deskripsi operasi
CreateServerGroup is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the ListServerGroups operation to query the status of the task.
-
If the server group is in the Creating state, it indicates that the server group is being created.
-
If the server group is in the Available state, it indicates that the server group is created.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
gwlb:CreateServerGroup |
create |
*ServerGroup
*VPC
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ServerGroupType |
string |
No |
Tipe kelompok server. Nilai valid:
|
Instance |
| ServerGroupName |
string |
No |
Nama kelompok server. Nama harus terdiri dari 2 hingga 128 karakter, dan dapat berisi angka, periode (.), garis bawah (_), serta tanda hubung (-). Harus diawali dengan huruf. |
testServerGroupName |
| Protocol |
string |
No |
Protokol backend. Nilai valid:
Valid values:
|
GENEVE |
| Scheduler |
string |
No |
Algoritma penjadwalan. Nilai valid:
|
5TCH |
| ServerFailoverMode |
string |
No |
Menentukan bagaimana GWLB memproses permintaan melalui koneksi yang sudah ada ketika server backend tidak berjalan seperti yang diharapkan. Nilai valid:
|
NoRebalance |
| VpcId |
string |
Yes |
ID VPC. Catatan
Jika ServerGroupType disetel ke Instance, hanya server di VPC yang ditentukan yang dapat ditambahkan ke kelompok server. |
vpc-bp15zckdt37pq72zv**** |
| ResourceGroupId |
string |
No |
ID kelompok sumber daya. |
rg-atstuj3rtop**** |
| 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. Default value: 300. |
300 |
| HealthCheckConfig |
object |
No |
Konfigurasi pemeriksaan kesehatan. |
|
| HealthCheckConnectPort |
integer |
No |
The backend server port used for health checks. Valid values: 1 to 65535. Default value: 80. |
80 |
| HealthCheckConnectTimeout |
integer |
No |
The maximum timeout period for a health check response. Unit: seconds. Valid values: 1 to 300. Default value: 5. |
5 |
| HealthCheckDomain |
string |
No |
The domain name used for health checks. Valid values:
Catatan
This parameter takes effect only if you set HealthCheckProtocol to HTTP. |
$SERVER_IP |
| HealthCheckEnabled |
boolean |
No |
Specifies whether to enable health checks. Valid values:
|
true |
| HealthCheckHttpCode |
array |
No |
The HTTP status codes that the system returns for health checks. |
|
|
string |
No |
The HTTP status codes returned for health checks. Multiple HTTP status codes are separated by commas (,). Valid values:
Default value: http_2xx. Catatan
This parameter takes effect only if you set HealthCheckProtocol to HTTP. |
http_2xx |
|
| HealthCheckInterval |
integer |
No |
The interval at which health checks are performed. Unit: seconds. Valid values: 1 to 50. Default value: 10. |
10 |
| HealthCheckPath |
string |
No |
The path used for health checks. It must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URL can also contain the following extended characters: _ ; ~ ! ( ) * [ ] @ $ ^ : ' , + = It must start with a forward slash (/). Catatan
This parameter takes effect only if you set HealthCheckProtocol to HTTP. |
/test/index.html |
| HealthCheckProtocol |
string |
No |
The protocol used for health checks. Valid values:
|
TCP |
| HealthyThreshold |
integer |
No |
The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health check status of the backend server changes from fail to success. Valid values: 2 to 10. Default value: 2. |
2 |
| UnhealthyThreshold |
integer |
No |
The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health check status of the backend server changes from success to fail. Valid values: 2 to 10. Default value: 2. |
2 |
| HealthCheckReq |
string |
No |
||
| HealthCheckExp |
string |
No |
||
| Tag |
array<object> |
No |
Kunci tag. Anda dapat menentukan paling banyak 20 tag dalam setiap pemanggilan. |
|
|
object |
No |
The tag. |
||
| Key |
string |
No |
The tag key. The tag key cannot be an empty string. The tag key can be up to 128 characters in length, and cannot start with |
testTagKey |
| Value |
string |
No |
The tag value. The tag value can be up to 256 characters in length and cannot contain |
testTagValue |
| DryRun |
boolean |
No |
Apakah akan menjalankan dry run saja tanpa menjalankan permintaan aktual. 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 klien hanya boleh berisi karakter ASCII. Catatan
Jika Anda tidak menentukan parameter ini, sistem secara otomatis menggunakan request ID sebagai token klien. Request ID dapat berbeda untuk setiap permintaan. |
123e4567-e89b-12d3-a456-42665544**** |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
54B48E3D-DF70-471B-AA93-08E683A1B45 |
| ServerGroupId |
string |
The server group ID. |
sgp-atstuj3rtoptyui**** |
Contoh
Respons sukses
JSONformat
{
"RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45",
"ServerGroupId": "sgp-atstuj3rtoptyui****"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalParam.HealthCheckProtocol | The param of %s is illegal. | |
| 400 | QuotaExceeded.ServerGroupsNum | The quota of %s is exceeded for resource %s, usage %s/%s. | |
| 400 | DuplicatedParam.TagKey | The param of %s is duplicated. | |
| 400 | IllegalParam.TagKey | The param of %s is illegal. | |
| 404 | ResourceNotFound.Vpc | The specified resource of %s is not found. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.