调用DescribeLoadBalancerTCPListenerAttribute查询TCP监听配置。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeLoadBalancerTCPListenerAttribute |
要执行的操作。 取值:DescribeLoadBalancerTCPListenerAttribute。 |
ListenerPort | Integer | 是 | 80 |
负载均衡实例前端使用的端口。 取值:1~65535。 |
LoadBalancerId | String | 是 | lb-bp1ygod3yctvg1y****** |
负载均衡实例的ID。 |
RegionId | String | 是 | cn-hangzhou |
负载均衡实例的地域。 您可以从地域和可用区列表或通过调用DescribeRegions接口查询地域ID。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 365F4154-92F6-4AE4-92F8-7FF34B540710 |
请求ID。 |
ListenerPort | Integer | 443 |
负载均衡实例前端使用的端口。 |
BackendServerPort | Integer | 443 |
负载均衡实例后端使用的端口。 说明 当后端服务器组为虚拟服务器组时,该参数不显示。
|
Status | String | stopped |
当前监听的状态。 取值:running|stopped。
|
Bandwidth | Integer | -1 |
监听的带宽峰值。 |
Scheduler | String | wrr |
调度算法。
|
SynProxy | String | enable |
是否开启SynProxy,SynProxy是负载均衡的攻击防护功能。 建议用户一般情况下不要调整这个参数,由负载均衡控制。
|
PersistenceTimeout | Integer | 0 |
是否开启了会话保持。 取值为0时,表示没有开启。 |
EstablishedTimeout | Integer | 500 |
连接超时时间。 |
HealthCheck | String | on |
是否开启健康检查。 取值:on | off。 |
HealthyThreshold | Integer | 4 |
健康检查阈值。 |
UnhealthyThreshold | Integer | 4 |
不健康检查阈值。 |
HealthCheckConnectTimeout | Integer | 100 |
超时时间。 |
HealthCheckConnectPort | Integer | 8080 |
健康检查使用的端口。 |
HealthCheckInterval | Integer | 5 |
健康检查的时间间隔,单位为秒。 |
HealthCheckHttpCode | String | http_2xx,http_3xx |
健康检查正常的HTTP状态码。 |
HealthCheckDomain | String | www.domain.com |
用于健康检查的域名。 |
HealthCheckURI | String | /test/index.html |
用于健康检查的URI。 长度限制为1~80,只能使用字母、数字和-/.%?#&这些字符。 URL不能只为/,但必须以/开头。 |
HealthCheckType | String | tcp |
TCP协议监听的健康检查方式。 取值:tcp | http。 |
HealthCheckMethod | String | tcp |
健康检查方式。 |
VServerGroupId | String | rsp-cige6******8 |
绑定的服务器组ID。 |
MasterSlaveServerGroupId | String | rsp-0bfucw***** |
绑定的主备服务器组ID。 |
AclId | String | 12 |
监听绑定的访问策略组ID。 当AclStatus参数的值为on时,该参数必选。 |
AclType | String | white |
访问控制类型:
当AclStatus参数的值为on时,该参数必选。 |
AclStatus | String | off |
是否开启访问控制功能。 取值:on | off(默认值)。 |
Description | String | 描述。 |
监听描述。 |
示例
请求示例
http(s)://[Endpoint]/?Action=DescribeLoadBalancerTCPListenerAttribute
&ListenerPort=80
&LoadBalancerId=lb-bp1ygod3yctvg1y******
&<公共请求参数>
正常返回示例
XML
格式
<DescribeLoadBalancerTCPListenerAttributeResponse>
<HealthCheckHttpCode>http_2xx,http_3xx</HealthCheckHttpCode>
<PersistenceTimeout>0</PersistenceTimeout>
<HealthCheckType>tcp</HealthCheckType>
<HealthyThreshold>3</HealthyThreshold>
<Scheduler>wrr</Scheduler>
<UnhealthyThreshold>3</UnhealthyThreshold>
<Bandwidth>-1</Bandwidth>
<Description>tcp_80</Description>
<AclStatus>off</AclStatus>
<HealthCheckURI>/</HealthCheckURI>
<HealthCheck>on</HealthCheck>
<HealthCheckConnectTimeout>5</HealthCheckConnectTimeout>
<ListenerPort>80</ListenerPort>
<Status>running</Status>
<EstablishedTimeout>900</EstablishedTimeout>
<HealthCheckDomain></HealthCheckDomain>
<HealthCheckInterval>2</HealthCheckInterval>
<RequestId>9A113A8C-BB8F-475E-9533-7819ECA2FFC1</RequestId>
<BackendServerPort>80</BackendServerPort>
</DescribeLoadBalancerTCPListenerAttributeResponse>
JSON
格式
{
"HealthCheckHttpCode": "http_2xx,http_3xx",
"PersistenceTimeout": 0,
"HealthCheckType": "tcp",
"HealthyThreshold": 3,
"Scheduler": "wrr",
"UnhealthyThreshold": 3,
"Bandwidth": -1,
"Description": "tcp_80",
"AclStatus": "off",
"HealthCheckURI": "/",
"HealthCheck": "on",
"HealthCheckConnectTimeout": 5,
"ListenerPort": 80,
"Status": "running",
"EstablishedTimeout": 900,
"HealthCheckDomain": "",
"HealthCheckInterval": 2,
"RequestId": "9A113A8C-BB8F-475E-9533-7819ECA2FFC1",
"BackendServerPort": 80
}
错误码
访问错误中心查看更多错误码。
在文档使用中是否遇到以下问题
更多建议
匿名提交