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 execution status and destination processing metadata.
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 name or ARN of the scheduled query to retrieve history for.
startTime (integer) –
[REQUIRED]
The start time for the history retrieval window in Unix epoch time.
endTime (integer) –
[REQUIRED]
The end time for the history retrieval window in Unix epoch time.
executionStatuses (list) –
Filter results by execution status (Running, Complete, Failed, Timeout, or InvalidQuery).
(string) –
maxResults (integer) – The maximum number of history records to return in a single call.
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) –
The list of execution history records for the scheduled query.
(dict) –
A record of a scheduled query execution, including its status and destination processing information.
queryId (string) –
The unique identifier for the query execution.
executionStatus (string) –
The status of the query execution (Running, Complete, Failed, Timeout, or InvalidQuery).
triggeredTimestamp (integer) –
The time when the scheduled query was triggered, in Unix epoch time.
errorMessage (string) –
The error message if the scheduled query execution failed. This field is only populated when the execution status indicates a failure.
destinations (list) –
The list of destinations where the scheduled query results were delivered for this execution. This includes S3 buckets configured for the scheduled query.
(dict) –
Information about a destination where scheduled query results are processed and delivered.
destinationType (string) –
The type of destination (S3).
destinationIdentifier (string) –
The destination identifier (S3 URI).
status (string) –
The processing status for this destination (IN_PROGRESS, ERROR, FAILED, or COMPLETE).
processedIdentifier (string) –
The processed identifier returned for the destination (S3 key).
errorMessage (string) –
Error message if the destination processing failed.
nextToken (string) –
The token for the next set of items to return. The token expires after 24 hours.
Exceptions
CloudWatchLogs.Client.exceptions.ValidationExceptionCloudWatchLogs.Client.exceptions.AccessDeniedExceptionCloudWatchLogs.Client.exceptions.ResourceNotFoundExceptionCloudWatchLogs.Client.exceptions.ThrottlingExceptionCloudWatchLogs.Client.exceptions.InternalServerException