AWS Fundamentals Logo
AWS Fundamentals
AWS::Logs::ScheduledQuery

Logs ScheduledQuery

Creates a new Scheduled Query that allows you to define a Logs Insights query that will run on a schedule and configure actions to take with the query results.

Properties

14 configurable properties. 5 required. Click a row to see details.

Filter:
PropertyTypeFlags
ExecutionRoleArn
string
Required
Name
string
RequiredCreate-only
QueryLanguage
string
Required
QueryString
string
Required
ScheduleExpression
string
Required
Description
string
DestinationConfiguration
DestinationConfiguration
LogGroupIdentifiers
Array<string>
ScheduleEndTime
number
ScheduleStartTime
number
StartTimeOffset
integer
State
string
Tags
Array<object>
Timezone
string

Return Values

Values returned after the resource is created. Access these with Fn::GetAtt.

AttributeTypeDescription
CreationTimenumber-
LastExecutionStatusstring-
LastTriggeredTimenumber-
LastUpdatedTimenumber-
ScheduledQueryArnstring-

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::Logs::ScheduledQuery

Resources:
  MyResource:
    Type: AWS::Logs::ScheduledQuery
    Properties:
      Name: "my-name"
      QueryLanguage: "value"
      QueryString: "value"
      ScheduleExpression: "value"
      ExecutionRoleArn: "arn:aws:service:region:account:resource"
      Tags:
        - Key: Environment
          Value: Production
      Description: !Ref "AWS::StackName"

Required IAM Permissions

Permissions CloudFormation needs in your IAM role to manage this resource.

create

logs:CreateScheduledQuerylogs:GetScheduledQuerylogs:StartQuerylogs:TagResourceiam:PassRolelogs:ListTagsForResource

read

logs:GetScheduledQuerylogs:ListTagsForResource

update

logs:UpdateScheduledQuerylogs:GetScheduledQuerylogs:ListTagsForResourcelogs:TagResourcelogs:UntagResourceiam:PassRole

delete

logs:DeleteScheduledQuerylogs:GetScheduledQuerylogs:UntagResource

list

logs:ListScheduledQueries

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

ServiceLogs
Properties19
Required5
TaggingSupported
Primary IDScheduledQueryArn

Supported Operations

CreateReadUpdateDeleteList

Immutable After Creation

These properties cannot be changed after the resource is created. Updating them triggers a replacement.

Name

External Links