Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

cancel_query

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