This template creates an IoT Events detector model with initial and other states, and defines various events and actions for each state. It also includes conditions and transitions between states.

CloudFormation Template