Help Center/ ModelArts/ API Reference/ Training Management/ Deleting Tags of a Training Job
Updated on 2026-07-24 GMT+08:00

Deleting Tags of a Training Job

Function

This API is used to remove a tag from an existing training job.

This API is used when you need to delete the tags of a training job for further management. Before using this API, ensure that the training job exists and you have the required permission. After the tag is deleted, the tag is removed from the training job. You can view the updated tag information in the training job list. If the training job does not exist, the specified tag does not exist, or you do not have the required permission, the API will return an error message.

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, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    modelarts:trainJob:update

    Write

    trainJob *

    g:ResourceTag/<tag-key>

    -

    -

    -

    • modelarts:poolType

    • modelarts:poolId

URI

DELETE /v2/{project_id}/modelarts-training-job/{training_job_id}/tags/delete

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

Constraints: N/A

Range: N/A

Default Value: N/A

training_job_id

Yes

String

Definition: Training job ID. For details, see Obtaining Training Jobs.

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 TmsTagForDelete objects

Definition: List of tags to be deleted.

Constraints: N/A

Table 3 TmsTagForDelete

Parameter

Mandatory

Type

Description

key

Yes

String

Definition: Key of a TMS tag.

Constraints: N/A

Range: The value allows up to 128 characters, including letters, digits, spaces, and special characters (_.:=+-@). The value cannot start or end with a space or start with sys.

Default Value: N/A

value

No

String

Definition: Value of a TMS tag. This parameter is optional.

Constraints: N/A

Range: The value allows up to 255 characters, including letters, digits, spaces, and special characters (_.:/=+-@).

Default Value: N/A

Response Parameters

Status code: 204

Deleted.

None

Example Requests

DELETE   https://{endpoint}/v2/{project_id}/modelarts-training-job/{training_job_id}/tags/delete

{
  "tags" : [ {
    "key" : "111",
    "value" : "v2"
  }, {
    "key" : "k3",
    "value" : "v2"
  } ]
}

Example Responses

None

Status Codes

Status Code

Description

204

Deleted.

Error Codes

See Error Codes.