查詢HTTP監聽配置。
請求參數
名稱 | 類型 | 是否必須 | 描述 |
---|---|---|---|
Action | String | 是 | 要執行的操作。取值: DescribeLoadBalancerHTTPListenerAttribute |
RegionId | String | 是 | Server Load Balancer執行個體的地域。 您可以通過調用 DescribeRegions介面獲取地域ID。 |
LoadBalancerId | String | 是 | Server Load Balancer執行個體的ID。 |
ListenerPort | Integer | 是 | Server Load Balancer執行個體前端使用的通信埠。 取值:1-65535 |
返回參數
名稱 | 類型 | 描述 |
---|---|---|
RequestId | String | 請求ID。 |
ListenerPort | Integer | Server Load Balancer執行個體前端使用的通信埠。 |
BackendServerPort | Integer | Server Load Balancer執行個體後端使用的通信埠。 |
Bandwidth | Integer | 監聽的頻寬峰值。 |
Status | String | 當前監聽的狀態。取值: starting | running | configuring | stopping | stopped |
XForwardedFor | String | 是否開啟通過X-Forwarded-For頭欄位獲取訪者真實IP。 |
XForwardedFor_SLBIP | String | 是否通過SLB-IP頭欄位獲取用戶端請求的真實IP。 |
XForwardedFor_SLBID | String | 是否通過SLB-ID頭欄位獲取Server Load Balancer執行個體ID。 |
XForwardedFor_proto | String | 是否通過X-Forwarded-Proto頭欄位獲取Server Load Balancer執行個體的監聽協議。 |
Scheduler | String | 調度演算法。 |
StickySession | String | 是否開啟會話保持。 |
StickySessionType | String | cookie的處理方式。 |
CookieTimeout | Integer | Cookie逾時時間。 |
Cookie | String | 伺服器上配置的cookie。 |
AclStatus | String | 是否開啟存取控制功能。 取值:on | off(預設值) |
AclType | String | 存取控制類型:
當AclStatus參數的值為on時,該參數必選。 |
AclId | String | 監聽綁定的存取原則組ID。 當AclStatus參數的值為on時,該參數必選。 |
HealthCheck | String | 是否開啟健康檢查。 |
HealthCheckDomain | String | 用於健康檢查的網域名稱。 |
HealthCheckURI | String | 用於健康檢查的URI。 |
HealthyThreshold | Integer | 健康檢查閾值。 |
UnhealthyThreshold | Integer | 不健康檢查閾值。 |
HealthCheckTimeout | Integer | 每次健康檢查響應的最大逾時間,單位為秒。 |
HealthCheckInterval | Integer | 健康檢查的時間間隔,單位為秒。 |
HealthCheckHttpCode | String | 健康檢查正常的HTTP狀態碼。 |
HealthCheckConnectPort | Integer | 健康檢查的通信埠。 |
Gzip | String | 是否開啟Gzip壓縮。 |
Rules | List | 監聽下的轉寄規則列表,具體請參見RuleList。 |
RuleList
名稱 | 類型 | 描述 |
---|---|---|
RuleId | String | 轉寄規則ID。 |
RuleName | String | 轉寄規則名稱。 |
Domain | String | 網域名稱。 |
Url | String | 訪問路徑。 |
VServerGroupId | String | 轉寄規則的目標伺服器組ID。 |
樣本
請求樣本
https://slb.aliyuncs.com/?Action=DescribeLoadBalancerHTTPListenerAttribute
&LoadBalancerId=lb-t4nj5vuz8ish9emfk1f20
&ListenerPort=80
&公共請求參數
返回樣本
- XML格式
<?xml version="1.0" encoding="UTF-8"?> <DescribeLoadBalancerHTTPListenerAttributeResponse> <RequestId>8D8A6319-F05A-4577-B50D-388B4B30E103</RequestId> <HealthCheckHttpCode>http_2xx,http_3xx</HealthCheckHttpCode> <CookieTimeout>1000</CookieTimeout> <HealthCheckTimeout>5</HealthCheckTimeout> <XForwardedFor_SLBID>off</XForwardedFor_SLBID> <Gzip>on</Gzip> <Scheduler>wrr</Scheduler> <HealthyThreshold>3</HealthyThreshold> <StickySession>on</StickySession> <UnhealthyThreshold>3</UnhealthyThreshold> <XForwardedFor_SLBIP>off</XForwardedFor_SLBIP> <XForwardedFor_proto>off</XForwardedFor_proto> <Bandwidth>-1</Bandwidth> <HealthCheckURI>/</HealthCheckURI> <VServerGroupId>rsp-bp1kfa2u3y5yw</VServerGroupId> <HealthCheck>on</HealthCheck> <ListenerPort>8080</ListenerPort> <Status>running</Status> <XForwardedFor>on</XForwardedFor> <HealthCheckInterval>2</HealthCheckInterval> <StickySessionType>insert</StickySessionType> </DescribeLoadBalancerHTTPListenerAttributeResponse>
- JSON格式
{ "RequestId":"8D8A6319-F05A-4577-B50D-388B4B30E103", "HealthCheckHttpCode":"http_2xx,http_3xx", "CookieTimeout":1000, "HealthCheckTimeout":5, "XForwardedFor_SLBID":"off", "Gzip":"on", "Scheduler":"wrr", "HealthyThreshold":3, "StickySession":"on", "UnhealthyThreshold":3, "XForwardedFor_SLBIP":"off", "XForwardedFor_proto":"off", "Bandwidth":-1, "HealthCheckURI":"/", "VServerGroupId":"rsp-bp1kfa2u3y5yw", "HealthCheck":"on", "ListenerPort":8080, "Status":"running", "XForwardedFor":"on", "HealthCheckInterval":2, "StickySessionType":"insert" }