CloudTrail.Client.cancel_query(**kwargs)¶Cancels a query if the query is not in a terminated state, such as CANCELLED , FAILED , TIMED_OUT , or FINISHED . You must specify an ARN value for EventDataStore . The ID of the query that you want to cancel is also required. When you run CancelQuery , the query status might show as CANCELLED even if the operation is not yet finished.
See also: AWS API Documentation
Request Syntax
response = client.cancel_query(
EventDataStore='string',
QueryId='string'
)
[REQUIRED]
The ID of the query that you want to cancel. The QueryId comes from the response of a StartQuery operation.
dict
Response Syntax
{
'QueryId': 'string',
'QueryStatus': 'QUEUED'|'RUNNING'|'FINISHED'|'FAILED'|'CANCELLED'|'TIMED_OUT'
}
Response Structure
(dict) --
QueryId (string) --
The ID of the canceled query.
QueryStatus (string) --
Shows the status of a query after a CancelQuery request. Typically, the values shown are either RUNNING or CANCELLED .
Exceptions
CloudTrail.Client.exceptions.EventDataStoreARNInvalidExceptionCloudTrail.Client.exceptions.EventDataStoreNotFoundExceptionCloudTrail.Client.exceptions.InactiveEventDataStoreExceptionCloudTrail.Client.exceptions.InactiveQueryExceptionCloudTrail.Client.exceptions.InvalidParameterExceptionCloudTrail.Client.exceptions.QueryIdNotFoundExceptionCloudTrail.Client.exceptions.OperationNotPermittedExceptionCloudTrail.Client.exceptions.UnsupportedOperationExceptionCloudTrail.Client.exceptions.NoManagementAccountSLRExistsExceptionCloudTrail.Client.exceptions.ConflictException