CloudWatchLogs / Client / list_scheduled_queries
list_scheduled_queries¶
- CloudWatchLogs.Client.list_scheduled_queries(**kwargs)¶
Lists all scheduled queries in your account and region. You can filter results by state to show only enabled or disabled queries.
See also: AWS API Documentation
Request Syntax
response = client.list_scheduled_queries( maxResults=123, nextToken='string', state='ENABLED'|'DISABLED' )
- Parameters:
maxResults (integer) – The maximum number of scheduled queries 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.
state (string) – Filter scheduled queries by state. Valid values are
ENABLEDandDISABLED. If not specified, all scheduled queries are returned.
- Return type:
dict
- Returns:
Response Syntax
{ 'nextToken': 'string', 'scheduledQueries': [ { 'scheduledQueryArn': 'string', 'name': 'string', 'state': 'ENABLED'|'DISABLED', 'lastTriggeredTime': 123, 'lastExecutionStatus': 'Running'|'InvalidQuery'|'Complete'|'Failed'|'Timeout', 'scheduleExpression': 'string', 'timezone': 'string', 'destinationConfiguration': { 's3Configuration': { 'destinationIdentifier': 'string', 'roleArn': 'string' } }, 'creationTime': 123, 'lastUpdatedTime': 123 }, ] }
Response Structure
(dict) –
nextToken (string) –
The token for the next set of items to return. The token expires after 24 hours.
scheduledQueries (list) –
An array of scheduled query summary information.
(dict) –
Summary information about a scheduled query, including basic configuration and execution status.
scheduledQueryArn (string) –
The ARN of the scheduled query.
name (string) –
The name of the scheduled query.
state (string) –
The current state of the scheduled query.
lastTriggeredTime (integer) –
The timestamp when the scheduled query was last executed.
lastExecutionStatus (string) –
The status of the most recent execution.
scheduleExpression (string) –
The cron expression that defines when the scheduled query runs.
timezone (string) –
The timezone used for evaluating the schedule expression.
destinationConfiguration (dict) –
Configuration for where query results are delivered.
s3Configuration (dict) –
Configuration for delivering query results to Amazon S3.
destinationIdentifier (string) –
The Amazon S3 URI where query results are delivered. Must be a valid S3 URI format.
roleArn (string) –
The ARN of the IAM role that grants permissions to write query results to the specified Amazon S3 destination.
creationTime (integer) –
The timestamp when the scheduled query was created.
lastUpdatedTime (integer) –
The timestamp when the scheduled query was last updated.
Exceptions