ModifyListener
Modify the attributes of a CLB instance listener, including the listener name, health check parameters, certificate information, and forwarding policy. This API does not support classic CLB instances.
Wire call
Converge Cloud is RPC over HTTP. There is one path — / — and the action travels in the X-TC-Action header. The /clb/ModifyListener path used in the OpenAPI document is a documentation convenience so each action is addressable; it is not a route on the server.
curl -sS https://clb.api3.convergecloud.com/ \
-H 'Authorization: TC3-HMAC-SHA256 Credential=<SecretId>/<YYYY-MM-DD>/clb/tc3_request, SignedHeaders=content-type;host;x-tc-action, Signature=<sig>' \
-H 'Content-Type: application/json; charset=utf-8' \
-H 'Host: clb.api3.convergecloud.com' \
-H 'X-TC-Action: ModifyListener' \
-H 'X-TC-Version: 2018-03-17' \
-H 'X-TC-Timestamp: <unix-seconds>' \
-H 'X-TC-Region: luzon' \
-d '{"LoadBalancerId":"<LoadBalancerId>","ListenerId":"<ListenerId>"}'Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| LoadBalancerId | string | Yes | ID of the CLB instance. You can call the DescribeLoadBalancers API to query the ID. |
| ListenerId | string | Yes | ID of the CLB instance listener. You can call the DescribeListeners API to query the ID. |
| ListenerName | string | No | New listener name. The maximum length is 255 characters. |
| SessionExpireTime | integer | No | Session persistence time in seconds. Value range: 30-3,600. The default value is 0, indicating that session persistence is not enabled. This parameter is applicable only to TCP/UDP listeners. |
| HealthCheck | HealthCheck | No | Health check parameter. It is only applicable only to TCP, UDP, TCP_SSL and QUIC listeners. |
| Certificate | CertificateInput | No | Certificate information. This parameter is only applicable to HTTPS/TCP_SSL/QUIC listeners. `Certificate` and `MultiCertInfo` cannot be both specified. |
| Scheduler | string | No | Listener forwarding method. Valid values: WRR (weighted round-robin), LEAST_CONN (least connections), and IP_HASH (IP address hash). |
| SniSwitch | integer | No | Whether to enable the SNI feature. This parameter applies only to HTTPS listeners. The default value is 0, indicating disabled, and 1 indicates enabled. Note: The SNI feature can be enabled for listeners that have not enabled SNI, but cannot be disabled for listeners that have enabled SNI. |
| TargetType | string | No | Target backend type. `NODE`: A single node; `TARGETGROUP`: A target group. |
| KeepaliveEnable | integer | No | Whether to enable the persistent connection feature. This parameter applies only to HTTP/HTTPS listeners. |
| DeregisterTargetRst | boolean | No | Reschedules when unbinding real servers. only supported for TCP/UDP listeners. toggle on to enable this feature. |
| SessionType | string | No | Session persistence type. NORMAL: default session persistence type; QUIC_CID: perform session persistence based on QUIC connection ID. If the value is set to QUIC_CID, only the UDP protocol is supported. |
| MultiCertInfo | MultiCertInfo | No | Certificate information. You can specify multiple server-side certificates with different algorithm types. This parameter is only applicable to HTTPS listeners with the SNI feature not enabled. `Certificate` and `MultiCertInfo` cannot be specified at the same time. |
| MaxConn | integer | No | Maximum number of concurrent connections at the listener level. This parameter is supported only for LCU-supported instances with TCP/UDP/TCP_SSL/QUIC listeners currently. Value range: 1 to the maximum number of concurrent connections for the instance specification. -1 indicates that no limit is set on the concurrent connections at the listener level. Classic network instances do not support th… |
| MaxCps | integer | No | Maximum number of new connections at the listener level. This parameter is supported only for LCU-supported instances with TCP/UDP/TCP_SSL/QUIC listeners currently. Value range: 1 to the maximum number of new connections for the instance specification. -1 indicates that no limit is set on the new connections at the listener level. Classic network instances do not support this parameter. |
| IdleConnectTimeout | integer | No | Specifies the idle connection timeout in seconds. this parameter applies only to TCP/UDP listeners. default value: 900 for TCP listeners and 300 for UDP listeners. value range: 10–900 for shared instances and dedicated instances and 10–1980 for lcu-supported instances. to set a value exceeding 1980, submit a ticket application. the maximum settable value is 3600. |
| ProxyProtocol | boolean | No | Specifies whether PP is supported for TCP_SSL and QUIC. |
| SnatEnable | boolean | No | Whether SNAT (source IP replacement) is enabled. valid values: True (enabled), False (disabled). disabled by default. note: when SnatEnable is enabled, the client source IP will be replaced, at this point the `pass through client source IP` option is disabled, and vice versa. |
| DataCompressMode | string | No | Data compression mode. |
| RescheduleTargetZeroWeight | boolean | No | Reschedules when setting backend server weight to 0. only supported for TCP/UDP listeners. toggle on to enable this feature. |
| RescheduleUnhealthy | boolean | No | Reschedules when health check exceptions occur on real servers. only supported for TCP/UDP listeners. toggle on to enable this feature. |
| RescheduleExpandTarget | boolean | No | Reschedules when adding or removing backend servers. only supported for TCP/UDP listeners. toggle on to enable this feature. |
| RescheduleStartTime | integer | No | Specifies the trigger start time for rescheduling. value range: 0-3600s. supported only by TCP/UDP listeners. |
| RescheduleInterval | integer | No | Rescheduling trigger duration. valid values: 0-3600s. only TCP/UDP listeners support this. |
Response
Fields are returned inside the Response envelope. Converge Cloud answers HTTP 200 for errors as well as successes, so read Response.Error rather than the status code — and test for the presence of that object, because Code is occasionally the empty string.
| Field | Type | Description |
|---|---|---|
| RequestId | string | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
{
"Response": {
// action-specific fields,
"RequestId": "…"
}
}{
"Response": {
"Error": { "Code": "…", "Message": "…" },
"RequestId": "…"
}
}Try it
What failure looks like
Example error responses for this action. Match on Code.
{
"Response": {
"Error": {
"Code": "InvalidParameter",
"Message": "LoadBalancer not exist"
},
"RequestId": "600e588d-2e69-8f44-e666-14c0a63478f8"
}
}