Updated on 2024-12-30 GMT+08:00

Deleting a Migration Task

Function

This API is used to delete a migration task. In-progress tasks cannot be deleted. If you try to delete an in-progress task, the system will return a message indicating the deletion fails. To delete such a task, pause the task first.

Calling Method

For details, see Calling APIs.

URI

DELETE /v2/{project_id}/tasks/{task_id}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

The project ID.

Minimum length: 1 character

Maximum length: 1,024 characters

task_id

Yes

String

The migration task ID.

Minimum length: 1 character

Maximum length: 1,024 characters

Request

Table 2 Request header parameter

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

The token used for IAM authentication.

Minimum length: 1 character

Maximum length: 16,384 characters

Response

Status code: 400

Table 3 Response body parameters

Parameter

Type

Description

error_msg

String

The error message.

error_code

String

The error code.

Status code: 403

Table 4 Response body parameters

Parameter

Type

Description

error_msg

String

The error message.

error_code

String

The error code.

Example Request

This example deletes the task 191297407830872 in the project 2c0689c860ad4728a497c91ec0844383.

DELETE https://{endpoint}/v2/2c0689c860ad4728a497c91ec0844383/tasks/191297407830872

Example Response

None

Status Codes

Status Code

Description

200

OK

400

Bad Request

403

Forbidden

Error Codes

For details, see Error Codes.