This is the new Amazon CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the Amazon CloudFormation User Guide.
AWS::Logs::ScheduledQuery
Creates a scheduled query that runs CloudWatch Logs Insights queries at regular intervals. Scheduled queries enable proactive monitoring by automatically executing queries to detect patterns and anomalies in your log data. Query results can be delivered to Amazon S3 for analysis or further processing.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::Logs::ScheduledQuery", "Properties" : { "Description" :String, "DestinationConfiguration" :DestinationConfiguration, "ExecutionRoleArn" :String, "LogGroupIdentifiers" :[ String, ... ], "Name" :String, "QueryLanguage" :String, "QueryString" :String, "ScheduleEndTime" :Number, "ScheduleExpression" :String, "ScheduleStartTime" :Number, "StartTimeOffset" :Integer, "State" :String, "Tags" :[ TagsItems, ... ], "Timezone" :String} }
YAML
Type: AWS::Logs::ScheduledQuery Properties: Description:StringDestinationConfiguration:DestinationConfigurationExecutionRoleArn:StringLogGroupIdentifiers:- StringName:StringQueryLanguage:StringQueryString:StringScheduleEndTime:NumberScheduleExpression:StringScheduleStartTime:NumberStartTimeOffset:IntegerState:StringTags:- TagsItemsTimezone:String
Properties
DescriptionProperty description not available.
Required: No
Type: String
Maximum:
1024Update requires: No interruption
DestinationConfiguration-
Configuration for where query results are delivered.
Required: No
Type: DestinationConfiguration
Update requires: No interruption
ExecutionRoleArnProperty description not available.
Required: Yes
Type: String
Update requires: No interruption
LogGroupIdentifiersProperty description not available.
Required: No
Type: Array of String
Minimum:
1Maximum:
50Update requires: No interruption
Name-
The name of the scheduled query.
Required: Yes
Type: String
Pattern:
^[a-zA-Z0-9_\-/.#]+$Minimum:
1Maximum:
255Update requires: Replacement
QueryLanguageProperty description not available.
Required: Yes
Type: String
Update requires: No interruption
QueryStringProperty description not available.
Required: Yes
Type: String
Minimum:
0Maximum:
10000Update requires: No interruption
ScheduleEndTimeProperty description not available.
Required: No
Type: Number
Update requires: No interruption
ScheduleExpression-
The cron expression that defines when the scheduled query runs.
Required: Yes
Type: String
Maximum:
256Update requires: No interruption
ScheduleStartTimeProperty description not available.
Required: No
Type: Number
Update requires: No interruption
StartTimeOffsetProperty description not available.
Required: No
Type: Integer
Update requires: No interruption
State-
The current state of the scheduled query.
Required: No
Type: String
Allowed values:
ENABLED | DISABLEDUpdate requires: No interruption
Property description not available.
Required: No
Type: Array of TagsItems
Update requires: No interruption
Timezone-
The timezone used for evaluating the schedule expression.
Required: No
Type: String
Minimum:
1Update requires: No interruption
Return values
Ref
Fn::GetAtt
CreationTime-
The timestamp when the scheduled query was created.
LastExecutionStatus-
The status of the most recent execution.
LastTriggeredTime-
The timestamp when the scheduled query was last executed.
LastUpdatedTime-
The timestamp when the scheduled query was last updated.
ScheduledQueryArn-
The ARN of the scheduled query.