EventSource
The object describing the source of events which trigger the state machine. Each event consists of a type and a set of properties that depend on that type. For more information about the properties of each event source, see the subtopic corresponding to that type.
Syntax
To declare this entity in your Amazon Serverless Application Model (Amazon SAM) template, use the following syntax.
YAML
Properties:
Schedule | ScheduleV2 | CloudWatchEvent | EventBridgeRule | Api
Type:String
Properties
-
Properties
-
An object describing the properties of this event mapping. The set of properties must conform to the defined
Type
.Type: Schedule | ScheduleV2 | CloudWatchEvent | EventBridgeRule | Api
Required: Yes
Amazon CloudFormation compatibility: This property is unique to Amazon SAM and doesn't have an Amazon CloudFormation equivalent.
-
Type
-
The event type.
Valid values:
Api
,Schedule
,ScheduleV2
,CloudWatchEvent
,EventBridgeRule
Type: String
Required: Yes
Amazon CloudFormation compatibility: This property is unique to Amazon SAM and doesn't have an Amazon CloudFormation equivalent.
Examples
API
The following is an example of an event of the API
type.
YAML
ApiEvent: Type: Api Properties: Method: get Path: /group/{user} RestApiId: Ref: MyApi