CreateLoadBalancerTCPListener
Description
call CreateLoadBalancerTCPListener to create TCP listeners.
Request Method
POST
Request Path
/apsara/route/Slb/CreateLoadBalancerTCPListener
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
ListenerPort | BODY | integer | Yes | 80 | the port used by the front end of the load balancing instance. value:1~65535. |
VServerGroupId | BODY | string | No | rsp-cige6j**** | virtual server group ID. |
Description | BODY | string | No | create a listener. | set the description information of the listener. The length is limited to 1 to 80 characters, including letters, numbers, dashes (-), forward slashes (/), English periods (.), and underscores (_). Chinese description is supported. |
UnhealthyThreshold | BODY | integer | No | 4 | after how many consecutive health checks have failed, determine the health check status of the back-end server from success to failure . value:2~10. |
Scheduler | BODY | string | No | wrr | scheduling algorithm. Value: wrr(Default value): The backend server with the higher the weight value, the higher the number of times (probability) it is polled. wlc: In addition to polling according to the weight value set by each back-end server, the actual load of the back-end server (that is, the number of connections) is also considered. When the weight value is the same, the number of times (probability) that the backend server with the smaller the current number of connections is polled is higher. rr: distribute external requests to backend servers in sequence according to the access order. sch: based on the consistent hash of the source IP address, the same source address will be scheduled to the same backend server. tch: based on the consistency hash of the quad (source IP, destination IP, source port and destination port), the same stream is scheduled to the same backend server. Description Only guaranteed instances support sch and tch consistent hash algorithms. |
HealthCheckURI | BODY | string | No | /test/index.html | URI used for health check. The length is limited to 1 to 80. Only letters, numbers, dashes (-), forward slashes (/), English periods (.), percent signs (%), pound signs (#), and and(& amp;amp;) can be used. The URL cannot only be a forward slash (/), but must start with a forward slash (/). /span>/p> p data-tag = "p" class = "p"> this parameter can be configured when TCP listeners need to use HTTP health check. if not, TCP health check can be pressed. |
HealthCheckConnectTimeout | BODY | integer | No | 100 | the maximum timeout time for each health check response. value:1~300 seconds. default value:5. |
LoadBalancerId | BODY | string | Yes | lb-bp1b6c719dfa08ex**** | ID of the load balancing instance. |
BackendServerPort | BODY | integer | No | 80 | the port used by the backend of the load balancing instance. value:1~65535. if the server group is not used (VServerGroupId), this parameter must be selected. |
version | BODY | string | No | 2016-01-01 | version of api |
healthCheckInterval | BODY | integer | No | 3 | time interval for health check. value:1~50 seconds. |
PersistenceTimeout | BODY | integer | No | 0 | timeout time for session persistence. value:0~3600 seconds. default value:0, indicates closing session persistence. |
HealthCheckConnectPort | BODY | integer | No | 80 | port used for health check. value:1~65535. when this parameter is not set, the backend service port is used. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
Bandwidth | BODY | integer | Yes | -1 | The peak bandwidth of the listener, in Mbps. Value:-1 or 1~5120. -1: for public network load balancing instances charged by traffic, you can set the peak bandwidth to -1, that is, the peak bandwidth is not limited. 1~5120: for a public network load balancing instance that is billed by bandwidth, you can set the peak bandwidth of each listener, but the sum of the peak bandwidth of all listeners cannot exceed the peak bandwidth of the instance. |
HealthyThreshold | BODY | integer | No | 4 | after how many consecutive successful health checks, determine the health check status of the back-end server from failure to success . value: 2~10. |
HealthCheckDomain | BODY | string | No | 172.XX.XX.6 | domain name used for health check. Value: $_ ip: the private network IP of the backend server. When the IP address is specified or this parameter is not specified, Server Load Balancer uses the private IP address of the backend server as the domain name used for health check. domain: The domain name is 1~80 in length and can only contain letters, numbers, English periods (.) and dashes (-). |
MasterSlaveServerGroupId | BODY | string | No | rsp-0bfucw**** | primary and standby server group ID. description only one server group ID and primary/standby server group ID can be selected. |
HealthCheckHttpCode | BODY | string | No | http_2xx,http_3xx | health check normal HTTP status code, multiple status codes are divided by commas (,). Value:http_2xx(default), http_3xx, http_4xx or http_5xx. |
HealthCheckType | BODY | string | No | tcp | health check type. Value:tcp(default) or http. |
EstablishedTimeout | BODY | integer | No | 500 | connection timeout. value:10~900 seconds. |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
RequestID | string | 1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC | Request id |
Example
Successful Response example
{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}