class SetTimerAction
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.IoTEvents.Actions.Alpha.SetTimerAction |
![]() | github.com/aws/aws-cdk-go/awscdkioteventsactionsalpha/v2#SetTimerAction |
![]() | software.amazon.awscdk.services.iotevents.actions.alpha.SetTimerAction |
![]() | aws_cdk.aws_iotevents_actions_alpha.SetTimerAction |
![]() | @aws-cdk/aws-iotevents-actions-alpha » SetTimerAction |
Implements
IAction
The action to create a timer with duration in seconds.
Example
import * as iotevents from '@aws-cdk/aws-iotevents-alpha';
import * as actions from '@aws-cdk/aws-iotevents-actions-alpha';
declare const input: iotevents.IInput;
const state = new iotevents.State({
stateName: 'MyState',
onEnter: [{
eventName: 'test-event',
condition: iotevents.Expression.currentInput(input),
actions: [
new actions.SetTimerAction('MyTimer', {
duration: cdk.Duration.seconds(60),
}),
],
}],
});
Initializer
new SetTimerAction(timerName: string, timerDuration: TimerDuration)
Parameters
- timerName
string
— the name of the timer. - timerDuration
Timer
— the duration of the timer.Duration