调用SetLoadBalancerTCPListenerAttribute修改TCP监听的配置。
接口说明
API 调用频率:100 次/秒。
单用户调用频率:10 次/秒。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ens:SetLoadBalancerTCPListenerAttribute |
update |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| LoadBalancerId |
string |
是 |
负载均衡实例的 ID。 |
lb-5snthcyu1x10g7tywj7iu**** |
| ListenerPort |
integer |
是 |
需要修改属性的监听端口。取值:1~65535。 |
80 |
| Description |
string |
否 |
设置监听的描述信息。长度限制为 1~80 个字符。 说明
不能以 |
example |
| Scheduler |
string |
否 |
调度算法。取值:
|
wrr |
| PersistenceTimeout |
integer |
否 |
会话保持的超时时间。
|
0 |
| EstablishedTimeout |
integer |
否 |
连接超时时间,取值:10~900,单位:秒。 |
500 |
| HealthyThreshold |
integer |
否 |
健康检查连续成功多少次后,将后端服务器的健康检查状态由 fail(后台服务器不可达)判定为 success(后台服务器可达)。取值:2~10。 |
4 |
| UnhealthyThreshold |
integer |
否 |
健康检查连续失败多少次后,将后端服务器的健康检查状态由 success(后台服务器可达)判定为 fail(后台服务器不可达)。取值:2~10。 |
4 |
| HealthCheckConnectTimeout |
integer |
否 |
接收来自运行状况检查的响应需要等待的时间。如果后端 ENS 在指定的时间内没有响应,则判定为健康检查失败。
说明
如果 HealthCheckConnectTimeout 的值小于 HealthCheckInterval 的值,则 HealthCheckConnectTimeout 无效,超时时间为 HealthCheckInterval 的值。 |
100 |
| HealthCheckConnectPort |
integer |
否 |
健康检查使用的端口,取值:1~65535。不设置此参数时,表示使用后端服务端口(BackendServerPort)。 |
8000 |
| HealthCheckInterval |
integer |
否 |
健康检查的时间间隔。取值:1~50,单位:秒。 |
5 |
| HealthCheckDomain |
string |
否 |
用于健康检查的域名。 |
www.aliyundoc.com |
| HealthCheckURI |
string |
否 |
用于健康检查的 URI。长度限制为 1~80。 说明
URL 不能只有 |
/aliyundoc/index.html |
| HealthCheckHttpCode |
string |
否 |
健康检查正常时的 HTTP 状态码。取值:
|
http_2xx |
| HealthCheckType |
string |
否 |
健康检查类型。取值:
|
tcp |
| EipTransmit |
string |
否 |
是否开启 EIP 透传,取值:
|
on |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
请求 ID。 |
06F00FBB-3D9E-4CCE-9D43-1A6946A75456 |
示例
正常返回示例
JSON格式
{
"RequestId": "06F00FBB-3D9E-4CCE-9D43-1A6946A75456"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | ens.interface.error | An error occurred while call the API. | |
| 400 | Invalid%s | The specified parameter %s is invalid. | |
| 400 | Missing%s | You must specify the parameter %s. | |
| 400 | LoadBalancerNotFound | The input parameter loadBalancerId that is not found. | |
| 400 | IncorrectInstanceStatus | The current status of the resource does not support this operation. | 当前操作不被支持,磁盘正在重置中。 |
| 400 | ListenerNotFound | The input parameter listener that is not found. | |
| 400 | IncorrectListenerStatus | The current status of the resource does not support this operation. | 监听状态不正确。 |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。