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'
)
[REQUIRED]
The ID of the task that you are attempting to cancel. You can retrieve a task ID by using the ListTasks operation.
{
'taskId': 'string'
}
Response Structure
The ID of the task that you are attempting to cancel.
Exceptions
SnowDeviceManagement.Client.exceptions.ThrottlingExceptionSnowDeviceManagement.Client.exceptions.InternalServerExceptionSnowDeviceManagement.Client.exceptions.ResourceNotFoundExceptionSnowDeviceManagement.Client.exceptions.ValidationExceptionSnowDeviceManagement.Client.exceptions.AccessDeniedException