Domain name for API request: gwlb.intl.tencentcloudapi.com.
This API is used to query 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: 2024-09-06. |
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 mutually exclusive with Filters. |
Limit | No | Integer | Limit on the number of displayed entries. Default value: 20. |
Offset | No | Integer | Starting display offset. |
Filters.N | No | Array of Filter | Filter criterion array, which supports TargetGroupVpcId and TargetGroupName. |
Parameter Name | Type | Description |
---|---|---|
TotalCount | Integer | Number of displayed results. |
TargetGroupSet | Array of TargetGroupInfo | Collection of displayed target group information. |
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: gwlb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeTargetGroups
<common request parameters>
{
"TargetGroupIds": [
"lbtg-5xunivs0"
]
}
{
"Response": {
"RequestId": "7ae76f16-a859-449a-a43e-674c229999cc",
"TargetGroupSet": [
{
"AllDeadToAlive": false,
"AssociatedRule": [
{
"LoadBalancerId": "gwlb-poqv7z4y",
"LoadBalancerName": "test-gwlb-2"
}
],
"CreatedTime": "2024-09-04T14:30:45+08:00",
"HealthCheck": {
"HealthNum": 3,
"HealthSwitch": true,
"IntervalTime": 5,
"Port": 0,
"Protocol": "icmp",
"Timeout": 2,
"UnHealthNum": 3
},
"Port": 6081,
"Protocol": "geneve",
"ScheduleAlgorithm": "ip_hash_3",
"TargetGroupId": "lbtg-5xunivs0",
"TargetGroupName": "gwlb-tar-5",
"UpdatedTime": "2024-09-04T14:30:44+08:00",
"VpcId": "vpc-drpj1tv1"
}
],
"TotalCount": 1
}
}
This example shows you how to query target group information by criteria.
POST / HTTP/1.1
Host: gwlb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeTargetGroups
<common request parameters>
{
"Filters": [
{
"Values": [
"vpc-drpj1tv1"
],
"Name": "TargetGroupVpcId"
}
]
}
{
"Response": {
"RequestId": "7ae76f16-a859-449a-a43e-674c229999cc",
"TargetGroupSet": [
{
"AllDeadToAlive": false,
"AssociatedRule": [
{
"LoadBalancerId": "gwlb-poqv7z4y",
"LoadBalancerName": "test-gwlb-2"
}
],
"CreatedTime": "2024-09-04T14:30:45+08:00",
"HealthCheck": {
"HealthNum": 3,
"HealthSwitch": true,
"IntervalTime": 5,
"Port": 0,
"Protocol": "icmp",
"Timeout": 2,
"UnHealthNum": 3
},
"Port": 6081,
"Protocol": "geneve",
"ScheduleAlgorithm": "ip_hash_3",
"TargetGroupId": "lbtg-5xunivs0",
"TargetGroupName": "gwlb-tar-5",
"UpdatedTime": "2024-09-04T14:30:44+08:00",
"VpcId": "vpc-drpj1tv1"
}
],
"TotalCount": 1
}
}
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 | Invalid parameter value. |
UnauthorizedOperation | Unauthorized operation. |
本页内容是否解决了您的问题?