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 asCANCELLED
even 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
QueryId
comes from the response of aStartQuery
operation.
- 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
CancelQuery
request. Typically, the values shown are eitherRUNNING
orCANCELLED
.
Exceptions
CloudTrail.Client.exceptions.EventDataStoreARNInvalidException
CloudTrail.Client.exceptions.EventDataStoreNotFoundException
CloudTrail.Client.exceptions.InactiveEventDataStoreException
CloudTrail.Client.exceptions.InactiveQueryException
CloudTrail.Client.exceptions.InvalidParameterException
CloudTrail.Client.exceptions.QueryIdNotFoundException
CloudTrail.Client.exceptions.OperationNotPermittedException
CloudTrail.Client.exceptions.UnsupportedOperationException
CloudTrail.Client.exceptions.NoManagementAccountSLRExistsException
CloudTrail.Client.exceptions.ConflictException