Modifies the configurations of an HTTPS listener.
Prerequisites
- A Classic Load Balancer (CLB) instance is created. For more information, see CreateLoadBalancer.
- An HTTPS listener is created. For more information about how to create an HTTPS listener, see CreateLoadBalancerHTTPSListener.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | SetLoadBalancerHTTPSListenerAttribute |
The operation that you want to perform. Set the value to SetLoadBalancerHTTPSListenerAttribute. |
ListenerPort | Integer | Yes | 80 |
The frontend port that is used by the CLB instance. Valid values: 1 to 65535. |
LoadBalancerId | String | Yes | lb-sjhfdji**** |
The ID of the CLB instance. |
RegionId | String | Yes | cn-hangzhou |
The ID of the region where the CLB instance is deployed. You can call the DescribeRegions operation to query the most recent region list. |
Bandwidth | Integer | No | -1 |
The bandwidth limit of the listener. Unit: Mbit/s. Valid values: -1 and 1 to 5120.
|
XForwardedFor | String | No | on |
Specifies whether to use the
|
Scheduler | String | No | wrr |
The scheduling algorithm. Valid values:
|
StickySession | String | No | on |
Specifies whether to enable session persistence. Valid values:
|
StickySessionType | String | No | insert |
The method that is used to handle a cookie. Valid values:
Note This parameter is required if the StickySession parameter is set to on.
|
CookieTimeout | Integer | No | 500 |
The timeout period of the cookie. Unit: seconds. Valid values: 1 to 86400. Note This parameter is required if the StickySession parameter is set to on and the StickySessionType parameter is set to insert.
|
Cookie | String | No | B490B5EBF6F3CD4**** |
The cookie to be configured on the backend server. The cookie must be 1 to 200 characters in length, and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). Note This parameter is required if the StickySession parameter is set to on and the StickySessionType parameter is set to server.
|
HealthCheck | String | No | on |
Specifies whether to enable health checks. Valid values:
|
HealthCheckMethod | String | No | get |
The HTTP method that is used for health checks. Valid values: head and get. Note This parameter takes effect only when the HealthCheck parameter is set to on.
|
HealthCheckDomain | String | No | 172.XX.XX.16 |
The domain name that is used for health checks. Valid values:
Note This parameter takes effect only when the HealthCheck parameter is set to on.
|
HealthCheckURI | String | No | /test/index.html |
The URL that is used for health checks. The URL must be 1 to 80 characters in length and can contain letters, digits, and the following characters: - / . % ? # &. The URL must not be a single forward slash (/) but it must start with a forward slash (/). Note This parameter takes effect only when the HealthCheck parameter is set to on.
|
HealthyThreshold | Integer | No | 4 |
The number of health checks that an unhealthy backend server must consecutively pass before it can be declared healthy (from fail to success). Valid values: 2 to 10. Note This parameter takes effect only when the HealthCheck parameter is set to on.
|
UnhealthyThreshold | Integer | No | 4 |
The number of health checks that a healthy backend server must consecutively fail before it can be declared unhealthy (from success to fail). Valid values: 2 to 10. Note This parameter takes effect only when the HealthCheck parameter is set to on.
|
HealthCheckTimeout | Integer | No | 3 |
The timeout period of a health check response. If a backend server does not respond within the specified timeout period, the health check fails. Unit: seconds. Valid values: 1 to 300. If the value of the HealthCheckTimeout parameter is smaller than that of the HealthCheckInterval parameter, the timeout period specified by the HealthCheckTimeout parameter is ignored and the period of time specified by the HealthCheckInterval parameter is used as the timeout period. Note This parameter takes effect only when the HealthCheck parameter is set to on.
|
HealthCheckInterval | Integer | No | 5 |
The interval between two consecutive health checks. Unit: seconds. Valid values: 1 to 50. Note This parameter takes effect only when the HealthCheck parameter is set to on.
|
HealthCheckConnectPort | Integer | No | 8080 |
The port that is used for health checks. Valid values: 1 to 65535. Note This parameter takes effect only when the HealthCheck parameter is set to on.
|
HealthCheckHttpCode | String | No | http_2xx,http_3xx |
The HTTP status code of a successful health check. Separate multiple HTTP status codes with commas (,). Valid values: http_2xx, http_3xx, http_4xx, and http_5xx. Note This parameter takes effect only when the HealthCheck parameter is set to on.
|
ServerCertificateId | String | No | idkp-123-cn-te**** |
The ID of the server certificate. |
CACertificateId | String | No | 139a00604ad-cn-east-**** |
The ID of the CA certificate.
|
VServerGroup | String | No | on |
Specifies whether to use a vServer group. Valid values:
|
VServerGroupId | String | No | rsp-cige6j**** |
The ID of the vServer group. |
XForwardedFor_SLBIP | String | No | on |
Specifies whether to use the
|
XForwardedFor_SLBID | String | No | on |
Specifies whether to use the
|
XForwardedFor_proto | String | No | on |
Specifies whether to use the
|
Gzip | String | No | on |
Specifies whether to enable
|
AclId | String | No | nacl-a2do9e413e0spzasx**** |
The ID of the network access control list (ACL) that you want to associate with the listener. If AclStatus is set to on, this parameter is required. |
AclType | String | No | white |
The type of network ACL. Valid values:
Note This parameter takes effect only when AclStatus is set to on.
|
AclStatus | String | No | off |
Specifies whether to enable access control. Valid values:
|
IdleTimeout | Integer | No | 23 |
The timeout period of an idle connection. Unit: seconds. Valid values: 1 to 60. Default value: 15. If no request is received within the specified timeout period, CLB closes the connection. When another request is received, CLB establishes a new connection. |
RequestTimeout | Integer | No | 223 |
The timeout period of a request. Unit: seconds. Valid values: 1 to 180. Default value: 60. If no response is received from the backend server during the request timeout period, CLB sends an HTTP 504 error code to the client. |
EnableHttp2 | String | No | off |
Specifies whether to use
|
TLSCipherPolicy | String | No | tls_cipher_policy_1_2 |
The Transport Layer Security (TLS) security policy. Each security policy contains TLS protocol versions and cipher suites available for HTTPS.
|
Description | String | No | Listener1 |
The description of the listener. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | CEF72CEB-54B6-4AE8-B225-F876FF7BA984 |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=SetLoadBalancerHTTPSListenerAttribute
&ListenerPort=80
&LoadBalancerId=lb-sjhfdji****
&<Common request parameters>
Sample success responses
XML
format
<SetLoadBalancerHTTPSListenerAttributeResponse>
<RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
</SetLoadBalancerHTTPSListenerAttributeResponse>
JSON
format
null
Error codes
For a list of error codes, visit the API Error Center.