v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1444270263.9 KB

Cancels a query if the query is not in a terminated state, such as <code>CANCELLED</code>, <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>FINISHED</code>. You must specify an ARN value for <code>EventDataStore</code>. The ID of the query that you want to cancel is also required. When you run <code>CancelQuery</code>, the query status might show as <code>CANCELLED</code> even if the operation is not yet finished.

post/#X-Amz-Target=com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101.CancelQuery

Headers

X-Amz-Target'com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101.CancelQuery' required

Request body

EventDataStorestring

The ARN (or the ID suffix of the ARN) of an event data store on which the specified query is running.EventDataStore is no longer required by CancelQueryRequest

QueryIdstring required

The ID of the query that you want to cancel. The <code>QueryId</code> comes from the response of a <code>StartQuery</code> operation.

Response

Success

QueryIdstring required

The ID of the canceled query.

QueryStatus'QUEUED' | 'RUNNING' | 'FINISHED' | 'FAILED' | 'CANCELLED' | 'TIMED_OUT' required

Shows the status of a query after a <code>CancelQuery</code> request. Typically, the values shown are either <code>RUNNING</code> or <code>CANCELLED</code>.