Queries the configuration of a TCP listener.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
slb:DescribeLoadBalancerTCPListenerAttribute |
get |
*loadbalancer
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID of the Classic Load Balancer instance. You can find the region ID in the Regions and zones list or by calling the DescribeRegions operation. |
cn-hangzhou |
| LoadBalancerId |
string |
Yes |
The ID of the Classic Load Balancer instance. |
lb-bp1ygod3yctvg1y**** |
| ListenerPort |
integer |
Yes |
The frontend port used by the Classic Load Balancer instance. Valid values: 1 to 65535. |
80 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| VServerGroupId |
string |
The ID of the attached vServer group. |
rsp-cige6******8 |
| Status |
string |
The current status of the listener. Valid values:
|
stopped |
| AclType |
string |
The access control type. Valid values:
If you enable a whitelist but do not add any IP addresses to the access control policy group, the listener forwards all requests.
If you enable a blacklist but do not add any IP addresses to the access control policy group, the listener forwards all requests. Note
This parameter is required if the AclStatus parameter is set to on. |
white |
| ConnectionDrainTimeout |
integer |
The timeout period for connection draining. This parameter is returned only if the ConnectionDrain parameter is set to on. Valid values: 10 to 900 seconds. |
300 |
| RequestId |
string |
The request ID. |
365F4154-92F6-4AE4-92F8-7FF34B540710 |
| HealthCheckConnectPort |
integer |
The port used for health checks. Valid values: 1 to 65535. If you do not specify this parameter, the backend server port (BackendServerPort) is used. |
8080 |
| Description |
string |
The custom name of the listener. |
TCP_80 |
| Bandwidth |
integer |
The peak bandwidth of the listener, in Mbit/s. Valid values:
|
-1 |
| HealthCheckType |
string |
The health check method for the TCP listener. Valid values: tcp or http. |
tcp |
| MasterSlaveServerGroupId |
string |
The ID of the attached primary/secondary server group. |
rsp-0bfucw**** |
| BackendServerPort |
integer |
The backend port used by the Classic Load Balancer instance. Note
This parameter is not displayed if the backend server group is a vServer group. |
443 |
| AclStatus |
string |
Whether to enable access control. Valid values:
|
off |
| HealthCheckDomain |
string |
The domain name used for health checks. Valid values:
|
www.domain.com |
| UnhealthyThreshold |
integer |
The unhealthy threshold. After consecutive health check failures reach this value, the health check status of a backend server changes from success to failure. Valid values: 2 to 10. |
4 |
| HealthCheckHttpCode |
string |
The HTTP status code that indicates a successful health check. |
http_2xx |
| ProxyProtocolV2Enabled |
boolean |
Whether to enable Proxy Protocol V2 to pass client source IP addresses to backend servers. Valid values:
|
false |
| PersistenceTimeout |
integer |
The timeout period for session persistence. Valid values: 0 to 3600 seconds. Default value: 0, which disables session persistence. |
0 |
| ListenerPort |
integer |
The frontend port used by the Classic Load Balancer instance. |
110 |
| HealthCheckInterval |
integer |
The interval between health checks. Valid values: 1 to 50 seconds. |
5 |
| HealthCheckURI |
string |
The URL used for health checks. The URL 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 URL cannot be just a forward slash (/), but it must start with a forward slash (/). |
/test/index.html |
| AclId |
string |
The ID of the access control policy group attached to the listener. This parameter is required if the AclStatus parameter is set to on. |
acl-uf60jwfi****** |
| SynProxy |
string |
Whether to enable SynProxy attack prevention for the load balancer. We recommend that you do not change this parameter. Let Server Load Balancer manage it.
|
disable |
| Scheduler |
string |
The scheduling algorithm. Valid values:
Note
The sch and tch algorithms are supported only by guaranteed-performance instances. |
wrr |
| EstablishedTimeout |
integer |
The connection timeout period. |
500 |
| HealthCheckConnectTimeout |
integer |
The timeout period for health checks. |
100 |
| HealthyThreshold |
integer |
The healthy threshold. After consecutive health check successes reach this value, the health check status of a backend server changes from failure to success. Valid values: 2 to 10. |
4 |
| ConnectionDrain |
string |
Whether to enable connection draining. This parameter is returned only if the ConnectionDrain parameter is set to on. Valid values:
|
off |
| HealthCheckMethod |
string |
The health check method. |
tcp |
| HealthCheck |
string |
Whether to enable health checks. Valid values:
|
on |
| AclIds |
object |
||
| AclId |
array |
A list of access control policy group IDs. |
|
| LoadBalancerId |
string |
The ID of the Classic Load Balancer instance. |
lb-bp1ygod3yctvg1y**** |
| Tags |
object |
||
| Tag |
array<object> |
A list of tags. |
|
|
object |
A list of tags. |
||
| TagKey |
string |
The tag key of the listener. Valid values of N: 1 to 20. If you specify this parameter, it cannot be an empty string. It can be up to 128 characters in length. It cannot start with |
TestKey |
| TagValue |
string |
The tag value of the listener. Valid values of N: 1 to 20. If you specify this parameter, it can be an empty string. It can be up to 128 characters in length. It cannot start with |
TestValue |
Examples
Success response
JSON format
{
"VServerGroupId": "rsp-cige6******8",
"Status": "stopped",
"AclType": "white",
"ConnectionDrainTimeout": 300,
"RequestId": "365F4154-92F6-4AE4-92F8-7FF34B540710",
"HealthCheckConnectPort": 8080,
"Description": "TCP_80",
"Bandwidth": -1,
"HealthCheckType": "tcp",
"MasterSlaveServerGroupId": "rsp-0bfucw****",
"BackendServerPort": 443,
"AclStatus": "off",
"HealthCheckDomain": "www.domain.com",
"UnhealthyThreshold": 4,
"HealthCheckHttpCode": "http_2xx",
"ProxyProtocolV2Enabled": false,
"PersistenceTimeout": 0,
"ListenerPort": 110,
"HealthCheckInterval": 5,
"HealthCheckURI": "/test/index.html",
"AclId": "acl-uf60jwfi******",
"SynProxy": "disable",
"Scheduler": "wrr",
"EstablishedTimeout": 500,
"HealthCheckConnectTimeout": 100,
"HealthyThreshold": 4,
"ConnectionDrain": "off",
"HealthCheckMethod": "tcp",
"HealthCheck": "on",
"AclIds": {
"AclId": [
""
]
},
"LoadBalancerId": "lb-bp1ygod3yctvg1y****",
"Tags": {
"Tag": [
{
"TagKey": "TestKey",
"TagValue": "TestValue"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | LocationServiceTimeout | Location service connection timeout. Please try again later. | |
| 403 | UnauthorizedRegion | The specified region of is not authorized. | The specified region of is not authorized. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.