Queries all the tags added to a data migration, data synchronization, or change tracking instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeTagKeys

The operation that you want to perform. Set the value to DescribeTagKeys.

PageSize Integer No 20

The number of tags to return on each page if the DTS instance has multiple tags. Default value: 20.

PageNumber Integer No 1

The number of the page to return. Pages start from page 1. Default value: 1. This parameter is used together with PageSize.

ResourceType String No ALIYUN::DTS::INSTANCE

The resource type. Set the value to ALIYUN::DTS::INSTANCE.

ResourceId String No dtsl5o11f9029c****

The ID of the data migration, data synchronization, or change tracking instance. You can call the DescribeDtsJobs operation to query the instance ID.

Category String No Custom

The type of the tag. Valid values:

  • Custom: The tag is added by a user.
  • System: The tag is added by the system.
Note By default, if the parameter is left empty, custom tags and system tags are returned.
RegionId String No cn-hangzhou

The region ID of the DTS instance. For more information, see List of supported regions.

Response parameters

Parameter Type Example Description
Category String Custom

The type of the tag.

RequestId String AD110813-9AD6-5F07-BFC8-4C841309****

The ID of the request.

PageSize Integer 10

The number of tags returned per page.

PageNumber Integer 1

The start page of the returned pages.

TotalCount Integer 10

The total number of returned tag keys.

TagKeys Array of String ["a","x"]

The key of the tag.

Examples

Sample requests

http(s)://dts.aliyuncs.com/?Action=DescribeTagKeys
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeTagKeysResponse>
    <TotalCount>10</TotalCount>
    <Category>Custom</Category>
    <RequestId>AD110813-9AD6-5F07-BFC8-4C841309****</RequestId>
    <PageSize>10</PageSize>
    <PageNumber>1</PageNumber>
    <TagKeys>a</TagKeys>
    <TagKeys>x</TagKeys>
</DescribeTagKeysResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TotalCount" : 10,
  "Category" : "Custom",
  "RequestId" : "AD110813-9AD6-5F07-BFC8-4C841309****",
  "PageSize" : 10,
  "PageNumber" : 1,
  "TagKeys" : [ "a", "x" ]
}

Error codes

HTTP status code Error code Error message Description
400 InvalidParameter.Category The specified Category is invalid. Valid values are Custom and System. The error message returned because the value of the Category parameter is invalid. The value can be Custom or System.
400 InvalidParameter.ResourceType The ResourceType parameter is invalid. The error message returned because the value of the ResourceType parameter is invalid. Set the parameter to ALIYUN::DTS::INSTANCE.
400 Throttling.User Request was denied due to user flow control. The error message returned because the number of requests exceeds the limit and the request is rejected. Try again later.
403 InvalidSecurityToken.Expired Specified SecurityToken is expired. The error message returned because the signature expired. Use a new signature.
500 ServiceUnavailable The request has failed due to a temporary failure of the server. The error message returned because the response of the server timed out or the server was unavailable. Try again. If the error persists, contact technical support.

For a list of error codes, visit the API Error Center.