Schedule - AWS Serverless Application Model

Schedule

The object describing a Schedule event source type.

AWS SAM generates an AWS::Events::Rule resource when this event type is set.

Syntax

To declare this entity in your AWS Serverless Application Model (AWS SAM) template, use the following syntax.

YAML

Description: String Enabled: Boolean Input: String Name: String Schedule: String

Properties

Description

A description of the rule.

Type: String

Required: No

AWS CloudFormation compatibility: This property is passed directly to the Description property of an AWS::Events::Rule resource.

Enabled

Indicates whether the rule is enabled.

To disable the rule, set this property to False.

Type: Boolean

Required: No

AWS CloudFormation compatibility: This property is similar to the State property of an AWS::Events::Rule resource. If this property is set to True then AWS SAM passes ENABLED, otherwise it passes DISABLED.

Input

Valid JSON text passed to the target. If you use this property, nothing from the event text itself is passed to the target.

Type: String

Required: No

AWS CloudFormation compatibility: This property is passed directly to the Target property of an AWS::Events::Rule Target resource.

Name

The name of the rule. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the rule name.

Type: String

Required: No

AWS CloudFormation compatibility: This property is passed directly to the Name property of an AWS::Events::Rule resource.

Schedule

The scheduling expression that determines when and how often the rule runs. For more information, see Schedule Expressions for Rules.

Type: String

Required: Yes

AWS CloudFormation compatibility: This property is passed directly to the ScheduleExpression property of an AWS::Events::Rule resource.

Examples

CloudWatch Schedule Event

CloudWatch Schedule Event Example

YAML

CWSchedule: Type: Schedule Properties: Schedule: 'rate(1 minute)' Name: TestSchedule Description: test schedule Enabled: False