TimerDuration
- class aws_cdk.aws_iotevents_actions_alpha.TimerDuration
Bases:
object
(experimental) The duration of the timer.
- 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) }) ] )] )
- Stability:
experimental
Static Methods
- classmethod from_duration(duration)
(experimental) Create a timer-duration from Duration.
The range of the duration is 60-31622400 seconds. The evaluated result of the duration expression is rounded down to the nearest whole number. For example, if you set the timer to 60.99 seconds, the evaluated result of the duration expression is 60 seconds.
- Parameters:
duration (
Duration
) –- Stability:
experimental
- Return type:
- classmethod from_expression(expression)
(experimental) Create a timer-duration from Expression.
You can use a string expression that includes numbers, variables ($variable.), and input values ($input..) as the duration.
The range of the duration is 60-31622400 seconds. The evaluated result of the duration expression is rounded down to the nearest whole number. For example, if you set the timer to 60.99 seconds, the evaluated result of the duration expression is 60 seconds.
- Parameters:
expression (
Expression
) –- Stability:
experimental
- Return type: