Skip to content
v2.278.0

SetTimerProperty Struct ​

Information needed to set the timer.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iotevents as iotevents } from 'aws-cdk-lib';
const setTimerProperty: iotevents.CfnDetectorModel.SetTimerProperty = {
  timerName: 'timerName',

  // the properties below are optional
  durationExpression: 'durationExpression',
  seconds: 123,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iotevents as iotevents

set_timer_property = iotevents.CfnDetectorModel.SetTimerProperty(
    timer_name="timerName",

    # the properties below are optional
    duration_expression="durationExpression",
    seconds=123
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iotevents.*;

SetTimerProperty setTimerProperty = SetTimerProperty.builder()
        .timerName("timerName")

        // the properties below are optional
        .durationExpression("durationExpression")
        .seconds(123)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IoTEvents;

var setTimerProperty = new SetTimerProperty {
    TimerName = "timerName",

    // the properties below are optional
    DurationExpression = "durationExpression",
    Seconds = 123
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

setTimerProperty := &SetTimerProperty{
	TimerName: jsii.String("timerName"),

	// the properties below are optional
	DurationExpression: jsii.String("durationExpression"),
	Seconds: jsii.Number(123),
}

Properties ​

durationExpressionoptionalstringduration_expressionoptionalstrdurationExpressionoptionalStringDurationExpressionoptionalstringDurationExpressionoptional*string #
The duration of the timer, in seconds.
notes

You can use a string expression that includes numbers, variables ( $variable.<variable-name> ), and input values ( $input.<input-name>.<path-to-datum> ) as the duration. The range of the duration is 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the duration is rounded down to the nearest whole number.

secondsoptionalnumbersecondsoptionalint | floatsecondsoptionalNumberSecondsoptionaldoubleSecondsoptional*float64 #
The number of seconds until the timer expires.

The minimum value is 60 seconds to ensure accuracy. The maximum value is 31622400 seconds.

timerNamestringtimer_namestrtimerNameStringTimerNamestringTimerName*string required #
The name of the timer.