Adding or Deleting Tags in Batches
Function
- This API is used to add or delete tags of a specific resource in batches.
 - TMS may use this API to manage service resource tags.
 - A resource can have a maximum of 10 tags.
 
Debugging
For details, see Calling APIs.
URI
POST /v3/{project_id}/{resource_type}/{resource_id}/tags/action
| 
         Parameter  | 
       
         Mandatory  | 
       
         Type  | 
       
         Description  | 
      
|---|---|---|---|
| 
         project_id  | 
       
         Yes  | 
       
         String  | 
       
         Specifies the project ID.  | 
      
| 
         resource_id  | 
       
         Yes  | 
       
         String  | 
       
         Specifies the resource ID.  | 
      
| 
         resource_type  | 
       
         Yes  | 
       
         String  | 
       
        
 Enumeration values: 
  | 
      
Request Parameters
| 
         Parameter  | 
       
         Mandatory  | 
       
         Type  | 
       
         Description  | 
      
|---|---|---|---|
| 
         action  | 
       
         Yes  | 
       
         String  | 
       
         Specifies the action type. Value options: create and delete Enumeration values: 
  | 
      
| 
         tags  | 
       
         No  | 
       
         Array of Tag objects  | 
       
         Specifies the tag list.  | 
      
| 
         sys_tags  | 
       
         No  | 
       
         Array of Tag objects  | 
       
         Specifies the tag list.  | 
      
| 
         Parameter  | 
       
         Mandatory  | 
       
         Type  | 
       
         Description  | 
      
|---|---|---|---|
| 
         key  | 
       
         Yes  | 
       
         String  | 
       
         
         Specifies the tag key. The key: 
          
  | 
      
| 
         value  | 
       
         No  | 
       
         String  | 
       
         
         Specifies the tag value. The value: 
          
  | 
      
Response Parameters
None
Example Requests
- Batch adding resource tags 
     
POST https://{endpoint}/v3/cfa563efb77d4b6d9960781d82530fd8/dc-vgw/3320166e-b937-40cc-a35c-02cd3f2b3ee2/tags/action { "action" : "create", "tags" : [ { "key" : "key1", "value" : "value1" }, { "key" : "key2", "value" : "value2" } ] } - Batch deleting resource tags 
     
POST https://{endpoint}/v3/cfa563efb77d4b6d9960781d82530fd8/dc-vgw/3320166e-b937-40cc-a35c-02cd3f2b3ee2/tags/action { "action" : "delete", "tags" : [ { "key" : "key1" }, { "key" : "key2", "value" : "value3" } ] } 
Example Responses
None
Status Code
| 
         Status Code  | 
       
         Description  | 
      
|---|---|
| 
         204  | 
       
         No Content  | 
      
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.