cancel_statement

RedshiftDataAPIService.Client.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