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_statement

cancel_statement(**kwargs)

Cancels a running query. To be canceled, a query must be running.

For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide .

See also: AWS API Documentation

Request Syntax

response = client.cancel_statement(
    Id='string'
)
Parameters
Id (string) --

[REQUIRED]

The identifier of the SQL statement to cancel. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. This identifier is returned by BatchExecuteStatment , ExecuteStatment , and ListStatements .

Return type
dict
Returns
Response Syntax
{
    'Status': True|False
}

Response Structure

  • (dict) --
    • Status (boolean) --

      A value that indicates whether the cancel statement succeeded (true).

Exceptions

  • RedshiftDataAPIService.Client.exceptions.ValidationException
  • RedshiftDataAPIService.Client.exceptions.ResourceNotFoundException
  • RedshiftDataAPIService.Client.exceptions.InternalServerException
  • RedshiftDataAPIService.Client.exceptions.DatabaseConnectionException