Membuat listener untuk instans Gateway Load Balancer (GWLB).
Deskripsi operasi
Operasi CreateListener bersifat asinkron. Setelah Anda mengirim permintaan, sistem mengembalikan ID permintaan. Listener dibuat di latar belakang. Anda dapat memanggil operasi GetListenerAttribute untuk mengkueri status pembuatan listener:
-
Jika listener berada dalam status Provisioning, listener sedang dibuat.
-
Jika listener berada dalam status Running, listener telah dibuat.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
gwlb:CreateListener |
create |
*LoadBalancer
*ServerGroup
*Listener
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| LoadBalancerId |
string |
Yes |
ID instans GWLB. |
gwlb-te609d6696632f7***** |
| ListenerDescription |
string |
No |
Deskripsi listener. Deskripsi harus terdiri dari 2 hingga 256 karakter. Deskripsi dapat berisi karakter Tionghoa, huruf, angka, koma (,), titik (.), titik koma (;), garis miring (/), tanda at (@), garis bawah (_), dan tanda hubung (-). |
listener-description |
| ServerGroupId |
string |
Yes |
ID grup server. |
sgp-ckh01px70dszof**** |
| TcpIdleTimeout |
integer |
No |
Periode batas waktu koneksi TCP idle. Nilai valid: 60 hingga 6000 detik. Nilai default: 350 detik. |
350 |
| DryRun |
boolean |
No |
Menentukan apakah akan melakukan 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 boleh berisi karakter ASCII. Catatan
Jika Anda tidak menentukan parameter ini, sistem secara otomatis menggunakan RequestId dari permintaan sebagai ClientToken. RequestId dapat berbeda untuk setiap permintaan. |
123e4567-e89b-12d3-a456-42665544**** |
| Tag |
array<object> |
No |
Tag. Anda dapat menentukan hingga 20 tag dalam setiap panggilan. |
|
|
object |
No |
Tag. |
||
| Key |
string |
No |
Kunci tag. Jika Anda menentukan parameter ini, Anda tidak dapat membiarkannya kosong. Kunci tag dapat memiliki panjang hingga 128 karakter dan tidak boleh dimulai dengan |
testKey |
| Value |
string |
No |
Nilai tag. Nilai tag dapat memiliki panjang hingga 256 karakter dan tidak boleh berisi |
testValue |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Data yang dikembalikan. |
||
| ListenerId |
string |
ID listener. |
lsn-wi3c0v30ivysrg**** |
| RequestId |
string |
ID permintaan. |
A045E652-D298-5E70-A978-7247135336FB |
Contoh
Respons sukses
JSONformat
{
"ListenerId": "lsn-wi3c0v30ivysrg****",
"RequestId": "A045E652-D298-5E70-A978-7247135336FB"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IncorrectBusinessStatus.LoadBalancer | The business status of %s [%s] is incorrect. | Resource %s with business state %s does not support current operation |
| 400 | MissingParam.TagKey | The param of TagKey is missing. | The parameter of tag key is missing. |
| 400 | MissingParam.TagValue | The param of TagValue is missing. | The parameter of tag value is missing. |
| 400 | OperationDenied.TooManyListeners | The operation is not allowed because of TooManyListener. | The number of listeners of the load balancer instance exceeds the limit. The operation is denied. |
| 400 | IncorrectStatus.LoadBalancer | The status of %s [%s] is incorrect. | Resource %s current state %s does not support operation |
| 400 | ResourceInUse.IP | The specified resource of IP is in use. | |
| 400 | Mismatch.VpcId | The %s is mismatched for %s and %s. | The VPC IDs of the two resources do not match. |
| 400 | IncorrectStatus.ServerGroup | The status of %s [%s] is incorrect. | The status of %s [%s] is incorrect. |
| 400 | DuplicatedParam.TagKey | The param of %s is duplicated. | The parameter of tag key is duplicated. |
| 400 | IllegalParam.TagKey | The param of %s is illegal. | |
| 400 | IllegalParam.TagValue | The param of %s is illegal. | The parameter of tag value is illegal. |
| 400 | OperationDenied.TcpIdleTimeoutConflictWithScheduler | The TCP idle timeout of listener must be default value when the scheduling algorithm of server group is not 5TCH. | The TCP idle timeout of listener must be default value when the scheduling algorithm of server group is not 5TCH. |
| 404 | ResourceNotFound.LoadBalancer | The specified resource of %s is not found. | The specified resource of .LoadBalancer is not found. |
| 404 | ResourceNotFound.ServerGroup | The specified resource of %s is not found. | The specified server group resource does not exist. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.