560
iPhone_iPad_Mac_apple
DescribeLoadBalancerHTTPListenerAttribute__Listener相关API_API 参考_负载均衡-阿里云
描述
- 查询HTTP Listener信息。
- Listener包含5种状态:starting、running、configuring、stopping、stopped。Listener的状态转换图以及每个状态的具体说明,参见负载均衡 Listener状态转换图。
请求参数
名称 |
类型 |
是否必须 |
描述 |
---|
Action |
String |
是 |
操作接口名,系统规定参数。取值:DescribeLoadBalancerHTTPListenerAttribute |
LoadBalancerId |
String |
是 |
负载均衡实例的唯一标识。 |
ListenerPort |
Integer |
是 |
负载均衡实例前端使用的端口。取值:1-65535。 |
返回参数
名称 |
类型 |
描述 |
---|
<公共参数> |
|
详见<公共返回参数> |
ListenerPort |
Integer |
负载均衡实例前端使用的端口 |
BackendServerPort |
Integer |
负载均衡实例后端使用的端口 |
Bandwidth |
Integer |
监听的带宽峰值 |
Status |
String |
Listener当前状态。包含5种状态:starting、running、configuring、stopping、stopped |
XForwardedFor |
String |
是否开启通过X-Forwarded-For 的方式获取来访者真实IP。on为开启XForwardedFor,off为关闭XForwardedFor。注:考虑安全原因,本参数自2015年5月15日起会强制设置为on。 |
Scheduler |
String |
调度算法。wrr或者wlc。 |
StickySession |
String |
是否开启会话保持。on为开启会话保持,off为关闭会话保持 |
StickySessionType |
String |
cookie的处理方式,设置为insert表示由负载均衡插入;设置为server表示负载均衡从后端服务器学习。 |
CookieTimeout |
Integer |
cookie超时时间 |
Cookie |
String |
服务器上配置的cookie。 只有在Type为server时有效 |
HealthCheck |
String |
是否开启健康检查。on为开启健康检查,off为关闭健康检查。 |
HealthCheckDomain |
String |
用于健康检查的域名。 |
HealthCheckURI |
String |
用于健康检查的URI。 |
HealthyThreshold |
Integer |
后端服务器从fail到success的连续健康检查成功次数。 |
UnhealthyThreshold |
Integer |
后端服务器从success到fail的连续健康检查失败次数。 |
HealthCheckTimeout |
Integer |
每次健康检查响应的最大超时,单位为秒。 |
HealthCheckInterval |
Integer |
健康检查的时间间隔,单位为秒。 |
HealthCheckHttpCode |
String |
健康检查正常的http状态码。 |
HealthCheckConnectPort |
Integer |
健康检查的端口。 |
VServerGroupId |
String |
绑定的虚拟服务器组ID。 |
Gzip |
String |
是否开启Gzip压缩。 |
示例
请求示例
https://slb.aliyuncs.com/
&Action=DescribeLoadBalancerHTTPListenerAttribute
&LoadBalancerId=139a00604ad-cn-east-hangzhou-01
&ListenerPort=80
&<公共请求参数>
返回示例
- XML格式
<?xml version="1.0" encoding="UTF-8"?>
<DescribeLoadBalancerHTTPListenerAttributeResponse>
<RequestId>365F4154-92F6-4AE4-92F8-7FF34B540710</RequestId>
<ListenerPort>80</ListenerPort>
<BackendServerPort>80</BackendServerPort>
<Bandwidth>-1</Bandwidth>
<Status>stopped</Status>
<Schedule>wrr</Schedule>
<XForwardedFor>on</XForwardedFor>
</DescribeLoadBalancerHTTPListenerAttributeResponse>
- JSON格式
{
"RequestId":"365F4154-92F6-4AE4-92F8-7FF34B540710",
"ListenerPort":80,
"BackendServerPort":80,
"Bandwidth":-1,
"Status":"stopped",
"Schedule":"wrr",
"XForwardedFor":"on"
}
最后更新:2016-11-23 16:03:57