You can call this operation to cancel a data migration task.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request header

This operation only uses the common request header. For more information, see the Common request parameters topic.

Request syntax

POST /openapi/instances/[InstanceId]/actions/cancel-task HTTP/1.1

Request parameters

Parameter Type Required Example Description
InstanceId String Yes es-cn-xxx

The ID of the instance.

taskType String Yes MigrateData

The type of the task.

clientToken String No 5A2CFF0E-5718-45B5-9D4D-70B3FF****

A unique token generated by the client to guarantee the idempotency of the request. The maximum length of the token is 64 ASCII characters.

Response parameters

Parameter Type Example Description
RequestId String F99407AB-2FA9-489E-A259-40CF6DCC****

The ID of the request.

Result Boolean true

If the task is canceled, value true is returned.


Sample requests

POST /openapi/instances/[InstanceId]/actions/cancel-task HTTP/1.1
Common request header
  "InstanceId": "es-cn-xxx"
  "taskType": "MigrateData"

Sample success responses

XML format


JSON format


Sample response description

The sample responses may contain parameters that are not described in the preceding table. These parameters are only for reference. You must make sure that your application is not strongly reliant on these parameters.

Error codes

For a list of error codes, visit the API Error Center.