All Products
Search
Document Center

Elastic Compute Service:CancelTask

Last Updated:Mar 13, 2024

Cancels a running task. You can cancel the running tasks generated by the ImportImage or ExportImage operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the task. You can call the DescribeTasks operation to query the list of task IDs.

cn-hangzhou
TaskIdstringYes

The ID of the request.

t-bp198jigq7l0h5ac****

Response parameters

ParameterTypeDescriptionExample
The current API has no return parameters

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParameterAn input parameter "RegionId" that is mandatory for processing the request is not supplied.-
400MissingParameterAn input parameter "TaskId" that is mandatory for processing the request is not supplied.-
400InvalidRegionId.NotFoundThe specified RegionId does not exist.The specified region ID does not exist.
400InvalidTaskId.NotFoundThe specified "TaskId" is not found.-
403InvalidTaskId.TaskActionNotSupportThe specified task action not support.The specified task action is not supported.
403InvalidTaskId.IncorrectTaskStatusThe specified task status is invalid.The task state is invalid.
403CancelTaskFailedThe task is failed to cancel, Please contact the administrator.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history