Membuat listener HTTPS.
Deskripsi operasi
Listener yang baru dibuat berada dalam keadaan stopped. Setelah listener dibuat, Anda dapat memanggil operasi StartLoadBalancerListener untuk memulai listener. Setelah listener dimulai, listener dapat meneruskan trafik ke server backend.
Prasyarat
Sebuah 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 region instance CLB. Anda dapat mengkueri ID region dari daftar Region dan zona atau dengan memanggil operasi DescribeRegions. |
cn-hangzhou |
| LoadBalancerId |
string |
Yes |
ID instance CLB. |
lb-bp1o94dp5i6earr**** |
| Bandwidth |
integer |
Yes |
Bandwidth maksimum dari listener. Satuan: Mbit/s. URL harus memenuhi persyaratan berikut:
|
-1 |
| ListenerPort |
integer |
Yes |
Port frontend yang digunakan oleh instance CLB. Nilai yang valid: 1 hingga 65535. |
80 |
| BackendServerPort |
integer |
No |
Port backend yang digunakan oleh instance CLB. Nilai yang 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 dari resource. Anda dapat menentukan hingga 20 kunci tag. Kunci tag tidak boleh berupa string kosong. Kunci tag harus terdiri dari 1 hingga 64 karakter dan tidak boleh dimulai dengan |
TestKey |
| Value |
string |
No |
Nilai tag dari resource. Anda dapat menentukan hingga 20 nilai tag. Nilai tag tidak boleh berupa string kosong. Nilai tag dapat terdiri dari hingga 128 karakter dan tidak boleh dimulai dengan |
TestValue |
| XForwardedFor |
string |
No |
Menentukan apakah akan menggunakan header
|
on |
| Scheduler |
string |
No |
Algoritma penjadwalan. Nilai yang valid:
|
wrr |
| StickySession |
string |
No |
Menentukan apakah akan mengaktifkan persistensi sesi. Nilai yang valid:
|
on |
| StickySessionType |
string |
No |
Metode yang digunakan untuk menangani cookie. Nilai yang valid: insert dan server.
Catatan
Parameter ini wajib diisi jika parameter StickySession diatur ke on. |
insert |
| CookieTimeout |
integer |
No |
Periode batas waktu cookie. Satuan: detik. Nilai yang 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 konfigurasi untuk server. Cookie harus terdiri dari 1 hingga 200 karakter, dan hanya dapat berisi huruf ASCII dan angka. Cookie tidak boleh berisi 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 yang valid:
|
on |
| HealthCheckMethod |
string |
No |
Metode pemeriksaan kesehatan yang digunakan dalam pemeriksaan kesehatan HTTP. Nilai yang 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 yang 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. URI harus terdiri dari 1 hingga 80 karakter, dan dapat berisi huruf, angka, dan karakter khusus berikut: Catatan
Parameter ini hanya berlaku jika parameter HealthCheck diatur ke on. |
/test/index.html |
| HealthyThreshold |
integer |
No |
Jumlah berapa kali server backend yang tidak sehat harus secara berturut-turut lulus pemeriksaan kesehatan sebelum dinyatakan sehat. Dalam hal ini, status kesehatan diubah dari fail menjadi success. Nilai yang valid: 2 hingga 10. Catatan
Parameter ini hanya berlaku jika parameter HealthCheck diatur ke on. |
4 |
| UnhealthyThreshold |
integer |
No |
Jumlah berapa kali server backend yang sehat harus secara berturut-turut gagal pemeriksaan kesehatan sebelum dinyatakan tidak sehat. Dalam hal ini, status kesehatan diubah dari success menjadi fail. Nilai yang valid: 2 hingga 10. Catatan
Parameter ini hanya berlaku jika parameter HealthCheck diatur ke on. |
4 |
| HealthCheckTimeout |
integer |
No |
Periode batas waktu respons pemeriksaan kesehatan. Jika instance ECS backend tidak merespons dalam periode batas waktu yang ditentukan, instance ECS gagal pemeriksaan kesehatan. Satuan: detik. Nilai yang 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 yang 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 yang 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 yang 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 certification authority (CA). Jika sertifikat CA dan sertifikat server keduanya diunggah, autentikasi mutual digunakan. Jika Anda hanya mengunggah sertifikat server, autentikasi 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 terkait dengan listener. Catatan
Parameter ini wajib diisi jika AclStatus diatur ke on. |
acl-a2do9e413e0spzasx**** |
| AclType |
string |
No |
Tipe ACL jaringan. Nilai yang valid:
Catatan
Jika AclStatus diatur ke on, parameter ini wajib diisi. |
white |
| AclStatus |
string |
No |
Menentukan apakah akan mengaktifkan kontrol akses. Nilai yang valid:
|
off |
| Description |
string |
No |
Nama listener. Nama harus terdiri dari 1 hingga 256 karakter dan dapat berisi huruf, angka, tanda hubung (-), garis miring (/), titik (.), dan garis bawah (_). |
HTTPS_443 |
| IdleTimeout |
integer |
No |
Periode batas waktu koneksi idle. Nilai yang valid: 1 hingga 60. Nilai default: 15. Satuan: detik. Jika tidak ada permintaan yang diterima dalam periode batas waktu yang ditentukan, CLB menutup koneksi. Ketika permintaan diterima, CLB membangun koneksi baru. |
12 |
| RequestTimeout |
integer |
No |
Periode batas waktu permintaan. Nilai yang valid: 1 hingga 180. Nilai default: 60. Satuan: detik. Jika tidak ada respons yang diterima dari server backend dalam periode batas waktu yang ditentukan, CLB mengembalikan kode status HTTP 504 ke klien. |
23 |
| EnableHttp2 |
string |
No |
Menentukan apakah akan mengaktifkan HTTP/2. Nilai yang valid:
|
off |
| TLSCipherPolicy |
string |
No |
Kebijakan keamanan Transport Layer Security (TLS). Setiap kebijakan keamanan berisi versi protokol TLS dan cipher suite 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.