Membuat listener TCP.
Deskripsi operasi
Listener yang baru dibuat berada dalam status stopped. Setelah membuat listener, panggil operasi StartLoadBalancerListener untuk mengaktifkannya agar dapat meneruskan lalu lintas jaringan.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
slb:CreateLoadBalancerTCPListener |
create |
AccessControlList
*LoadBalancer
|
|
None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
ID wilayah tempat instans Classic Load Balancer (CLB) ditempatkan. Untuk daftar wilayah terbaru, lihat Wilayah dan zona atau panggil operasi DescribeRegions untuk mengambil informasi tersebut. |
cn-hangzhou |
| LoadBalancerId |
string |
Yes |
ID instans CLB. |
lb-bp1b6c719dfa08ex**** |
| ListenerPort |
integer |
Yes |
Port frontend yang digunakan oleh instans CLB. Nilai valid: 1 hingga 65535. |
80 |
| BackendServerPort |
integer |
No |
Port backend yang digunakan oleh instans CLB. Nilai valid: 1 hingga 65535. Jika parameter VServerGroupId tidak diatur, parameter ini wajib diisi. |
80 |
| Tag |
array<object> |
No |
Tag. |
|
|
object |
No |
|||
| Key |
string |
No |
Kunci tag. Anda dapat menentukan hingga 20 kunci tag. Kunci tag tidak boleh berupa string kosong. Panjang kunci tag harus antara 1 hingga 64 karakter dan tidak boleh diawali dengan |
TestKey |
| Value |
string |
No |
Nilai tag. Anda dapat menentukan hingga 20 nilai tag. Nilai tag boleh berupa string kosong. Panjang nilai tag maksimal 128 karakter dan tidak boleh diawali dengan |
TestValue |
| Bandwidth |
integer |
Yes |
Bandwidth maksimum listener. Satuan: Mbit/s. Nilai valid:
|
-1 |
| Scheduler |
string |
No |
Algoritma penjadwalan. Nilai valid:
Catatan
Hanya instans CLB berkinerja-tinggi yang mendukung algoritma penghashan konsisten sch dan tch. |
wrr |
| PersistenceTimeout |
integer |
No |
Waktu timeout persistensi sesi. Satuan: detik. Nilai valid: 0 hingga 3600. Nilai default: 0. Jika menggunakan nilai default, sistem akan menonaktifkan persistensi sesi. |
0 |
| EstablishedTimeout |
integer |
No |
Waktu timeout koneksi. Satuan: detik. Nilai valid: 10 hingga 900. |
500 |
| HealthyThreshold |
integer |
No |
Jumlah kali server backend yang tidak sehat harus lulus pemeriksaan kesehatan secara berturut-turut sebelum dinyatakan sehat. Dalam kasus ini, status kesehatan berubah dari fail menjadi success. Nilai valid: 2 hingga 10. |
4 |
| UnhealthyThreshold |
integer |
No |
Jumlah kali server backend yang sehat harus gagal dalam pemeriksaan kesehatan secara berturut-turut sebelum dinyatakan tidak sehat. Dalam kasus ini, status kesehatan berubah dari success menjadi fail. Nilai valid: 2 hingga 10. |
4 |
| HealthCheckConnectTimeout |
integer |
No |
Waktu timeout maksimum untuk respons pemeriksaan kesehatan. Satuan: detik. Nilai valid: 1 hingga 300. Nilai default: 5. |
100 |
| HealthCheckConnectPort |
integer |
No |
Port yang digunakan untuk pemeriksaan kesehatan. Nilai valid: 1 hingga 65535. Jika parameter ini tidak diatur, port backend yang ditentukan oleh BackendServerPort akan digunakan untuk pemeriksaan kesehatan. |
80 |
| healthCheckInterval |
integer |
No |
Interval antara dua pemeriksaan kesehatan berturut-turut. Satuan: detik. Nilai valid: 1 hingga 50. |
3 |
| HealthCheckDomain |
string |
No |
Nama domain yang ingin digunakan untuk pemeriksaan kesehatan. Nilai valid:
|
172.XX.XX.6 |
| HealthCheckURI |
string |
No |
URI yang digunakan untuk pemeriksaan kesehatan. URI harus terdiri dari 1 hingga 80 karakter, dan hanya boleh berisi angka, huruf, tanda hubung (-), garis miring (/), titik (.), tanda persen (%), tanda pagar (#), dan tanda ampersand (&). URI harus diawali dengan garis miring (/) tetapi tidak boleh hanya berupa satu garis miring (/). Anda dapat mengatur parameter ini ketika listener TCP memerlukan pemeriksaan kesehatan HTTP. Jika parameter ini tidak diatur, pemeriksaan kesehatan TCP akan dilakukan. |
/test/index.html |
| HealthCheckHttpCode |
string |
No |
Kode status HTTP untuk pemeriksaan kesehatan yang berhasil. Pisahkan beberapa kode status HTTP dengan koma (,). Nilai valid:
|
http_2xx,http_3xx |
| HealthCheckType |
string |
No |
Jenis pemeriksaan kesehatan. Nilai valid:
|
tcp |
| VServerGroupId |
string |
No |
ID kelompok vServer. |
rsp-cige6j**** |
| MasterSlaveServerGroupId |
string |
No |
ID kelompok server utama/cadangan. Catatan
Anda tidak dapat mengatur VServerGroupId dan MasterSlaveServerGroupId secara bersamaan. |
rsp-0bfucw**** |
| AclId |
string |
No |
ID ACL jaringan yang dikaitkan dengan listener. Catatan
Jika AclStatus diatur ke on, parameter ini wajib diisi. |
acl-uf60jwfiv6****** |
| AclType |
string |
No |
Jenis ACL. Nilai valid:
Catatan
Jika AclStatus diatur ke on, parameter ini wajib diisi. |
black |
| AclStatus |
string |
No |
Menentukan apakah kontrol akses diaktifkan. Nilai valid:
|
off |
| Description |
string |
No |
Nama listener. Nama harus terdiri dari 1 hingga 256 karakter, dan hanya boleh berisi huruf, angka, tanda hubung (-), garis miring (/), titik (.), dan garis bawah (_). |
tcp_80 |
| ConnectionDrain |
string |
No |
Menentukan apakah Pengurasan koneksi diaktifkan. Nilai valid:
|
off |
| ConnectionDrainTimeout |
integer |
No |
Waktu timeout Pengurasan koneksi. Satuan: detik. Nilai valid: 10 hingga 900. Catatan
Parameter ini wajib diisi jika ConnectionDrain diatur ke on. |
300 |
| ProxyProtocolV2Enabled |
boolean |
No |
Menentukan apakah protokol Proxy digunakan untuk meneruskan alamat IP client ke server backend. Nilai valid:
|
false |
| HealthCheckSwitch |
string |
No |
Menentukan apakah fitur pemeriksaan kesehatan diaktifkan. Nilai valid:
|
on |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
CEF72CEB-54B6-4AE8-B225-F876FF7BA984 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameterValue.SpecNotSupport | The loadBalancer of shared spec does not support the parameter value, %s. | |
| 400 | OperationNotSupport.Acl | The cloud box instance does not support acl. | |
| 400 | InvalidParameterValue.RegionNotSupport | The region does not support the parameter value, %s. | |
| 400 | Abs.VServerGroupIdAndMasterSlaveServerGroupId.MissMatch | The parameters VServerGroupId or MasterSlaveServerGroupId miss match. | |
| 400 | IpVersionConflict | The ip version of this LoadBalancer and the Acl is conflict. | |
| 400 | InvalidParameterValue.ZoneNotSupport | The zone does not support the parameter value, %s. | |
| 400 | ListenerProcessing | A previous configuration of the listener is pending, please try again later. | |
| 400 | AclNotExist | Acl does not exist. | |
| 400 | InvalidParameter.ListenerPortConflict | There is conflict listener port exists. | |
| 400 | InvalidParameter.ZoneNotSupport | The zone does not support the parameter %s. | |
| 400 | InvalidParam.VServerGroupId | The specified VServerGroupId is invalid. | |
| 400 | MissingParam.HealthCheckConnectPort | The parameter HealthCheckConnectPort is required. | |
| 400 | InvalidParam.ListenerPort | The specified ListenerPort is invalid. | |
| 400 | InvalidParam.StartPort | The specified StartPort is invalid. | |
| 400 | InvalidParamSize.PortRange | The size of param PortRange is invalid. | |
| 400 | InvalidParam.EndPort | The specified EndPort is invalid. | |
| 400 | Duplicated.AclEntry | %s. | |
| 400 | OperationUnsupported.SetAccessControl | The singleTunnel/anyTunnel loadbalancer does not support config AccessControlList. | |
| 400 | InvalidParam.PortRange | The specified PortRange is invalid. | |
| 400 | InvalidParameter.RegionNotSupport | The region does not support the parameter: %s. | |
| 400 | LbNotSupportTcpssl | You cannot create a TCP SSL type listener for the specified load balancer. | |
| 400 | LbSupportTcpsslOnly | The specified load balancer supports TCP SSL type listener only. | |
| 400 | ListenerNotSupportRule | You cannot create a rule for the specified listener. | |
| 400 | ListenerPortConflict | The specified ListenerPort is conflict with other listener. | |
| 400 | ResourceNotFound.VServerGroup | %s. | |
| 400 | IllegalParam.FailoverThreshold | The parameter FailoverThreshold is illegal. | |
| 400 | IllegalParam.FailoverStrategy | The parameter FailoverStrategy is illegal. | |
| 400 | MasterSlaveServerConflict | The servers are conflict for MasterSlaveGroup. | |
| 400 | OperationDenied.HealthCheckClosedForMasterSlaveMode | The operation is denied because of HealthCheckClosedForMasterSlaveMode. | |
| 400 | IllegalParam.HealthCheck | The param of HelathCheck is illegal. | |
| 400 | Mismatch.SlbSpecTypeAndListenerProtocol | The SlbSpecType and ListenerProtocol are mismatched. | |
| 400 | OperationDenied.FullNatModeNotAllowed | The operation is not allowed because of FullNatModeNotAllowed. | |
| 400 | OperationDenied.OnlyIpv4SlbSupport | The operation is not allowed because of OnlyIpv4SlbSupport. | |
| 400 | SpecNotSupportParameter | The instance with share spec does not support FullNatEnabled parameter. | |
| 400 | InvalidParam.TagValue | %s. | |
| 400 | InvalidParam.TagKey | %s. | |
| 400 | SizeLimitExceeded.Tag | %s. | |
| 400 | MissingParam.TagKey | The param MissingParam.TagKey is missing. | |
| 400 | MissingParameter | The BackendServerPort or VServerGroupId is required at lease one. | |
| 400 | AclListenerOverLimit | This acl has reached the limit of binding to listeners. | |
| 400 | QuotaLimitExceeds.AclAttachedToListener | The number of Acl bound listeners has reached the quota limit | |
| 400 | QuotaLimitExceeds.TotalAclEntry | The number of Acl entries has reached the quota limit. | |
| 400 | QuotaLimitExceeds.AclListenerOverLimit | This acl has reached the limit of binding to listeners. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.