Queries the tags that are bound to specific data migration, data synchronization, or change tracking instances, or queries the instances to which specific tags are bound.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListTagResources | The operation that you want to perform. Set the value to ListTagResources. |
RegionId | String | Yes | cn-hangzhou | The ID of the region where the data migration, data synchronization, or change tracking instance resides. For more information, see List of supported regions. |
ResourceType | String | Yes | ALIYUN::DTS::INSTANCE | The resource type. Valid value: ALIYUN::DTS::INSTANCE. |
NextToken | String | No | 212db86sca4384811e0b5e8707ec2**** | The query token. Note If a query does not return all results, you can specify the returned NextToken parameter in the next query to obtain more results. |
ResourceId.N | RepeatList | No | dtsntk10k6r12v**** | The ID of the data migration, data synchronization, or change tracking instance. You can call the DescribeDtsJobs operation to query the instance ID. Note
|
Tag.N.Key | String | No | testkey1 | The tag key. Note
|
Tag.N.Value | String | No | testvalue1 | The tag value. Note
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
ErrCode | String | InternalError | The error code returned if the call failed. |
ErrMessage | String | The request processing has failed due to some unknown error. | The error message returned if the call failed. |
NextToken | String | 212db86sca4384811e0b5e8707ec2**** | The query token. Note If a query does not return all results, you can specify the returned NextToken parameter in the next query to obtain more results. |
RequestId | String | 609AD332-F2B1-48B7-BF43-41FEE641**** | The ID of the request. |
Success | Boolean | true | Indicates whether the call was successful. |
TagResources | Array of TagResource | The collection of tags. | |
TagResource | |||
ResourceId | String | dtsntk10k6r12v**** | The ID of the DTS instance. |
ResourceType | String | ALIYUN::DTS::INSTANCE | The resource type. Valid value: ALIYUN::DTS::INSTANCE. |
TagKey | String | testkey1 | The tag key. |
TagValue | String | testvalue1 | The tag value that corresponds to the tag key. |
Examples
Sample requests
http(s)://dts.aliyuncs.com/?Action=ListTagResources
&RegionId=cn-hangzhou
&ResourceType=ALIYUN::DTS::INSTANCE
&ResourceId.1=dtsntk10k6r12v****
&Tag.1.Key=testkey1
&Tag.1.Value=testvalue1
&<Common request parameters>
Sample success responses
XML
format
<ListTagResourcesResponse>
<RequestId>609AD332-F2B1-48B7-BF43-41FEE641****</RequestId>
<TagResources>
<ResourceId>dtsntk10k6r12v****</ResourceId>
<TagKey>testkey1</TagKey>
<ResourceType>ALIYUN::DTS::INSTANCE</ResourceType>
<TagValue>testvalue1</TagValue>
</TagResources>
<Success>true</Success>
</ListTagResourcesResponse>
JSON
format
{
"RequestId": "609AD332-F2B1-48B7-BF43-41FEE641****",
"TagResources": [
{
"ResourceId": "dtsntk10k6r12v****",
"TagKey": "testkey1",
"ResourceType": "ALIYUN::DTS::INSTANCE",
"TagValue": "testvalue1"
}
],
"Success": true
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
419 | QuotaExceed.TagsPerResource | The maximum number of tags for each resource is exceeded. | The error message returned because the maximum number of tags for each resource has been reached. |
For a list of error codes, visit the API Error Center.