CloudTrail / Client / cancel_query
cancel_query#
- CloudTrail.Client.cancel_query(**kwargs)#
Cancels a query if the query is not in a terminated state, such as
CANCELLED,FAILED,TIMED_OUT, orFINISHED. You must specify an ARN value forEventDataStore. The ID of the query that you want to cancel is also required. When you runCancelQuery, the query status might show asCANCELLEDeven if the operation is not yet finished.See also: AWS API Documentation
Request Syntax
response = client.cancel_query( EventDataStore='string', QueryId='string' )
- Parameters:
EventDataStore (string) – The ARN (or the ID suffix of the ARN) of an event data store on which the specified query is running.
QueryId (string) –
[REQUIRED]
The ID of the query that you want to cancel. The
QueryIdcomes from the response of aStartQueryoperation.
- Return type:
dict
- Returns:
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
CancelQueryrequest. Typically, the values shown are eitherRUNNINGorCANCELLED.
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