@aws-cdk_aws-iotevents-actions-alpha.SetTimerAction

class SetTimerAction 🔹

LanguageType name
.NETAmazon.CDK.AWS.IoTEvents.Actions.Alpha.SetTimerAction
Gogithub.com/aws/aws-cdk-go/awscdkioteventsactionsalpha/v2#SetTimerAction
Javasoftware.amazon.awscdk.services.iotevents.actions.alpha.SetTimerAction
Pythonaws_cdk.aws_iotevents_actions_alpha.SetTimerAction
TypeScript (source)@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 TimerDuration — the duration of the timer.