CancelStatement - Amazon Redshift Data API
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

CancelStatement

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

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

Request Syntax

{ "Id": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Note

In the following list, the required parameters are described first.

Id

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.

Type: String

Pattern: ^[a-z0-9]{8}(-[a-z0-9]{4}){3}-[a-z0-9]{12}(:\d+)?$

Required: Yes

Response Syntax

{ "Status": boolean }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Status

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

Type: Boolean

Errors

For information about the errors that are common to all actions, see Common Errors.

DatabaseConnectionException

Connection to a database failed.

HTTP Status Code: 500

InternalServerException

The Amazon Redshift Data API operation failed due to invalid input.

HTTP Status Code: 500

ResourceNotFoundException

The Amazon Redshift Data API operation failed due to a missing resource.

HTTP Status Code: 400

ValidationException

The Amazon Redshift Data API operation failed due to invalid input.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: