You can call this operation to tag a resource.

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 No TagResources

Required parameter. Value: TagResources.

RegionId String Required cn-hangzhou

The region ID of the instance.

ResourceId.N RepeatList Yes drds********

The ID of the resource.

ResourceType String Required INSTANCE

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

Tag.N.Key String No color

The key of the tag.

Note

N indicates the key of the specified tag. For example,

  • Tag.1.Key represents the key of the first tag passed in.
  • Tag.2.Key indicates the key of the second tag.
Tag.N.Value String No red

The value of the tag.

Note

N specifies the serial number of the tag. For example,

  • Tag.1.Key represents the key of the first tag passed in.
  • Tag.2.Key indicates the key of the second tag.

Response parameters

Parameter Type Example Description
RequestId String DSSDF-SEWE-*****

The ID of the request.

Success Boolean true

Indicates whether the database creation failure records were removed from the DRDS instance.

Examples

Sample requests

http(s)://drds.aliyuncs.com/? Action=TagResources
&RegionId=cn-hangzhou
&ResourceId.1=drds********
&ResourceType=INSTANCE
&<Common request parameters>

Sample success responses

XML format

<RequestId>DSSDF-SEWE-*****</RequestId>
<Success>true</Success>

JSON format

{
    "RequestId": "DSSDF-SEWE-*****",
    "Success": true
}

Error codes

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