Using built-in actions - AWS IoT Events

Using built-in actions

AWS IoT Events supports the following actions that let you use a timer or set a variable:

Set timer action

Set timer action

The setTimer action lets you create a timer with duration in seconds.

More information (2)

When you create a timer, you must specify the following parameters.

timerName

The name of the timer.

durationExpression

(Optional) The duration of the timer, in seconds.

The evaluated result of a 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.

For more information, see SetTimerAction in the AWS IoT Events API Reference.

Reset timer action

Reset timer action

The resetTimer action lets you set the timer to the previously evaluated result of the duration expression.

More information (1)

When you reset a timer, you must specify the following parameter.

timerName

The name of the timer.

AWS IoT Events doesn't reevaluate the duration expression when you reset the timer.

For more information, see ResetTimerAction in the AWS IoT Events API Reference.

Clear timer action

Clear timer action

The clearTimer action lets you delete an existing timer.

More information (1)

When you delete a timer, you must specify the following parameter.

timerName

The name of the timer.

For more information, see ClearTimerAction in the AWS IoT Events API Reference.

Set variable action

Set variable action

The setVariable action lets you create a variable with a specified value.

More information (2)

When you create a variable, you must specify the following parameters.

variableName

The name of the variable.

value

The new value of the variable.

For more information, see SetVariableAction in the AWS IoT Events API Reference.