You need to enable JavaScript to run this app.
Database Transmission Service

Database Transmission Service

Copy page
Download PDF
Tag management
DescribeTagsByResource
Copy page
Download PDF
DescribeTagsByResource
Call DescribeTagsByResource to query the tags of a task.​
Request type​
Synchronous request.​
Request parameters​
​
Parameter​
Type​
Is it required?​
Sample​
Description​
TaskIds​
Array of String​
Yes​
[ "18064de5e9d345dc965ee45217******" ]​
List of task ID information. You can specify up to 20 task IDs at a time.​
PageNumber​
Integer​
No​
1​
Page number. The value range is 1 to 1000, with a default of 1.​
PageSize​
Integer​
No​
10​
Number of records per page. The value range is 1 to 1000, with a default of 10.​
TagFilters​
Array of TagFilterObject​
No​
​
[​
{​
"Key":"key1",​
"Value":"value1"​
}​
]​
​
Task tag information.​
tip​
  • When this parameter is set, the tag information of the specified tag under the specified task will be returned.​
  • If this parameter is not set, all tag information under the specified task is returned by default.​
​
TagFilterObject​
​
Parameter​
Type​
Is it required?​
Sample​
Description​
Key​
String​
Yes​
key1​
Tag keys for querying and filtering.​
  • This parameter is required if you want to use tags to query and filter instances.​
  • Duplicate tag keys are allowed.​
  • A maximum of 10 tags can be passed in for query and filter at one time.​
Value​
String​
No​
value1​
Tag value corresponding to the tag key used for query filtering.​
  • If this parameter is left empty, it means that there is no restriction on the tag value, and all instances bound to the specified tag key will be filtered.​
  • If an empty string is passed in, it means filtering instances with empty tag values under the corresponding tag key.​
​
Return parameters​
Null.​
​
Parameter​
Type​
Sample​
Description​
Total​
Integer​
1​
Total number of tags.​
ResourceTags​
Array of ResourceTag​
​
[​
{​
"Key":"key1",​
"TaskId":"18064de5e9d345dc965ee45217******",​
"Value":"value1"​
}​
]​
​
Task tag list information.​
​
ResourceTag​
​
Parameter​
Type​
Sample​
Description​
TaskId​
String​
18064de5e9d345dc965ee45217******​
Task ID of the task bound with the tag specified by key and value.​
Key​
String​
key1​
The tag Key bound to the task.​
Value​
String​
value1​
The tag value bound to the task.​
​
Example​
Request example​
​
POST /?Action=DescribeTagsByResource&Version=2022-10-01 HTTP/1.1​
Content-Type: application/json​
Host: dts.cn-beijing.volcengineapi.com​
X-Date: 20221001T101010Z​
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20221001/cn-beijing/dts/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c645****​
{​
"TaskIds": ["18064de5e9d345dc965ee45217******"],​
"TagFilters": [​
{​
"Key": "key1",​
"Value": "value1"​
}​
],​
"PageNumber":1,​
"PageSize":10​
}​
​
Response example​
​
{​
"ResponseMetadata": {​
"RequestId": "2023041416325819C8523905F879303A46",​
"Action": "DescribeTagsByResource",​
"Version": "2022-10-01",​
"Service": "dts",​
"Region": "cn-shanghai"​
},​
"Result": {​
"ResourceTags": [​
{​
"Key": "key1",​
"TaskId": "18064de5e9d345dc965ee45217******",​
"Value": "value1"​
}​
],​
"Total": 1​
}​
}​
​
Error code​
For more details, see Error code.​
Last updated: 2026.02.03 15:54:45