DescribeLoadBalancerHTTPListenerAttribute
Queries the configuration of an HTTP listener.
Operation description
Before you begin
You have created a Classic Load Balancer instance. For more information, see CreateLoadBalancer.
You have created an HTTP listener. For more information, 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 Server Load Balancer instance. You can call the DescribeRegions operation to query the region ID. |
cn-hangzhou |
| LoadBalancerId |
string |
Yes |
The ID of the Server Load Balancer instance. |
lb-bp1uaunez0uho0zf0**** |
| ListenerPort |
integer |
Yes |
The frontend port used by the instance. Valid values: 1 to 65535. |
80 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| AclType |
string |
The type of access control. Valid values:
If a whitelist is enabled but no IP address is added to the access control policy group, the SLB listener forwards all requests.
If a blacklist is enabled but no IP address is added to the access control policy group, the SLB listener forwards all requests. Note
This parameter is required when the value of AclStatus is on. |
white |
| VServerGroupId |
string |
The ID of the bound vServer group. |
rsp-cige6j**** |
| Status |
string |
The current status of the listener. Valid values:
|
stopped |
| XForwardedFor_ClientSrcPort |
string |
Indicates whether the
|
off |
| Cookie |
string |
The cookie configured on the server. |
testCookie |
| Gzip |
string |
Indicates whether
|
on |
| HealthCheckConnectPort |
integer |
The port 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 custom listener name. |
HTTP_80 |
| Bandwidth |
integer |
The peak bandwidth of the listener. Unit: Mbit/s.
|
-1 |
| HealthCheckTimeout |
integer |
The timeout period for each health check response. Unit: seconds. |
3 |
| AclStatus |
string |
Indicates whether access control is enabled. Valid values:
|
off |
| BackendServerPort |
integer |
The backend port used by the instance. |
80 |
| CookieTimeout |
integer |
The cookie timeout period. Unit: seconds. |
500 |
| HealthCheckDomain |
string |
The domain name used for health checks. |
www.domain.com |
| UnhealthyThreshold |
integer |
The unhealthy health check threshold. |
4 |
| ForwardPort |
integer |
The redirection port for HTTP-to-HTTPS forwarding. Note
This parameter is not displayed if the value of ListenerForward is off. |
80 |
| XForwardedFor_SLBID |
string |
Indicates whether the
|
on |
| SecurityStatus |
string |
Indicates whether the security status is enabled. Valid values:
|
on |
| HealthCheckHttpCode |
string |
The HTTP status code that indicates a healthy health check. |
http_2xx,http_3xx |
| ListenerForward |
string |
Indicates whether HTTP-to-HTTPS redirection is enabled for the listener. Valid values:
|
on |
| XForwardedFor |
string |
Indicates whether the
|
on |
| IdleTimeout |
integer |
The idle connection timeout period. Unit: seconds. Default value: 15. Valid values: 1 to 60. If no access request is received within the timeout period, Server Load Balancer temporarily breaks the current connection and waits until the next request arrives to re-establish a new connection. |
2 |
| RequestTimeout |
integer |
The request timeout period. Unit: seconds. Default value: 60. Valid values: 1 to 180. If no response is received from the backend server within the timeout period, Server Load Balancer stops waiting and returns an HTTP 504 error code to the client. |
34 |
| ListenerPort |
integer |
The frontend port used by the instance. |
80 |
| HealthCheckInterval |
integer |
The interval between two consecutive health checks. Unit: seconds. |
5 |
| XForwardedFor_SLBPORT |
string |
Indicates whether the
|
off |
| HealthCheckURI |
string |
The URI used for health checks. The URI must be 1 to 80 characters in length and can contain only letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI cannot be only a forward slash (/) but must start with a forward slash (/). |
/test/index.html |
| StickySessionType |
string |
The method used to handle cookies. Valid values: insert or server.
Note
This parameter is required when the value of StickySession is on. |
insert |
| AclId |
string |
The ID of the access control policy group bound to the listener. Note
This parameter is returned when the value of AclStatus is on. |
acl-uf60jw****** |
| Scheduler |
string |
The scheduling algorithm. Valid values:
|
wrr |
| HealthyThreshold |
integer |
The healthy health check 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 for HTTP health checks of the listener. Valid values: head or get. Note
This parameter is returned when the value of HealthCheck is on. |
get |
| HealthCheck |
string |
Indicates whether health checks are enabled. Valid values:
|
on |
| AclIds |
object |
||
| AclId |
array |
The ID of the access control policy group. |
|
| Rules |
object |
||
| Rule |
array<object> |
The description of the forwarding rule. |
|
|
object |
|||
| VServerGroupId |
string |
The ID of the destination vServer group of the forwarding rule. |
rsp-uf6w****** |
| Url |
string |
The access path. |
/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 ID of the Server Load Balancer instance. |
lb-bp1uaunez0uho0zf0**** |
| Tags |
object |
||
| Tag |
array<object> |
The tags. |
|
|
object |
The tags. |
||
| TagKey |
string |
The tag key of the listener. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 64 characters in length and cannot start with |
TestKey |
| TagValue |
string |
The tag value of the listener. 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.