修改HTTPS監聽的配置。
介面說明
您已經建立傳統型負載平衡,具體操作,請參見 CreateLoadBalancer 。
您已經建立 HTTPS 監聽,具體操作,請參見 CreateLoadBalancerHTTPSListener 。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
slb:SetLoadBalancerHTTPSListenerAttribute |
update |
acl
*certificate
*loadbalancer
|
|
無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
否 |
傳統型Server Load Balancer執行個體的地區 ID。 您可以調用 DescribeRegions 介面查詢地區 ID。 |
cn-hangzhou |
| LoadBalancerId |
string |
是 |
傳統型Server Load Balancer執行個體的 ID。 |
lb-sjhfdji**** |
| ListenerPort |
integer |
是 |
傳統型Server Load Balancer執行個體前端使用的連接埠。 取值:1~65535。 |
80 |
| Bandwidth |
integer |
否 |
監聽的頻寬峰值。單位:Mbps。 取值:
|
-1 |
| XForwardedFor |
string |
否 |
是否開啟通過
|
on |
| Scheduler |
string |
否 |
調度演算法。取值:
|
wrr |
| StickySession |
string |
否 |
是否開啟會話保持。取值:
|
on |
| StickySessionType |
string |
否 |
cookie 的處理方式。取值:
用戶端第一次訪問時,負載平衡會在返回請求中植入 Cookie(即在 HTTP/HTTPS 響應報文中插入 SERVERID),下次用戶端攜帶此 Cookie 訪問,負載平衡服務會將請求定向轉寄給之前記錄到的後端伺服器上。
負載平衡發現使用者自訂了 Cookie,將會對原來的 Cookie 進行重寫,下次用戶端攜帶新的 Cookie 訪問,負載平衡服務會將請求定向轉寄給之前記錄到的後端伺服器。 說明
當 StickySession 的值為 on 時,必須指定該參數。 |
insert |
| CookieTimeout |
integer |
否 |
Cookie 逾時時間。 取值:1~86400(秒)。 說明
當 StickySession 為 on 且 StickySessionType 為 insert 時,該參數必選。 |
500 |
| Cookie |
string |
否 |
伺服器上配置的 Cookie。 長度為 1~200 個字元,只能包含 ASCII 英文字母和數字字元,不能包含半形逗號(,)、半形分號(;)或空格,不能以$開頭。 說明
當 StickySession 為 on 且 StickySessionType 為 server 時,該參數必選。 |
testCookie |
| HealthCheck |
string |
否 |
是否開啟健全狀態檢查。取值:
|
on |
| HealthCheckMethod |
string |
否 |
監聽 HTTP 類型健全狀態檢查的健全狀態檢查方法。取值:head 或 get。 說明
HealthCheck 值為 on 時才會有效。 |
get |
| HealthCheckDomain |
string |
否 |
用於健全狀態檢查的網域名稱,取值:
說明
在 HealthCheck 值為 on 時才會有效。 |
172.XX.XX.16 |
| HealthCheckURI |
string |
否 |
用於健全狀態檢查的 URI。 長度限制為 1~80 字元,支援英文字母、數字、短劃線(-)、正斜線(/)、半形句號(.)、百分比符號(%)、半形問號(?)、井號(#)和 and(&)字元。URI 不能只包含正斜線(/),但必須以正斜線(/)開頭。 說明
在 HealthCheck 值為 on 時才會有效。 |
/test/index.html |
| HealthyThreshold |
integer |
否 |
健全狀態檢查連續成功多少次後,將後端伺服器的健全狀態檢查狀態由 fail 判定為 success。 取值:2~10。 說明
在 HealthCheck 值為 on 時才會有效。 |
4 |
| UnhealthyThreshold |
integer |
否 |
健全狀態檢查連續失敗多少次後,將後端伺服器的健全狀態檢查狀態由 success 判定為 fail。 取值:2~10。 說明
在 HealthCheck 值為 on 時才會有效。 |
4 |
| HealthCheckTimeout |
integer |
否 |
接收來自健全狀態檢查的響應需要等待的時間。如果後端 ECS 在指定的時間內沒有正確響應,則判定為健全狀態檢查失敗。單位:秒。取值:1~300。 說明
在 HealthCheck 值為 on 時才會有效。 |
3 |
| HealthCheckInterval |
integer |
否 |
健全狀態檢查的時間間隔。單位:秒。 取值:1~50。 說明
在 HealthCheck 值為 on 時才會有效。 |
5 |
| HealthCheckConnectPort |
integer |
否 |
健全狀態檢查使用的連接埠。 取值:1~65535。 說明
當 HealthCheck 值為 on 時才會有效。 |
8080 |
| HealthCheckHttpCode |
string |
否 |
健全狀態檢查正常的 HTTP 狀態代碼,多個狀態代碼用半形逗號(,)分割。 取值:http_2xx或http_3xx或http_4xx或http_5xx。 說明
在 HealthCheck 值為 on 時才會有效。 |
http_2xx,http_3xx |
| ServerCertificateId |
string |
否 |
伺服器憑證的 ID。 |
idkp-123-cn-te**** |
| CACertificateId |
string |
否 |
CA 憑證 ID。
|
139a00604ad-cn-east-**** |
| VServerGroup |
string |
否 |
是否使用伺服器組。取值:
|
on |
| VServerGroupId |
string |
否 |
虛擬伺服器組 ID。 |
rsp-cige6j**** |
| XForwardedFor_SLBIP |
string |
否 |
是否通過
|
on |
| XForwardedFor_SLBID |
string |
否 |
是否通過
|
on |
| XForwardedFor_proto |
string |
否 |
是否通過
|
on |
| Gzip |
string |
否 |
是否開啟
|
on |
| AclId |
string |
否 |
監聽綁定的存取原則組 ID。 當 AclStatus 參數的值為 on 時,該參數必選。 |
acl-a2do9e413e0spzasx**** |
| AclType |
string |
否 |
存取控制類型:
如果開啟了白名單訪問,但存取原則組中沒有添加任何 IP,則負載平衡監聽會轉寄全部請求。
如果開啟了黑名單訪問,但存取原則組中沒有添加任何 IP,則負載平衡監聽會轉寄全部請求。 說明
當 AclStatus 參數的值為 on 時,該參數有效。 |
white |
| AclStatus |
string |
否 |
是否開啟存取控制功能。取值:
|
off |
| IdleTimeout |
integer |
否 |
指定串連空閑逾時時間,取值範圍為1~60秒,預設值為 15 秒。 在逾時時間內一直沒有訪問請求,負載平衡會暫時中斷當前串連,直到一下次請求來臨時重建立立新的串連。 |
23 |
| RequestTimeout |
integer |
否 |
指定請求逾時時間,取值範圍為1~180秒,預設值為 60 秒。 在逾時時間內後端伺服器一直沒有響應,負載平衡將放棄等待,給用戶端返回 HTTP 504 錯誤碼。 |
223 |
| EnableHttp2 |
string |
否 |
是否開啟
|
off |
| TLSCipherPolicy |
string |
否 |
安全性原則包含 HTTPS 可選的 TLS 協議版本和配套的密碼編譯演算法套件。
|
tls_cipher_policy_1_2 |
| Description |
string |
否 |
自訂監聽名稱。 長度限制為 1~256 個字元,支援中文、字母、數字、短劃線(-)、正斜線(/)、半形句號(.)和底線(_)。 |
https_80 |
| XForwardedFor_SLBPORT |
string |
否 |
是否通過
|
off |
| XForwardedFor_ClientSrcPort |
string |
否 |
是否通過
|
off |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
CEF72CEB-54B6-4AE8-B225-F876FF7BA984 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 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 | OperationFailed.ServerGroupInUse | The VServerGroup or MasterSlaveServerGroup can not be close for this 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 | 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 | TooManyCertificates | The number of certificates must not be greater than one. | |
| 400 | CertificateTypeMismatched | The certificate type does not match. | |
| 400 | MissingParam.ServerCertificates | Server certificates are required. | |
| 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 | 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. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。