Adds tags to AnalyticDB for MySQL 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 TagResources

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

RegionId String Yes cn-hangzhou

The region ID.

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

The resource type. Set the value to ALIYUN::ADB::CLUSTER.

ResourceId.N String Yes am-************

The ID of the cluster to which to add a tag. If you want to add a tag to multiple clusters, click Add and enter the cluster IDs.

Note
  • You can add a tag to up to 50 clusters at a time.
  • You can call the DescribeDBClusters operation to query details about all AnalyticDB for MySQL clusters in a specific region, including cluster IDs.
Tag.N.Key String Yes testkey1

The key of the tag. If you want to add multiple tags to a single cluster, click Add and enter tag keys and values.

Note You can create up to 20 key-value pairs of tags at a time. Each value of Tag.N.Key is paired with a value of Tag.N.Value.
Tag.N.Value String Yes testvalue1

The value of the tag. If you want to add multiple tags to a single cluster, click Add and enter tag keys and values.

Note You can create up to 20 key-value pairs of tags at a time. Each value of Tag.N.Key is paired with a value of Tag.N.Value.

Response parameters

Parameter Type Example Description
RequestId String 863D51B7-5321-41D8-A0B6-A088B0******

The ID of the request.

Examples

Sample requests

http(s)://adb.aliyuncs.com/?Action=TagResources
&RegionId=cn-hangzhou
&ResourceType=ALIYUN::ADB::CLUSTER
&ResourceId=["am-************"]
&Tag=[{"Key":"testkey1","Value":"testvalue1"}]
&<Common request parameters>

Sample success responses

XML format

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

<TagResourcesResponse>
    <RequestId>863D51B7-5321-41D8-A0B6-A088B0******</RequestId>
</TagResourcesResponse>

JSON format

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

{
  "RequestId" : "863D51B7-5321-41D8-A0B6-A088B0******"
}

Error codes

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