查询监听器信息

最近更新时间:2018-01-05 11:47:55

DescribeListeners(描述监听器)

Request Parameters(请求参数)

ListenerId.N

  • 监听器的ID
  • 类型: String
  • 是否可缺省: 是
  • 缺省值: 描述region下所有的监听器信息

Filter.N

  • load-balancer-id, 负载均衡的ID
  • 类型: Filter list
  • 是否可缺省: 是

Response Elements(返回值)

RequestId

  • 请求ID
  • 类型: String

ListenerSet

  • 负载均衡信息的列表
  • 类型: Listener list

Examples(举例)

查看负载均衡下的监听器信息

Sample Request(请求)
https://slb.region.api.ksyun.com/?Action=DescribeListeners
&Version=2016-03-04
&Filter.1.Name=load-balancer-id
&Filter.1.Value.1=845c026f-aedd-417c-873e-bc2eab9f7f55
Sample Response(返回)
<DescribeListenersResponse xmlns="http://slb.ksyun.com/doc/2016-03-04/">
    <RequestId>c46535f1-8870-450c-9bb7-be41e5dcadd0</RequestId>
    <ListenerSet>
        <Item>
            <CreateTime>2016-11-29 14:44:16</CreateTime>
            <HealthCheck>
                <Interval>2</Interval>
                <UnhealthyThreshold>3</UnhealthyThreshold>
                <HealthCheckState>start</HealthCheckState>
                <HealthCheckId>d25ab8fa-826c-4159-9cce-1934ae35f1e3</HealthCheckId>
                <HealthyThreshold>2</HealthyThreshold>
                <Timeout>3</Timeout>
                <ListenerId>8017e46e-5ed5-4d69-8a95-264f4fc4cb0c</ListenerId>
            </HealthCheck>
            <ListenerId>8017e46e-5ed5-4d69-8a95-264f4fc4cb0c</ListenerId>
            <Method>RoundRobin</Method>
            <RealServer>
                <item>
                    <RealServerIp>10.0.0.20</RealServerIp>
                    <RealServerPort>812</RealServerPort>
                    <RealServerState>healthy</RealServerState>
                    <RealServerType>host</RealServerType>
                    <RegisterId>fb362a72-f01e-4f5c-88da-6c5a73e21424</RegisterId>
                    <ListenerId>8017e46e-5ed5-4d69-8a95-264f4fc4cb0c</ListenerId>
                    <Weight>20</Weight>
                </item>
            </RealServer>
            <ListenerName>ksc_listener</ListenerName>
            <LoadBalancerId>845c026f-aedd-417c-873e-bc2eab9f7f55</LoadBalancerId>
            <ListenerProtocol>TCP</ListenerProtocol>
            <ListenerPort>810</ListenerPort>
            <Session>
                <SessionState>start</SessionState>
                <SessionPersistencePeriod>20</SessionPersistencePeriod>
            </Session>
            <ListenerState>stop</ListenerState>
        </Item>
    </ListenerSet>
</DescribeListenersResponse>

金山云,开启您的云计算之旅

注册有礼