Updated on 2023-12-13 GMT+08:00

Stopping Data Migration Tasks

Function

This API is used to stop data migration tasks in batches. If a success response is returned, the request is successfully delivered. The migration tasks are stopped only when their status is TERMINATED.

URI

POST /v2/{project_id}/migration-task/batch-stop

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

migration_tasks

Yes

Array of strings

Data migration task list.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

migration_tasks

Array of StopMigrationTaskResult objects

Data migration task list.

Table 4 StopMigrationTaskResult

Parameter

Type

Description

error_msg

String

Error message.

Maximum: 1024

error_code

String

Error code.

Maximum: 9

error_ext_msg

String

Extended error information. This parameter is not used currently and is set to null.

Maximum: 1024

result

String

Result of delivering the request for stopping migration tasks.

Enumeration values:

  • success

  • failed

task_id

String

ID of the data migration task.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

Maximum: 1024

error_code

String

Error code.

Maximum: 9

error_ext_msg

String

Extended error information. This parameter is not used currently and is set to null.

Maximum: 1024

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

Maximum: 1024

error_code

String

Error code.

Maximum: 9

error_ext_msg

String

Extended error information. This parameter is not used currently and is set to null.

Maximum: 1024

Status code: 403

Table 7 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

Maximum: 1024

error_code

String

Error code.

Maximum: 9

error_ext_msg

String

Extended error information. This parameter is not used currently and is set to null.

Maximum: 1024

Status code: 404

Table 8 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

Maximum: 1024

error_code

String

Error code.

Maximum: 9

error_ext_msg

String

Extended error information. This parameter is not used currently and is set to null.

Maximum: 1024

Status code: 500

Table 9 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

Maximum: 1024

error_code

String

Error code.

Maximum: 9

error_ext_msg

String

Extended error information. This parameter is not used currently and is set to null.

Maximum: 1024

Example Requests

Stopping data migration tasks in batches

POST https://{dcs_endpoint}/v2/{project_id}/migration-task/batch-stop

{
  "migration_tasks" : [ "b21989ec-2889-4b8e-99db-19c073425ec2", "5130d57f-640a-435b-bc3a-0fb1860a5340" ]
}

Example Responses

Status code: 200

"Migration tasks are being stopped.

The migration tasks are stopped when their status is TERMINATED.

{
  "migration_tasks" : [ {
    "result" : "success",
    "task_id" : "b21989ec-2889-4b8e-99db-19c073425ec2"
  }, {
    "result" : "failed",
    "task_id" : "5130d57f-640a-435b-bc3a-0fb1860a5340"
  } ]
}

Status code: 400

Invalid request.

{
  "error_msg" : "invalid migration task id in the request.",
  "error_code" : "DCS.4855"
}

Status Codes

Status Code

Description

200

"Migration tasks are being stopped.

NOTE:

The migration tasks are stopped when their status is TERMINATED.

400

Invalid request.

401

Invalid authentication information.

403

The request is rejected.

404

The requested resource is not found.

500

Internal service error.

Error Codes

See Error Codes.