TagResources

更新时间:
复制 MD 格式

Call the TagResources operation to add tags to resources.

Debug

You can test this operation in OpenAPI Explorer. This eliminates the need to calculate signatures. After a successful call, OpenAPI Explorer automatically generates software development kit (SDK) example code.

Request parameters

Name

Type

Required

Example

Description

Action

String

Yes

TagResources

A required parameter. Set the value to TagResources.

RegionId

String

Yes

cn-hangzhou

The ID of the region where the instance is located.

ResourceType

String

Yes

PolarDBXInstance

The resource type. The value must be PolarDBXInstance.

ResourceId.N

String

No

pxc-xxxxx

The instance ID.

Tag.N.Key

String

No

12

The tag key.

Tag.N.Value

String

No

22

The tag value.

Response data

Name

Type

Example

Description

RequestId

String

FE5D94E3-3C93-3594-95D9-AAED2A980915

The request ID.

Examples

Sample request

http(s)://[Endpoint]/?Action=TagResources
&RegionId=cn-hangzhou
&ResourceType=PolarDBXInstance
&ResourceId=["pxc-xxxxx"]
&Tag=[{"Key":"12","Value":"22"}]
&Common request parameters

Sample successful response

XML format

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

<TagResourcesResponse>
    <RequestId>FE5D94E3-3C93-3594-95D9-AAED2A980915</RequestId>
</TagResourcesResponse>

JSON format

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

{
  "RequestId" : "FE5D94E3-3C93-3594-95D9-AAED2A980915"
}

Error codes

For a list of error codes, see the Error Center.

For a list of error codes, see the Error Center.