You can call this operation to add a tag to an 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 TagResources

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

RegionId String Yes cn-shenzhen

The ID of the region.

ResourceId.N RepeatList Yes cds-wz92o754****7779

The ID of resource N. Set the value to the cluster ID. You can specify multiple resource IDs. You can specify the parameter name in the format such as ResourceId.2 and ResourceId.3. This operation can add tags to all specified resources. N is a positive integer.

Tag.N.Key String No k1

The key of tag N. N is a positive integer.

Tag.N.Value String No v1

The value of tag N.

Response parameters

Parameter Type Example Description
RequestId String 2656FA19-6059-40C8-A157-3FFBEAEC2369

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/? Action=TagResources
&RegionId=cn-shenzhen
&ResourceId.1=cds-wz92o754****7779
&<Common request parameters>

Sample success responses

XML format

<TagResourcesResponse>
  <RequestId>2656FA19-6059-40C8-A157-3FFBEAEC2369</RequestId>
</TagResourcesResponse>

JSON format

{"RequestId":"2656FA19-6059-40C8-A157-3FFBEAEC2369"}

Error codes

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