Skip to content

Latest commit

 

History

History
70 lines (53 loc) · 3.55 KB

sam-property-function-schedule.md

File metadata and controls

70 lines (53 loc) · 3.55 KB

Schedule

This object describes an event source with type Schedule

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

Syntax

To declare this entity in your AWS SAM template, use the following syntax:

YAML

  [Description](#sam-function-schedule-description): String
  [Enabled](#sam-function-schedule-enabled): Boolean
  [Input](#sam-function-schedule-input): String
  [Name](#sam-function-schedule-name): String
  [Schedule](#sam-function-schedule-schedule): String

Properties

Description The description of the rule.
Type: String
Required: No
AWS CloudFormation Compatibility: This property is passed directly to the [Description](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-description) property of an AWS::Events::Rule.

Enabled Indicates whether the rule is enabled.
If the property is set to False, the rule is disabled
Type: Boolean
Required: No
AWS CloudFormation Compatibility: This property is passed directly to the [State](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-state) property of an AWS::Events::Rule.

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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-input) property of an AWS::Events::Rule Target.

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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-name) property of an AWS::Events::Rule.

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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-scheduleexpression) property of an AWS::Events::Rule.

Examples

CloudWatch Schedule Event

CloudWatch Schedule Event Example

YAML

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