开发者社区> 问答> 正文

监听相关API:DescribeLoadBalancerHTTPListenerAttribute


描述

  • 查询HTTP Listener信息。  
  • Listener包含5种状态:starting、running、configuring、stopping、stopped。Listener的状态转换图以及每个状态的具体说明,参见负载均衡 Listener状态转换图


请求参数


                                                                                                                                                                                                      
名称类型是否必须描述
ActionString操作接口名,系统规定参数。取值:DescribeLoadBalancerHTTPListenerAttribute。
RegionIdString地域ID。
LoadBalancerIdString负载均衡实例的唯一标识。
ListenerPort Integer负载均衡实例前端使用的端口。取值:1-65535。


返回参数


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
名称类型描述
<公共参数>详见 <公共返回参数>
ListenerPort Integer负载均衡实例前端使用的端口。
Bandwidth Integer监听的带宽峰值。
Status StringListener当前状态。包含5种状态:starting、running、configuring、stopping、stopped。
XForwardedFor String是否开启通过X-Forwarded-For的方式获取来访者真实IP。
on为开启XForwardedFor,off为关闭XForwardedFor。注:考虑安全原因,本参数自2015年5月15日起会强制设置为on。
SchedulerString调度算法。
取值:wrr/wlc
StickySession String是否开启会话保持。on为开启会话保持,off为关闭会话保持。
StickySessionTypeStringcookie的处理方式。
设置为insert表示由负载均衡插入;设置为server表示负载均衡从后端服务器学习。
CookieTimeoutIntegercookie超时时间。
Cookie String服务器上配置的cookie。只有在Type为server时有效。
HealthCheckString是否开启健康检查。on为开启健康检查,off为关闭健康检查。
HealthCheckDomain String用于健康检查的域名。
HealthCheckURI String用于健康检查的URI。
HealthyThreshold Integer后端服务器从fail到success的连续健康检查成功次数。
UnhealthyThresholdInteger后端服务器从success到fail的连续健康检查失败次数。
HealthCheckTimeout Integer每次健康检查响应的最大超时,单位为秒。
HealthCheckIntervalInteger健康检查的时间间隔,单位为秒。
HealthCheckHttpCode String健康检查正常的http状态码。
HealthCheckConnectPortInteger健康检查的端口。
VServerGroupId String绑定的虚拟服务器组ID。
GzipString是否开启Gzip压缩。


示例



请求示例

  1.     https://slb.aliyuncs.com/
  2.     &Action=DescribeLoadBalancerHTTPListenerAttribute
  3.     &LoadBalancerId=139a00604ad-cn-east-hangzhou-01
  4.     &ListenerPort=80
  5.     &<公共请求参数>


返回示例

  • XML格式
    1.       <?xml version="1.0" encoding="UTF-8"?>
    2.       <DescribeLoadBalancerHTTPListenerAttributeResponse>
    3.           <RequestId>365F4154-92F6-4AE4-92F8-7FF34B540710</RequestId>
    4.           <ListenerPort>80</ListenerPort>
    5.           <BackendServerPort>80</BackendServerPort>
    6.           <Bandwidth>-1</Bandwidth>
    7.           <Status>stopped</Status>
    8.           <Schedule>wrr</Schedule>
    9.           <XForwardedFor>on</XForwardedFor>
    10.       </DescribeLoadBalancerHTTPListenerAttributeResponse>
  • JSON格式
    1.   {
    2.       "RequestId":"365F4154-92F6-4AE4-92F8-7FF34B540710",
    3.        "ListenerPort":80,
    4.       "BackendServerPort":80,
    5.       "Bandwidth":-1,
    6.       "Status":"stopped",
    7.       "Schedule":"wrr",
    8.       "XForwardedFor":"on"
    9.   }

展开
收起
行者武松 2017-10-18 14:34:46 1925 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
API 网关实践 立即下载
API PLAYBOOK 立即下载
API平台的安全实践 立即下载