clb — Cloud Load Balancer
clb · 2018-03-17

ModifyListener

POST

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
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

FieldTypeRequiredDescription
LoadBalancerIdstringYesID of the CLB instance. You can call the DescribeLoadBalancers API to query the ID.
ListenerIdstringYesID of the CLB instance listener. You can call the DescribeListeners API to query the ID.
ListenerNamestringNoNew listener name. The maximum length is 255 characters.
SessionExpireTimeintegerNoSession 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.
HealthCheckHealthCheckNoHealth check parameter. It is only applicable only to TCP, UDP, TCP_SSL and QUIC listeners.
CertificateCertificateInputNoCertificate information. This parameter is only applicable to HTTPS/TCP_SSL/QUIC listeners. `Certificate` and `MultiCertInfo` cannot be both specified.
SchedulerstringNoListener forwarding method. Valid values: WRR (weighted round-robin), LEAST_CONN (least connections), and IP_HASH (IP address hash).
SniSwitchintegerNoWhether 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.
TargetTypestringNoTarget backend type. `NODE`: A single node; `TARGETGROUP`: A target group.
KeepaliveEnableintegerNoWhether to enable the persistent connection feature. This parameter applies only to HTTP/HTTPS listeners.
DeregisterTargetRstbooleanNoReschedules when unbinding real servers. only supported for TCP/UDP listeners. toggle on to enable this feature.
SessionTypestringNoSession 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.
MultiCertInfoMultiCertInfoNoCertificate 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.
MaxConnintegerNoMaximum 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…
MaxCpsintegerNoMaximum 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.
IdleConnectTimeoutintegerNoSpecifies 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.
ProxyProtocolbooleanNoSpecifies whether PP is supported for TCP_SSL and QUIC.
SnatEnablebooleanNoWhether 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.
DataCompressModestringNoData compression mode.
RescheduleTargetZeroWeightbooleanNoReschedules when setting backend server weight to 0. only supported for TCP/UDP listeners. toggle on to enable this feature.
RescheduleUnhealthybooleanNoReschedules when health check exceptions occur on real servers. only supported for TCP/UDP listeners. toggle on to enable this feature.
RescheduleExpandTargetbooleanNoReschedules when adding or removing backend servers. only supported for TCP/UDP listeners. toggle on to enable this feature.
RescheduleStartTimeintegerNoSpecifies the trigger start time for rescheduling. value range: 0-3600s. supported only by TCP/UDP listeners.
RescheduleIntervalintegerNoRescheduling 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.

FieldTypeDescription
RequestIdstringThe 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.
Success
{
  "Response": {
    // action-specific fields,
    "RequestId": "…"
  }
}
Error
{
  "Response": {
    "Error": { "Code": "…", "Message": "…" },
    "RequestId": "…"
  }
}

Try it

CredentialThe key never leaves this tab — it signs the request here. The signed request goes to /api-relay/clb.
Request bodyvalid JSONPOST clb.api3.convergecloud.com · ModifyListener

What failure looks like

Example error responses for this action. Match on Code.

Recorded error 1
{
  "Response": {
    "Error": {
      "Code": "InvalidParameter",
      "Message": "LoadBalancer not exist"
    },
    "RequestId": "600e588d-2e69-8f44-e666-14c0a63478f8"
  }
}