Class TimerDuration
(experimental) The duration of the timer.
Inheritance
Namespace: Amazon.CDK.AWS.IoTEvents.Actions.Alpha
Assembly: Amazon.CDK.AWS.IoTEvents.Actions.Alpha.dll
Syntax (csharp)
public abstract class TimerDuration : DeputyBase
Syntax (vb)
Public MustInherit Class TimerDuration
Inherits DeputyBase
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
// Example automatically generated from non-compiling source. May contain errors.
using Amazon.CDK.AWS.IoTEvents.Alpha;
using Amazon.CDK.AWS.IoTEvents.Actions.Alpha;
IInput input;
var state = new State(new StateProps {
StateName = "MyState",
OnEnter = new [] { new Event {
EventName = "test-event",
Condition = Expression.CurrentInput(input),
Actions = new [] {
new SetTimerAction("MyTimer", new Dictionary<string, object> {
{ "duration", cdk.Duration.Seconds(60) }
}) }
} }
});
Synopsis
Constructors
TimerDuration() | |
TimerDuration(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
TimerDuration(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
FromDuration(Duration) | (experimental) Create a timer-duration from Duration. |
FromExpression(Expression) | (experimental) Create a timer-duration from Expression. |
Constructors
TimerDuration()
protected TimerDuration()
Remarks
Stability: Experimental
TimerDuration(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected TimerDuration(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
TimerDuration(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected TimerDuration(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
FromDuration(Duration)
(experimental) Create a timer-duration from Duration.
public static TimerDuration FromDuration(Duration duration)
Parameters
- duration Duration
Returns
Remarks
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.
Stability: Experimental
FromExpression(Expression)
(experimental) Create a timer-duration from Expression.
public static TimerDuration FromExpression(Expression expression)
Parameters
- expression Expression
Returns
Remarks
You can use a string expression that includes numbers, variables ($variable.
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.
Stability: Experimental