Queries the tags that are added to ApsaraDB for ClickHouse clusters.

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 ListTagResources

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

RegionId String Yes cn-hangzhou

The region ID of the cluster.

Note You can call the DescribeRegions operation to query the most recent region list.
ResourceType String Yes CLUSTER

The type of the resource. Set the value to CLUSTER.

NextToken String No 212db86sca4384811e0b5e8707ec21345

The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of the NextToken parameter.

ResourceId.N String No cc-bp1t9lbb7a4z7****

The cluster ID. You can specify N cluster IDs at a time. N is an integer. Valid values of N: 1 to 50.

Note
  • You can call the DescribeDBClusters operation to query information about all the clusters that are deployed in a specific region. The returned information includes the ID of each cluster.
  • If you specify the Tag.N.Key parameter, this parameter can be empty.
Tag.N.Key String No testkey1

The key of the tag that you want to query. You can specify N tag keys at a time. N is an integer. Valid values of N: 1 to 20.

Note If you specify the ResourceId.N parameter, this parameter can be empty.
Tag.N.Value String No testvalue1

The tag value that is associated with the tag key. You can specify N tag values at a time. N is an integer. Valid values of N: 1 to 20.

Note This parameter can be empty.

Response parameters

Parameter Type Example Description
RequestId String 184DE106-CB2C-4DD2-B57F-396652E6C8F8

The request ID.

NextToken String 212db86sca4384811e0b5e8707ec21345

The returned value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results.

TagResources Array of TagResource

The details of the clusters and tags that were queried.

TagValue String testvalue1

The tag value that is associated with the tag key.

TagKey String testkey1

The returned tag key.

ResourceType String CLUSTER

The type of the resource. The value is CLUSTER.

ResourceId String cc-bp1t9lbb7a4z7****

The cluster ID.

Examples

Sample requests

http(s)://clickhouse.aliyuncs.com/?Action=ListTagResources
&RegionId=cn-hangzhou
&ResourceType=CLUSTER
&NextToken=212db86sca4384811e0b5e8707ec21345
&ResourceId=["cc-bp1t9lbb7a4z7****"]
&Tag=[{"Key":"testkey1","Value":"testvalue1"}]
&Common request parameters

Sample success responses

XML format

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

<ListTagResourcesResponse>
    <RequestId>184DE106-CB2C-4DD2-B57F-396652E6C8F8</RequestId>
    <NextToken>212db86sca4384811e0b5e8707ec21345</NextToken>
    <TagResources>
        <TagValue>testvalue1</TagValue>
        <TagKey>testkey1</TagKey>
        <ResourceType>CLUSTER</ResourceType>
        <ResourceId>cc-bp1t9lbb7a4z7****</ResourceId>
    </TagResources>
</ListTagResourcesResponse>

JSON format

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

{
  "RequestId" : "184DE106-CB2C-4DD2-B57F-396652E6C8F8",
  "NextToken" : "212db86sca4384811e0b5e8707ec21345",
  "TagResources" : [ {
    "TagValue" : "testvalue1",
    "TagKey" : "testkey1",
    "ResourceType" : "CLUSTER",
    "ResourceId" : "cc-bp1t9lbb7a4z7****"
  } ]
}

Error codes

For a list of error codes, see Service error codes.