Modifying Resource Tags of a Resource Pool
Function
This API is used to modify resource tags of a specified resource pool.
URI
POST /v1/{project_id}/pools/{pool_name}/tags
Parameter | Mandatory | Type | Description |
|---|---|---|---|
project_id | Yes | String | Project ID. For details, see Obtaining a Project ID and Name. |
pool_name | Yes | String | Resource pool ID. The value is the metadata.name field in the resource pool details. |
Request Parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
action | Yes | String | Action performed on resource tags. The options are as follows:
|
tags | Yes | Array of Tag objects | Resource tag list. The value can be empty only when the value of action is reset. |
Response Parameters
Status code: 200
Parameter | Type | Description |
|---|---|---|
tags | Tag object | Resource tag list |
Status code: 400
Parameter | Type | Description |
|---|---|---|
error_code | String | Error codes of ModelArts |
error_msg | String | Error message |
Status code: 401
Parameter | Type | Description |
|---|---|---|
error_code | String | Error codes of ModelArts |
error_msg | String | Error message |
Status code: 403
Parameter | Type | Description |
|---|---|---|
error_code | String | Error codes of ModelArts |
error_msg | String | Error message |
Status code: 404
Parameter | Type | Description |
|---|---|---|
error_code | String | Error codes of ModelArts |
error_msg | String | Error message |
Example Requests
Delete resource tags from a specified resource pool.
https://{endpoint}/v1/{project_id}/pools/a55eba18-1ebf-4e9a-8229-d2d3b593a3dc/tags { "action" : "delete", "tags" : [ { "key" : "key1", "value" : "value1" } ] }Add resource tags to a specified resource pool.
https://{endpoint}/v1/{project_id}/pools/a55eba18-1ebf-4e9a-8229-d2d3b593a3dc/tags { "action" : "create", "tags" : [ { "key" : "key1", "value" : "value1" } ] }
Example Responses
Status code: 200
Tags added.
{
"tags" : [ {
"key" : "test",
"value" : "service-gpu"
}, {
"key" : "key1",
"value" : "value1"
} ]
} Status Codes
Status Code | Description |
|---|---|
200 | Tags added. |
400 | Invalid parameter. |
401 | Authentication failed. |
403 | Insufficient permission. |
404 | Resource not found. |
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.

