Add tags to instances.

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 ID of the region.

ResourceId.N RepeatList Yes bds-bp15e022622fk0w1

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

Tag.N.Key String No key1

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

Tag.N.Value String No value1

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-hangzhou
&ResourceId.1=bds-bp15e022622fk0w1&ResourceId.2=bds-bp15e022622fk0w1&Tag.1.Key=key1&Tag.1.Value=value1
&Tag=[{"Tag.N.Key":"key1","Tag.N.Value":"value1"}]
&<Common request parameters>

Sample success responses

XML format

<RequestId>9CBF8DF0-4931-4A54-9B60-4C6E1AB59286</RequestId>

JSON format

{
  "RequestId": "9CBF8DF0-4931-4A54-9B60-4C6E1AB59286"
}

Error codes

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