1. API Description
Domain name for API request: gaap.intl.tencentcloudapi.com.
This API (DescribeTCPListeners) is used to query the TCP listener information of a single connection or connection group.
A maximum of 20 requests can be initiated per second for this API.
We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name |
Required |
Type |
Description |
| Action |
Yes |
String |
Common Params. The value used for this API: DescribeTCPListeners. |
| Version |
Yes |
String |
Common Params. The value used for this API: 2018-05-29. |
| Region |
No |
String |
Common Params. This parameter is not required. |
| ProxyId |
No |
String |
Filter condition that filters by connection ID. You must specify at least one filter condition (ProxyId/GroupId/ListenerId), but ProxyId and GroupId cannot be set at the same time. |
| ListenerId |
No |
String |
Filter condition. Exact query by listener ID. When ProxyId is specified, the listener will be checked whether it belongs to the connection. When GroupId is specified, the listener will be checked whether it belongs to the connection group. |
| ListenerName |
No |
String |
Filter condition. Exact query by listener name. |
| Port |
No |
Integer |
Filter condition. Exact query by listener port. |
| Offset |
No |
Integer |
Offset. Default value: 0. |
| Limit |
No |
Integer |
Quantity limit. The default value is 20. |
| GroupId |
No |
String |
Filter condition that filters by connection group ID. You must specify at least one filter condition (ProxyId/GroupId/ListenerId), but ProxyId and GroupId cannot be set at the same time. |
| SearchValue |
No |
String |
Filter condition. It supports fuzzy query by port or listener name. This parameter cannot be used with ListenerName or Port. |
3. Output Parameters
| Parameter Name |
Type |
Description |
| TotalCount |
Integer |
Total quantity of listeners that matches the conditions |
| ListenerSet |
Array of TCPListener |
TCP listener list |
| RequestId |
String |
The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
4. Example
Example1 Querying TCP listener list
This example shows you how to query the TCP listener list.
POST / HTTP/1.1
Host: gaap.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeTCPListeners
<Common request parameters>
{
"ProxyId": "link-hwera8lq",
"ListenerId": "listener-gkzl9e7t"
}
Output Example
{
"Response": {
"TotalCount": 1,
"ListenerSet": [
{
"HealthyThreshold": 1,
"BindStatus": 1,
"SessionPersist": 1,
"RealServerType": "xx",
"Protocol": "xx",
"ConnectTimeout": 1,
"RealServerPort": 1,
"HealthCheck": 1,
"ListenerId": "xx",
"UnhealthyThreshold": 1,
"ListenerStatus": 1,
"ListenerName": "xx",
"Scheduler": "xx",
"ClientIPMethod": 1,
"FailoverSwitch": 1,
"RealServerSet": [
{
"RealServerStatus": 0,
"RealServerPort": 111,
"RealServerId": "xx",
"DownIPList": [
"11.11.11.11:111"
],
"RealServerWeight": 1,
"RealServerIP": "xx"
}
],
"CreateTime": 1,
"Port": 1,
"DelayLoop": 1
}
],
"RequestId": "xx"
}
}
5. Developer Resources
SDK
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
Command Line Interface
6. Error Code
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code |
Description |
| AuthFailure |
CAM signature/authentication error. |
| AuthFailure.NotEnterpriseAuthorization |
Not an organizational customer. |
| AuthFailure.UnauthorizedOperation |
The sub-account is not authorized for this operation. |
| FailedOperation |
Operation failed. |
| FailedOperation.UserNotConfirmProtocol |
Protocol not activated. |
| InternalError |
Internal error. |
| InvalidParameter |
Incorrect parameter. |
| InvalidParameterValue |
Incorrect parameter value. |
| MissingParameter |
Missing parameter. |
| ResourceNotFound |
The resource does not exist. |
| ResourceUnavailable.AccountViolation |
Restricted resources found in your account. Check your inbox and email for details. |
| UnauthorizedOperation |
Unauthorized operation. |
| UnknownParameter |
Unknown parameter. |