Updated on 2026-07-24 GMT+08:00

Deleting Resource Pool Tags in Batches

Function

This API is used to delete multiple tags from a specified resource. It is used when administrators need to delete redundant tags (such as expired categories and invalid metadata), adjust resource classification policies, or remove tags in batches due to permission changes. Before calling this API, ensure that the target resource exists and can be managed, you have the required permissions to manage resource tags, the tags to be deleted have been associated with the resource, and TMS is running properly. After this API is called, the specified tags will be completely deleted from the resource, and other configuration attributes of the resource will not be affected. If the resource does not exist, you do not have the required permissions, the tags have not been associated with the resource, or the system service is abnormal, an error message (such as "404 Not Found", "403 Forbidden", "400 Bad Request", or "503 Service Unavailable") is returned.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

DELETE /v1/{project_id}/pools/{pool_name}/tags/delete

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition: Project ID. For details, see Obtaining a Project ID and Name.

Constraints: The value can contain 1 to 64 characters. Only letters, digits, and hyphens (-) are allowed.

Range: N/A

Default Value: N/A

pool_name

Yes

String

Definition: Resource pool name. The value is obtained from name in the metadata field of the resource pool details.

Constraints: N/A

Range: N/A

Default Value: N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

tags

Yes

Array of DeleteTagItem objects

Definition: Tags to be deleted.

Constraints: N/A

Table 3 DeleteTagItem

Parameter

Mandatory

Type

Description

key

Yes

String

Definition: Tag key.

Constraints: N/A

Range: N/A

Default Value: N/A

value

No

String

Definition: Tag value.

Constraints: N/A

Range: N/A

Default Value: N/A

Response Parameters

Status code: 204

Table 4 Response body parameters

Parameter

Type

Description

tags

Array of PoolTag objects

Definition: Resource tag list.

Table 5 PoolTag

Parameter

Type

Description

key

String

Definition: Tag of the resource type.

Range: N/A

values

Array of strings

Definition: Tag value of the resource type.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Status code: 404

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Example Requests

https://{endpoint}/v1/{project_id}/pools/a55eba18-1ebf-4e9a-8229-d2d3b593a3dc/tags/delete

{
  "tags" : [ {
    "key" : "dev",
    "value" : "dev1"
  } ]
}

Example Responses

Status code: 204

Deleted.

{
  "tags" : [ {
    "key" : "dev",
    "value" : "dev1"
  } ]
}

Status Codes

Status Code

Description

204

Deleted.

400

Invalid parameter.

401

Authentication failed.

403

Insufficient permissions.

404

Resource not found.

Error Codes

See Error Codes.