Class TimerDuration
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
Example:
// Example automatically generated from non-compiling source. May contain errors. import software.amazon.awscdk.services.iotevents.alpha.*; import software.amazon.awscdk.services.iotevents.actions.alpha.*; IInput input; State state = State.Builder.create() .stateName("MyState") .onEnter(List.of(Event.builder() .eventName("test-event") .condition(Expression.currentInput(input)) .actions(List.of( new SetTimerAction("MyTimer", Map.of( "duration", cdk.Duration.seconds(60))))) .build())) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
protected
TimerDuration
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
TimerDuration
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic TimerDuration
fromDuration
(Duration duration) (experimental) Create a timer-duration from Duration.static TimerDuration
fromExpression
(Expression expression) (experimental) Create a timer-duration from Expression.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
TimerDuration
protected TimerDuration(software.amazon.jsii.JsiiObjectRef objRef) -
TimerDuration
protected TimerDuration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
TimerDuration
@Stability(Experimental) protected TimerDuration()
-
-
Method Details
-
fromDuration
@Stability(Experimental) @NotNull public static TimerDuration fromDuration(@NotNull 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
- This parameter is required.
-
fromExpression
@Stability(Experimental) @NotNull public static TimerDuration fromExpression(@NotNull Expression expression) (experimental) Create a timer-duration from Expression.You can use a string expression that includes numbers, variables ($variable.invalid input: '<'variable-name>), and input values ($input.invalid input: '<'input-name>.invalid input: '<'path-to-datum>) 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
- This parameter is required.
-