cancel_task

cancel_task(**kwargs)

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.

Note

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

See also: AWS API Documentation

Request Syntax

response = client.cancel_task(
    taskId='string'
)
Parameters
taskId (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{
    'taskId': 'string'
}

Response Structure

  • (dict) --
    • taskId (string) --

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

Exceptions

  • SnowDeviceManagement.Client.exceptions.ThrottlingException
  • SnowDeviceManagement.Client.exceptions.InternalServerException
  • SnowDeviceManagement.Client.exceptions.ResourceNotFoundException
  • SnowDeviceManagement.Client.exceptions.ValidationException
  • SnowDeviceManagement.Client.exceptions.AccessDeniedException