Queries the configurations of an HTTP listener.
Operation description
Before you begin
A Classic Load Balancer (CLB) instance is created. For more information, see CreateLoadBalancer.
An HTTP listener is created. For more information about how to create an HTTP listener, see CreateLoadBalancerHTTPListener.
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
slb:DescribeLoadBalancerHTTPListenerAttribute | get | *loadbalancer
|
| None |
Request parameters
Parameter | Type | Required | Description | Example |
RegionId | string | No | The region ID of the CLB instance. Call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
LoadBalancerId | string | Yes | The CLB instance ID. | lb-bp1uaunez0uho0zf0**** |
ListenerPort | integer | Yes | The frontend port that is used by the CLB instance. Valid values: 1 to 65535. | 80 |
Response elements
Element | Type | Description | Example |
object | |||
AclType | string | The type of the ACL. Valid values:
If you enable a whitelist but do not add an IP address to the ACL, the listener forwards all requests.
If a blacklist is configured for a listener but no IP address is added to the blacklist, the listener forwards all requests. Note This parameter is required when AclStatus is set to on. | white |
VServerGroupId | string | The ID of the associated server group. | rsp-cige6j**** |
Status | string | The status of the listener. Valid values:
| stopped |
XForwardedFor_ClientSrcPort | string | Indicates whether the
| off |
Cookie | string | The cookie that is configured on the server. | testCookie |
Gzip | string | Indicates whether
| on |
HealthCheckConnectPort | integer | The port that is used for health checks. Note This parameter takes effect only when HealthCheck is set to on. | 8080 |
RequestId | string | The request ID. | 365F4154-92F6-4AE4-92F8-7FF34B540710 |
Description | string | The name of the listener. | HTTP_80 |
Bandwidth | integer | The maximum bandwidth of the listener. Unit: Mbit/s.
| -1 |
HealthCheckTimeout | integer | The timeout period of each health check. Unit: seconds. | 3 |
AclStatus | string | Indicates whether access control is enabled. Valid values:
| off |
BackendServerPort | integer | The backend port that is used by the CLB instance. | 80 |
CookieTimeout | integer | The timeout period of a cookie. Unit: seconds. | 500 |
HealthCheckDomain | string | The domain name that you want to use for health checks. | www.domain.com |
UnhealthyThreshold | integer | The unhealthy threshold. | 4 |
ForwardPort | integer | The listener port that is used to redirect HTTP requests to HTTPS. Note If the ListenerForward parameter is set to off, this parameter is not displayed. | 80 |
XForwardedFor_SLBID | string | Indicates whether the
| on |
SecurityStatus | string | Indicates whether the listener is in the Secure state. Valid values:
| on |
HealthCheckHttpCode | string | The HTTP status code for a successful health check. | http_2xx,http_3xx |
ListenerForward | string | Indicates whether HTTP-to-HTTPS redirection is enabled. Valid values:
| on |
XForwardedFor | string | Indicates whether the
| on |
IdleTimeout | integer | The timeout period of an idle connection. Unit: seconds. Default value: 15. Valid values: 1 to 60. If no request is received within the specified timeout period, CLB closes the connection. When a request is received, CLB establishes a new connection. | 2 |
RequestTimeout | integer | The timeout period of a request. Unit: seconds. Default value: 60. Valid values: 1 to 180. If no response is received from a backend server within the specified timeout period, CLB returns the HTTP 504 status code to the client. | 34 |
ListenerPort | integer | The frontend port that is used by the CLB instance. | 80 |
HealthCheckInterval | integer | The interval at which health checks are performed. Unit: seconds. | 5 |
XForwardedFor_SLBPORT | string | Indicates whether the
| off |
HealthCheckURI | string | The URL path that is used for health checks. The URI must be 1 to 80 characters in length, and can contain only digits, letters, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). | /test/index.html |
StickySessionType | string | The method that is used to handle a cookie. Valid values: insert and server.
Note This parameter is required when StickySession is set to on. | insert |
AclId | string | The ID of the network ACL that is associated with a listener. Note This parameter is returned when AclStatus is set to on. | acl-uf60jw****** |
Scheduler | string | The routing algorithm. Valid values:
| wrr |
HealthyThreshold | integer | The healthy threshold. | 4 |
XForwardedFor_proto | string | Indicates whether the
| on |
XForwardedFor_SLBIP | string | Indicates whether the
| on |
StickySession | string | Indicates whether session persistence is enabled. Valid values:
| on |
HealthCheckMethod | string | The health check method used by HTTP listeners. Valid values: head and get. Note This parameter is returned when HealthCheck is set to on. | get |
HealthCheck | string | Indicates whether the health check feature is enabled. Valid values:
| on |
| AclIds | object | ||
| AclId | array | The ID of the access control list (ACL). | |
| Rules | object | ||
| Rule | array<object> | The list of forwarding rules. | |
object | |||
VServerGroupId | string | The ID of the server group specified in the forwarding rule. | rsp-uf6w****** |
Url | string | The request URL. | /example |
Domain | string | The domain name. | www.example.com |
RuleName | string | The name of the forwarding rule. | test |
RuleId | string | The ID of the forwarding rule. | 1234 |
LoadBalancerId | string | The CLB instance ID. | lb-bp1uaunez0uho0zf0**** |
| Tags | object | ||
| Tag | array<object> | The tags. | |
object | The tags. | ||
TagKey | string | The key of tag N. Valid values of N: 1 to 20. The tag value cannot be an empty string. The tag key can be up to 64 characters in length. The key cannot start with | TestKey |
TagValue | string | The value of tag N. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length, and cannot start with | TestValue |
Examples
Success response
JSON format
{
"AclType": "white",
"VServerGroupId": "rsp-cige6j****",
"Status": "stopped",
"XForwardedFor_ClientSrcPort": "off",
"Cookie": "testCookie",
"Gzip": "on",
"HealthCheckConnectPort": 8080,
"RequestId": "365F4154-92F6-4AE4-92F8-7FF34B540710",
"Description": "HTTP_80",
"Bandwidth": -1,
"HealthCheckTimeout": 3,
"AclStatus": "off",
"BackendServerPort": 80,
"CookieTimeout": 500,
"HealthCheckDomain": "www.domain.com",
"UnhealthyThreshold": 4,
"ForwardPort": 80,
"XForwardedFor_SLBID": "on",
"SecurityStatus": "on",
"HealthCheckHttpCode": "http_2xx,http_3xx",
"ListenerForward": "on",
"XForwardedFor": "on",
"IdleTimeout": 2,
"RequestTimeout": 34,
"ListenerPort": 80,
"HealthCheckInterval": 5,
"XForwardedFor_SLBPORT": "off",
"HealthCheckURI": "/test/index.html",
"StickySessionType": "insert ",
"AclId": "acl-uf60jw******",
"Scheduler": "wrr",
"HealthyThreshold": 4,
"XForwardedFor_proto": "on",
"XForwardedFor_SLBIP": "on",
"StickySession": "on",
"HealthCheckMethod": "get",
"HealthCheck": "on",
"AclIds": {
"AclId": [
""
]
},
"Rules": {
"Rule": [
{
"VServerGroupId": "rsp-uf6w******",
"Url": "/example",
"Domain": "www.example.com",
"RuleName": "test",
"RuleId": "1234"
}
]
},
"LoadBalancerId": "lb-bp1uaunez0uho0zf0****",
"Tags": {
"Tag": [
{
"TagKey": "TestKey",
"TagValue": "TestValue"
}
]
}
}Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.