@aws-cdk_aws-iotevents-alpha.StateProps

interface StateProps ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.IoTEvents.Alpha.StateProps
Gogithub.com/aws/aws-cdk-go/awscdkioteventsalpha/v2#StateProps
Javasoftware.amazon.awscdk.services.iotevents.alpha.StateProps
Pythonaws_cdk.aws_iotevents_alpha.StateProps
TypeScript (source)@aws-cdk/aws-iotevents-alpha ยป StateProps

Properties for defining a state of a detector.

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),
      }),
    ],
  }],
});

Properties

NameTypeDescription
stateName๐Ÿ”นstringThe name of the state.
onEnter?๐Ÿ”นEvent[]Specifies the events on enter.
onExit?๐Ÿ”นEvent[]Specifies the events on exit.
onInput?๐Ÿ”นEvent[]Specifies the events on input.

stateName๐Ÿ”น

Type: string

The name of the state.


onEnter?๐Ÿ”น

Type: Event[] (optional, default: no events will trigger on entering this state)

Specifies the events on enter.

The conditions of the events will be evaluated when entering this state. If the condition of the event evaluates to true, the actions of the event will be executed.


onExit?๐Ÿ”น

Type: Event[] (optional, default: no events will trigger on exiting this state)

Specifies the events on exit.

The conditions of the events are evaluated when an exiting this state. If the condition evaluates to true, the actions of the event will be executed.


onInput?๐Ÿ”น

Type: Event[] (optional, default: no events will trigger on input in this state)

Specifies the events on input.

The conditions of the events will be evaluated when any input is received. If the condition of the event evaluates to true, the actions of the event will be executed.