Membuat Listener TCP.
Deskripsi operasi
Newly created listeners are in the stopped state. After a listener is created, call the StartLoadBalancerListener operation to enable the listener to forward network traffic.
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) di-deploy. Untuk daftar wilayah terbaru, lihat Wilayah dan zona atau panggil operasi DescribeRegions untuk mengambil informasinya. |
cn-hangzhou |
| LoadBalancerId |
string |
Yes |
ID instans CLB. |
lb-bp1b6c719dfa08ex**** |
| ListenerPort |
integer |
Yes |
Port antarmuka depan 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 |
The key of the tag. You can specify up to 20 tag keys. The tag key cannot be an empty string. The tag key must be 1 to 64 characters in length and cannot start with |
TestKey |
| Value |
string |
No |
The value of the tag. You can specify up to 20 tag values. The tag value can be an empty string. The tag value can be at most 128 characters in length and cannot start with |
TestValue |
| Bandwidth |
integer |
Yes |
Bandwidth maksimum dari Pendengar. Unit: Mbit/s. Nilai valid:
|
-1 |
| Scheduler |
string |
No |
Algoritma penjadwalan. Nilai valid:
Catatan
Hanya instans CLB berperforma tinggi yang mendukung algoritma penghashan konsisten sch dan tch. |
wrr |
| PersistenceTimeout |
integer |
No |
Periode timeout persistensi sesi. Unit: detik. Nilai valid: 0 hingga 3600. Nilai default: 0. Jika nilai default digunakan, sistem menonaktifkan persistensi sesi. |
0 |
| EstablishedTimeout |
integer |
No |
Periode timeout koneksi. Unit: detik. Nilai valid: 10 hingga 900. |
500 |
| HealthyThreshold |
integer |
No |
Jumlah Pemeriksaan kesehatan yang harus dilewati secara berturut-turut oleh server backend yang tidak sehat sebelum dinyatakan sehat. Pada kasus ini, status kesehatan diubah dari fail menjadi success. Nilai valid: 2 hingga 10. |
4 |
| UnhealthyThreshold |
integer |
No |
Jumlah Pemeriksaan kesehatan yang harus gagal secara berturut-turut oleh server backend yang sehat sebelum dinyatakan tidak sehat. Pada kasus ini, status kesehatan diubah dari success menjadi fail. Nilai valid: 2 hingga 10. |
4 |
| HealthCheckConnectTimeout |
integer |
No |
Periode timeout maksimum dari tanggapan Pemeriksaan kesehatan. Unit: 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 digunakan untuk Pemeriksaan kesehatan. |
80 |
| healthCheckInterval |
integer |
No |
Interval antara dua Pemeriksaan kesehatan berturut-turut. Unit: detik. Nilai valid: 1 hingga 50. |
3 |
| HealthCheckDomain |
string |
No |
Nama domain yang ingin Anda gunakan untuk Pemeriksaan kesehatan. Nilai valid:
|
172.XX.XX.6 |
| HealthCheckURI |
string |
No |
URI yang digunakan untuk Pemeriksaan kesehatan. URI harus memiliki panjang 1 hingga 80 karakter, dan hanya dapat berisi angka, huruf, tanda hubung (-), garis miring (/), periode (.), tanda persen (%), tanda pagar (#), dan ampersand (&). URI harus dimulai dengan garis miring (/) tetapi tidak boleh hanya berupa garis miring (/) saja. Anda dapat mengatur parameter ini ketika Listener TCP memerlukan Pemeriksaan kesehatan HTTP. Jika Anda tidak mengatur parameter ini, 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 |
Tipe Pemeriksaan kesehatan. Nilai valid:
|
tcp |
| VServerGroupId |
string |
No |
ID Kelompok vServer. |
rsp-cige6j**** |
| MasterSlaveServerGroupId |
string |
No |
ID kelompok server primer/server sekunder. Catatan
Anda tidak dapat mengatur VServerGroupId dan MasterSlaveServerGroupId secara bersamaan. |
rsp-0bfucw**** |
| AclId |
string |
No |
ID ACL jaringan yang dikaitkan dengan Pendengar. Catatan
Jika AclStatus diatur ke on, parameter ini wajib diisi. |
acl-uf60jwfiv6****** |
| AclType |
string |
No |
Tipe ACL. Nilai valid:
Catatan
Jika AclStatus diatur ke on, parameter ini wajib diisi. |
black |
| AclStatus |
string |
No |
Apakah akan mengaktifkan Kontrol akses. Nilai valid:
|
off |
| Description |
string |
No |
Nama Pendengar dalam daftar. Nama harus memiliki panjang 1 hingga 256 karakter, dan dapat berisi huruf, angka, tanda hubung (-), garis miring (/), periode (.), dan garis bawah (_). |
tcp_80 |
| ConnectionDrain |
string |
No |
Apakah akan mengaktifkan Pengurasan koneksi. Nilai valid:
|
off |
| ConnectionDrainTimeout |
integer |
No |
Periode timeout Pengurasan koneksi. Unit: detik. Nilai valid: 10 hingga 900. Catatan
Parameter ini wajib diisi jika ConnectionDrain diatur ke on. |
300 |
| ProxyProtocolV2Enabled |
boolean |
No |
Apakah akan menggunakan protokol Proxy untuk meneruskan alamat IP Klien ke server backend. Nilai valid:
|
false |
| HealthCheckSwitch |
string |
No |
Apakah akan mengaktifkan fitur Pemeriksaan kesehatan. Nilai valid:
|
on |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
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.