Queries all the tag values of a tag bound 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 DescribeTagValues

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

PageSize Integer No 20

The number of tag values to return each time for a tag key that has multiple values. Default value: 20.

PageNumber Integer No 1

The page number of the start page to return for a tag key that has multiple values. The valid value ranges from 1 to the maximum value of the INTEGER data type. This parameter is often used with the PageSize parameter. Default value: 1.

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.

Note If this parameter is left empty, the values of all tag keys of the current user are returned.
Category String No Custom

The type of the tag key. Valid values:

  • Custom: The tag key is created by users.
  • System: The tag key is created by the system.
Note By default, if the parameter is left empty, both custom tag keys and system tag keys are returned.
Key String No owner

The tag key.

Note This parameter is required.
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 key.

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

The ID of the request.

PageSize Integer 20

The number of tag values returned on each page.

PageNumber Integer 1

The start page of the returned pages.

TotalCount Integer 13

The total number of tag values that are associated with the tag key.

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

The tag values that are associated with the tag key.

Examples

Sample requests

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

Sample success responses

XML format

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

<DescribeTagValuesResponse>
    <pageNumber>1</pageNumber>
    <tagValues>a</tagValues>
    <tagValues>b</tagValues>
    <totalRecordCount>13</totalRecordCount>
    <pageRecordCount>10</pageRecordCount>
    <requestId>AD110813-9AD6-5F07-BFC8-4C841309****</requestId>
    <success>true</success>
    <httpStatusCode>200</httpStatusCode>
</DescribeTagValuesResponse>

JSON format

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

{
  "pageNumber" : 1,
  "tagValues" : [ "a", "b" ],
  "totalRecordCount" : 13,
  "pageRecordCount" : 10,
  "requestId" : "AD110813-9AD6-5F07-BFC8-4C841309****",
  "success" : true,
  "httpStatusCode" : 200
}

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 reaches the threshold, 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, see Service error codes.