SetTimerAction

class aws_cdk.aws_iotevents_actions_alpha.SetTimerAction(timer_name, timer_duration)

Bases: object

(experimental) The action to create a timer with duration in seconds.

Stability:

experimental

ExampleMetadata:

infused

Example:

# Example automatically generated from non-compiling source. May contain errors.
import aws_cdk.aws_iotevents_alpha as iotevents
import aws_cdk.aws_iotevents_actions_alpha as actions

# input: iotevents.IInput

state = iotevents.State(
    state_name="MyState",
    on_enter=[iotevents.Event(
        event_name="test-event",
        condition=iotevents.Expression.current_input(input),
        actions=[
            actions.SetTimerAction("MyTimer", {
                "duration": cdk.Duration.seconds(60)
            })
        ]
    )]
)
Parameters:
  • timer_name (str) – the name of the timer.

  • timer_duration (TimerDuration) – the duration of the timer.

Stability:

experimental