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.
To declare this entity in your AWS Serverless Application Model (AWS SAM) template, use the following syntax.
[Properties](#sam-statemachine-statemachineeventsource-properties): Schedule | CloudWatchEvent | EventBridgeRule | Api
[Type](#sam-statemachine-statemachineeventsource-type): String
Properties
An object describing the properties of this event mapping. The set of properties must conform to the defined Type
.
Type: Schedule | CloudWatchEvent | EventBridgeRule | Api
Required: Yes
AWS CloudFormation compatibility: This property is unique to AWS SAM and doesn't have an AWS CloudFormation equivalent.
Type
The event type.
Valid values: Api
, Schedule
, CloudWatchEvent
, EventBridgeRule
Type: String
Required: Yes
AWS CloudFormation compatibility: This property is unique to AWS SAM and doesn't have an AWS CloudFormation equivalent.
The following is an example of an event of the API
type.
ApiEvent:
Type: Api
Properties:
Method: get
Path: /group/{user}
RestApiId:
Ref: MyApi