Membuat listener untuk instance Gateway Load Balancer (GWLB).
Deskripsi operasi
Operasi CreateListener bersifat asinkron. Setelah mengirim permintaan, sistem akan mengembalikan ID permintaan, dan listener akan dibuat di latar belakang. Anda dapat memanggil operasi GetListenerAttribute untuk memeriksa status pembuatan listener:
Jika listener berada dalam status Provisioning, berarti listener sedang dalam proses pembuatan.
Jika listener berada dalam status Running, berarti listener telah berhasil 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. Panjang deskripsi harus antara 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 server group. |
sgp-ckh01px70dszof**** |
| TcpIdleTimeout |
integer |
No |
Periode timeout untuk koneksi TCP yang idle. Nilai yang valid: 60 hingga 6000 detik. Nilai default: 350 detik. |
350 |
| DryRun |
boolean |
No |
Menentukan apakah akan melakukan dry run. Nilai yang valid:
|
false |
| ClientToken |
string |
No |
Token client yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan client 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 boleh mengosongkannya. Panjang kunci tag maksimal 128 karakter dan tidak boleh diawali dengan |
testKey |
| Value |
string |
No |
Nilai tag. Panjang nilai tag maksimal 256 karakter dan tidak boleh mengandung |
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.