Membuat listener HTTPS.
Deskripsi operasi
Listener yang baru dibuat berada dalam status stopped. Setelah pembuatan selesai, Anda dapat memanggil operasi StartLoadBalancerListener untuk menjalankannya. Listener yang telah dijalankan dapat meneruskan lalu lintas ke server backend.
Prasyarat
Instance Classic Load Balancer (CLB) telah dibuat. Untuk informasi selengkapnya, lihat CreateLoadBalancer.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
slb:CreateLoadBalancerHTTPSListener |
create |
*acl
*certificate
*loadbalancer
|
|
None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
ID wilayah instance CLB. Anda dapat menanyakan ID wilayah dari daftar Wilayah dan zona atau dengan memanggil operasi DescribeRegions. |
cn-hangzhou |
| LoadBalancerId |
string |
Yes |
ID instance CLB. |
lb-bp1o94dp5i6earr**** |
| Bandwidth |
integer |
Yes |
Bandwidth maksimum listener. Satuan: Mbit/s. URL harus memenuhi persyaratan berikut:
|
-1 |
| ListenerPort |
integer |
Yes |
Port frontend yang digunakan oleh instance CLB. Nilai valid: 1 hingga 65535. |
80 |
| BackendServerPort |
integer |
No |
Port backend yang digunakan oleh instance CLB. Nilai valid: 1 hingga 65535. Jika parameter VServerGroupId tidak diatur, parameter ini wajib diisi. |
80 |
| Tag |
array<object> |
No |
Tag. |
|
|
object |
No |
Tag. |
||
| Key |
string |
No |
Kunci tag resource. 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 dimulai dengan |
TestKey |
| Value |
string |
No |
Nilai tag resource. Anda dapat menentukan hingga 20 nilai tag. Nilai tag tidak boleh berupa string kosong. Panjang nilai tag maksimal 128 karakter dan tidak boleh dimulai dengan |
TestValue |
| XForwardedFor |
string |
No |
Menentukan apakah akan menggunakan header
|
on |
| Scheduler |
string |
No |
Algoritma penjadwalan. Nilai valid:
|
wrr |
| StickySession |
string |
No |
Menentukan apakah akan mengaktifkan persistensi sesi. Nilai valid:
|
on |
| StickySessionType |
string |
No |
Metode yang digunakan untuk menangani cookie. Nilai valid: insert dan server.
Catatan
Parameter ini wajib diisi jika parameter StickySession diatur ke on. |
insert |
| CookieTimeout |
integer |
No |
Periode timeout cookie. Satuan: detik. Nilai valid: 1 hingga 86400. Catatan
Jika StickySession diatur ke on dan StickySessionType diatur ke insert, parameter ini wajib diisi. |
500 |
| Cookie |
string |
No |
Cookie yang Anda konfigurasikan untuk server. Panjang cookie harus antara 1 hingga 200 karakter, dan hanya boleh berisi huruf ASCII dan angka. Cookie tidak boleh mengandung koma (,), titik koma (;), spasi, atau dimulai dengan tanda dolar ($). Catatan
Parameter ini wajib diisi ketika parameter StickySession diatur ke on dan parameter StickySessionType diatur ke server. |
testCookie |
| HealthCheck |
string |
Yes |
Menentukan apakah akan mengaktifkan fitur pemeriksaan kesehatan. Nilai valid:
|
on |
| HealthCheckMethod |
string |
No |
Metode pemeriksaan kesehatan yang digunakan dalam pemeriksaan kesehatan HTTP. Nilai valid: head dan get. Catatan
Parameter ini hanya berlaku jika parameter HealthCheck diatur ke on. |
get |
| HealthCheckDomain |
string |
No |
Nama domain yang digunakan untuk pemeriksaan kesehatan. Nilai valid:
Catatan
Parameter ini hanya berlaku jika parameter HealthCheck diatur ke on. |
172.XX.XX.16 |
| HealthCheckURI |
string |
No |
URI yang digunakan untuk pemeriksaan kesehatan. Panjang URI harus antara 1 hingga 80 karakter, dan dapat berisi huruf, angka, serta karakter khusus berikut: Catatan
Parameter ini hanya berlaku jika parameter HealthCheck diatur ke on. |
/test/index.html |
| 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. Catatan
Parameter ini hanya berlaku jika parameter HealthCheck diatur ke on. |
4 |
| UnhealthyThreshold |
integer |
No |
Jumlah kali server backend yang sehat harus gagal pemeriksaan kesehatan secara berturut-turut sebelum dinyatakan tidak sehat. Dalam kasus ini, status kesehatan berubah dari success menjadi fail. Nilai valid: 2 hingga 10. Catatan
Parameter ini hanya berlaku jika parameter HealthCheck diatur ke on. |
4 |
| HealthCheckTimeout |
integer |
No |
Periode timeout respons pemeriksaan kesehatan. Jika instance ECS backend tidak merespons dalam periode timeout yang ditentukan, instance ECS tersebut gagal dalam pemeriksaan kesehatan. Satuan: detik. Nilai valid: 1 hingga 300. Catatan
Parameter ini hanya berlaku jika parameter HealthCheck diatur ke on. |
3 |
| HealthCheckConnectPort |
integer |
No |
Port yang digunakan untuk pemeriksaan kesehatan. Nilai valid: 1 hingga 65535. Catatan
Parameter ini hanya berlaku jika parameter HealthCheck diatur ke on. |
8080 |
| HealthCheckInterval |
integer |
No |
Interval antara dua pemeriksaan kesehatan berturut-turut. Satuan: detik. Nilai valid: 1 hingga 50. Catatan
Parameter ini hanya berlaku jika parameter HealthCheck diatur ke on. |
5 |
| HealthCheckHttpCode |
string |
No |
Kode status HTTP untuk pemeriksaan kesehatan yang berhasil. Pisahkan beberapa kode status HTTP dengan koma (,). Nilai valid: http_2xx, http_3xx, http_4xx, dan http_5xx. Catatan
Parameter ini hanya berlaku jika parameter HealthCheck diatur ke on. |
http_2xx,http_3xx |
| ServerCertificateId |
string |
No |
ID Sertifikat server. |
idkp-123-cn-test-**** |
| VServerGroupId |
string |
No |
ID grup server. |
rsp-cige6j5e7p**** |
| CACertificateId |
string |
No |
ID sertifikat otoritas sertifikasi (CA). Jika sertifikat CA dan sertifikat server keduanya diunggah, otentikasi timbal balik digunakan. Jika hanya sertifikat server yang diunggah, otentikasi satu arah digunakan. |
139a00604ad-cn-east-hangzh**** |
| XForwardedFor_SLBIP |
string |
No |
Menentukan apakah akan menggunakan header
|
on |
| XForwardedFor_SLBID |
string |
No |
Menentukan apakah akan menggunakan header
|
on |
| XForwardedFor_proto |
string |
No |
Menentukan apakah akan menggunakan header
|
on |
| Gzip |
string |
No |
Menentukan apakah akan mengaktifkan kompresi
|
on |
| AclId |
string |
No |
ID daftar kontrol akses jaringan (ACL) yang dikaitkan dengan listener. Catatan
Parameter ini wajib diisi jika AclStatus diatur ke on. |
acl-a2do9e413e0spzasx**** |
| AclType |
string |
No |
Jenis ACL jaringan. Nilai valid:
Catatan
Jika AclStatus diatur ke on, parameter ini wajib diisi. |
white |
| AclStatus |
string |
No |
Menentukan apakah akan mengaktifkan kontrol akses. Nilai valid:
|
off |
| Description |
string |
No |
Nama listener. Panjang nama harus antara 1 hingga 256 karakter dan dapat berisi huruf, angka, tanda hubung (-), garis miring (/), titik (.), dan garis bawah (_). |
HTTPS_443 |
| IdleTimeout |
integer |
No |
Periode timeout koneksi idle. Nilai valid: 1 hingga 60. Nilai default: 15. Satuan: detik. Jika tidak ada permintaan yang diterima dalam periode timeout yang ditentukan, CLB akan menutup koneksi. Ketika permintaan diterima, CLB akan membuat koneksi baru. |
12 |
| RequestTimeout |
integer |
No |
Periode timeout permintaan. Nilai valid: 1 hingga 180. Nilai default: 60. Satuan: detik. Jika tidak ada respons yang diterima dari server backend dalam periode timeout yang ditentukan, CLB akan mengembalikan kode status HTTP 504 ke client. |
23 |
| EnableHttp2 |
string |
No |
Menentukan apakah akan mengaktifkan HTTP/2. Nilai valid:
|
off |
| TLSCipherPolicy |
string |
No |
Kebijakan keamanan Transport Layer Security (TLS). Setiap kebijakan keamanan berisi versi protokol TLS dan paket sandi yang tersedia untuk HTTPS.
|
tls_cipher_policy_1_1 |
| XForwardedFor_SLBPORT |
string |
No |
Menentukan apakah akan menggunakan header
|
off |
| XForwardedFor_ClientSrcPort |
string |
No |
Menentukan apakah akan menggunakan header
|
off |
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 | ParamDuplicateError | The specified parameter value of XForwardedFor_ClientCertSubjectDNAlias is duplicate. Please change to a different one. | |
| 400 | IpVersionConflict | The ip version of this LoadBalancer and the Acl is conflict. | |
| 400 | InvalidParameter.IdleTimeout | The specified IdleTimeout exceeds the limit. | |
| 400 | InvalidParameter.RequestTimeout | The specified RequestTimeout exceeds the limit. | |
| 400 | ListenerForwardNotSupport | X-Forward-For is not supported to a ipv6 instance. | |
| 400 | InvalidParameter.RegionNotSupport | The region does not support the parameter: %s. | |
| 400 | InvalidParameter.SpecNotSupport | The loadBalancer of shared spec does not support the parameter: %s. | |
| 400 | ListenerProcessing | A previous configuration of the listener is pending,please try again later. | |
| 400 | Certkey.Forbidden | The specified certkey is not owned by the current user. | |
| 400 | InvalidParameter.ListenerPortConflict | There is conflict listener port exists. | |
| 400 | ResourceNotAvailible.HttpsListener | The specified Zone did not have enough resource. | |
| 400 | AclNotExist | Acl does not exist. | |
| 400 | OperationUnsupported.CreateLoadBalancerLayer7Listener | The slb instance does not support create HTTP or HTTPS listener. | |
| 400 | InvalidParameter.VServerGroupId | The MasterSlaveServerGroup can not be attached to HTTP or HTTPS listener. | |
| 400 | MissingParam.HealthCheckDomain | The HealthCheckDomain is required when HealthCheckHttpVersion is http1.1. | |
| 400 | InvalidParameter.HealthCheckHttpVersion | The param HealthCheckHttpVersion is invalid. | |
| 400 | Duplicated.AclEntry | %s. | |
| 400 | CertificateNotExist | The specified CertificateId does not exist. | |
| 400 | OperationFailed.InsufficientResources | The loadbalancer does not support this operation because of insufficient resources. | |
| 400 | InvalidTLSPolicyId.NotExist | The specified TLS cipher policy does not exist. | |
| 400 | TLSPolicyConfiguring | The specified TLS cipher policy is configuring. | |
| 400 | TLSCipherPolicyVipRelationOverLimit | The number of listeners associated with a policy has exceeded. | |
| 400 | CertificateTypeMismatched | The certificate type does not match. | |
| 400 | MissingParam.ServerCertificates | Server certificates are required. | |
| 400 | TooManyCertificates | The number of certificates must not be greater than one. | |
| 400 | CnCertificateNotSupport | The cn certificate is not support. | |
| 400 | InvalidParam.CertificateBindingType | The param CertificateBindingType is invalid. | |
| 400 | InvalidParamSize.ServerCertificates | The size of param ServerCertificates is invalid. | |
| 400 | TooManyCertificates.ServerCertificates | The number of certificates must not be greater than one. | |
| 400 | SPEC_NOT_SUPPORT_PARAMETER | Share spec does not support the feature. | |
| 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 | Mismatch.SlbSpecTypeAndListenerProtocol | The SlbSpecType and ListenerProtocol are mismatched. | |
| 400 | InvalidParam.TagValue | %s. | |
| 400 | InvalidParam.TagKey | %s. | |
| 400 | SizeLimitExceeded.Tag | %s. | |
| 400 | MissingParam.TagKey | The param MissingParam.TagKey is missing. | |
| 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. | |
| 404 | ResourceNotFound.Certificate | The specified resource is not found. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.