Domain name for API request: clb.intl.tencentcloudapi.com.
This API is used to query the target group information.
A maximum of 20 requests can be initiated per second for this API.
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: DescribeTargetGroups. |
| Version | Yes | String | Common Params. The value used for this API: 2018-03-17. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| TargetGroupIds.N | No | Array of String | Target group ID, which is exclusive of Filters. |
| Limit | No | Integer | Limit of the number of displayed results. Default value: 20. |
| Offset | No | Integer | Starting display offset |
| Filters.N | No | Array of Filter | Filter condition array, mutually exclusive with TargetGroupIds, supports TargetGroupVpcId (vpc ID), TargetGroupName (target group name), and Tag. |
| Parameter Name | Type | Description |
|---|---|---|
| TotalCount | Integer | Number of displayed results |
| TargetGroupSet | Array of TargetGroupInfo | Information set of displayed target groups |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
This example shows you how to query a target group by ID.
POST / HTTP/1.1
Host: clb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeTargetGroups
<Common request parameters>
{
"TargetGroupIds": [
"lbtg-5xunivs0"
]
}{
"Response": {
"TotalCount": 1,
"RequestId": "6a932437-5ce7-4c30-a4ce-7076ef654dcd",
"TargetGroupSet": [
{
"UpdatedTime": "2020-09-22 00:00:00",
"TargetGroupId": "lbtg-xxxxxxxx",
"Protocol": "TCP",
"VpcId": "vpc-xxxxxxxx",
"CreatedTime": "2020-09-22 00:00:00",
"AssociatedRule": [
{
"Domain": "www.xxxx.com",
"Protocol": "TCP",
"Url": "/xxxx",
"LoadBalancerName": "test_xxx",
"ListenerId": "lbl-xxxxxxxx",
"LocationId": "loc-xxxxxxxx",
"ListenerName": "test_xxx",
"LoadBalancerId": "lb-xxxxxxxx",
"Port": 80
},
{
"Domain": "www.xxxx.com",
"Protocol": "TCP",
"Url": "/xxxx",
"LoadBalancerName": "test_xxx",
"ListenerId": "lbl-xxxxxxxx",
"LocationId": "loc-xxxxxxxx",
"ListenerName": "test_xxx",
"LoadBalancerId": "lb-xxxxxxxx",
"Port": 801
}
],
"Port": 1,
"TargetGroupName": "test_xxxx"
}
]
}
}
This example shows you how to query target group information by criteria.
POST / HTTP/1.1
Host: clb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeTargetGroups
<Common request parameters>
{
"Filters": [
{
"Values": [
"vpc-i1cnjuhx"
],
"Name": "TargetGroupVpcId"
}
]
}{
"Response": {
"TotalCount": 3,
"TargetGroupSet": [
{
"TargetGroupId": "lbtg-5xunivs0",
"VpcId": "vpc-i1cnjuhx",
"TargetGroupName": "tg111_for_l4",
"Protocol": "TCP",
"Port": 111,
"CreatedTime": "2019-07-14 16:18:43",
"UpdatedTime": "2019-07-14 16:18:43",
"AssociatedRule": [
{
"LocationId": "loc-jjqr0ric",
"Domain": "aaaa.com",
"Url": "/group",
"ListenerId": "lbl-m2q6sp9m",
"Port": 80,
"Protocol": "http",
"LoadBalancerId": "lb-phbx2420",
"LoadBalancerName": "lb-12f60e5",
"ListenerName": "GROUP-LISTENER"
},
{
"LocationId": null,
"Domain": null,
"Url": null,
"ListenerId": "lbl-ow27ut6y",
"Port": 777,
"Protocol": "tcp",
"LoadBalancerId": "lb-phbx2420",
"LoadBalancerName": "lb-12f60e5",
"ListenerName": "TARGET-LISTENER"
}
]
},
{
"TargetGroupId": "lbtg-dxnp10nc",
"VpcId": "vpc-i1cnjuhx",
"TargetGroupName": "tg111_for_l41563508267",
"Protocol": "TCP",
"Port": 111,
"CreatedTime": "2019-07-19 11:51:08",
"UpdatedTime": "2019-07-19 11:51:07",
"AssociatedRule": []
},
{
"TargetGroupId": "lbtg-bjfi6nt6",
"VpcId": "vpc-i1cnjuhx",
"TargetGroupName": "tg111_for_l41563508507",
"Protocol": "TCP",
"Port": 111,
"CreatedTime": "2019-07-19 11:55:08",
"UpdatedTime": "2019-07-19 11:55:08",
"AssociatedRule": []
}
],
"RequestId": "412c7de5-47f6-4153-bf1b-77ef37e15244"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation | Operation failed. |
| InternalError | Internal error. |
| InvalidParameter | Parameter error. |
| InvalidParameterValue | Incorrect parameter value. |
| UnauthorizedOperation | Unauthorized operation. |
Feedback