TimestreamQuery / Client / cancel_query

cancel_query#

TimestreamQuery.Client.cancel_query(**kwargs)#

Cancels a query that has been issued. Cancellation is provided only if the query has not completed running before the cancellation request was issued. Because cancellation is an idempotent operation, subsequent cancellation requests will return a CancellationMessage, indicating that the query has already been canceled. See code sample for details.

See also: AWS API Documentation

Request Syntax

response = client.cancel_query(
    QueryId='string'
)
Parameters:

QueryId (string) –

[REQUIRED]

The ID of the query that needs to be cancelled. QueryID is returned as part of the query result.

Return type:

dict

Returns:

Response Syntax

{
    'CancellationMessage': 'string'
}

Response Structure

  • (dict) –

    • CancellationMessage (string) –

      A CancellationMessage is returned when a CancelQuery request for the query specified by QueryId has already been issued.

Exceptions

  • TimestreamQuery.Client.exceptions.AccessDeniedException

  • TimestreamQuery.Client.exceptions.InternalServerException

  • TimestreamQuery.Client.exceptions.ThrottlingException

  • TimestreamQuery.Client.exceptions.ValidationException

  • TimestreamQuery.Client.exceptions.InvalidEndpointException