CloudWatchLogs / Client / get_scheduled_query_history
get_scheduled_query_history¶
- CloudWatchLogs.Client.get_scheduled_query_history(**kwargs)¶
Retrieves the execution history of a scheduled query within a specified time range, including query results and destination processing status.
See also: AWS API Documentation
Request Syntax
response = client.get_scheduled_query_history( identifier='string', startTime=123, endTime=123, executionStatuses=[ 'Running'|'InvalidQuery'|'Complete'|'Failed'|'Timeout', ], maxResults=123, nextToken='string' )
- Parameters:
identifier (string) –
[REQUIRED]
The ARN or name of the scheduled query to retrieve history for.
startTime (integer) –
[REQUIRED]
The start time for the history query in Unix epoch format.
endTime (integer) –
[REQUIRED]
The end time for the history query in Unix epoch format.
executionStatuses (list) –
An array of execution statuses to filter the history results. Only executions with the specified statuses are returned.
(string) –
maxResults (integer) – The maximum number of history records to return. Valid range is 1 to 1000.
nextToken (string) – The token for the next set of items to return. The token expires after 24 hours.
- Return type:
dict
- Returns:
Response Syntax
{ 'name': 'string', 'scheduledQueryArn': 'string', 'triggerHistory': [ { 'queryId': 'string', 'executionStatus': 'Running'|'InvalidQuery'|'Complete'|'Failed'|'Timeout', 'triggeredTimestamp': 123, 'errorMessage': 'string', 'destinations': [ { 'destinationType': 'S3', 'destinationIdentifier': 'string', 'status': 'IN_PROGRESS'|'CLIENT_ERROR'|'FAILED'|'COMPLETE', 'processedIdentifier': 'string', 'errorMessage': 'string' }, ] }, ], 'nextToken': 'string' }
Response Structure
(dict) –
name (string) –
The name of the scheduled query.
scheduledQueryArn (string) –
The ARN of the scheduled query.
triggerHistory (list) –
An array of execution history records for the scheduled query.
(dict) –
A record of a scheduled query execution, including execution status, timestamp, and destination processing results.
queryId (string) –
The unique identifier for this query execution.
executionStatus (string) –
The execution status of the scheduled query run.
triggeredTimestamp (integer) –
The timestamp when the scheduled query execution was triggered.
errorMessage (string) –
Error message if the query execution failed.
destinations (list) –
Information about destination processing for this query execution.
(dict) –
Information about a destination where scheduled query results are processed, including processing status and any error messages.
destinationType (string) –
The type of destination for query results.
destinationIdentifier (string) –
The identifier for the destination where results are delivered.
status (string) –
The processing status of the destination delivery.
processedIdentifier (string) –
The identifier of the processed result at the destination.
errorMessage (string) –
Error message if destination processing failed.
nextToken (string) –
The token for the next set of items to return. The token expires after 24 hours.
Exceptions