CancelTask - AWS Snowball


Sends a cancel request for a specified task. You can cancel a task only if it's still in a QUEUED state. Tasks that are already running can't be cancelled.


A task might still run if it's processed from the queue before the CancelTask operation changes the task's state.

Request Syntax

POST /task/taskId/cancel HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.


The ID of the task that you are attempting to cancel. You can retrieve a task ID by using the ListTasks operation.

Length Constraints: Minimum length of 1. Maximum length of 64.

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "taskId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


The ID of the task that you are attempting to cancel.

Type: String


For information about the errors that are common to all actions, see Common Errors.


You don't have sufficient access to perform this action.

HTTP Status Code: 403


An unexpected error occurred while processing the request.

HTTP Status Code: 500


The request references a resource that doesn't exist.

HTTP Status Code: 404


The request was denied due to request throttling.

HTTP Status Code: 429


The input fails to satisfy the constraints specified by an AWS service.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: