All Products
Search
Document Center

Function Compute:TagResource

Last Updated:Aug 21, 2025

You can call this operation to add tags to resources.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK sample codes.

Request headers

This operation uses only common request headers. For more information, see Common parameters.

Request syntax

POST /tag 

Request parameters

Parameter

Type

Position

Required

Example

Description

Object

Body

No

The list of tags.

resourceArn

String

Body

No

acs:fc:cn-shanghai:18807708****6902:services/service_name

The Alibaba Cloud Resource Name (ARN).

Note

You can use the value of this parameter to query information about the resource, such as the account, service, and region of the resource.

Examples

Sample requests

POST /2016-08-15/tag HTTP/1.1
            

Sample success responses

JSON format

HTTP/1.1 200 OK Common response headers