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