# SetTimerProperty

Information needed to set the timer.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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
};
```

Golang:

```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

- `durationExpression`: string — The duration of the timer, in seconds.

  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.

- `seconds`: number — The number of seconds until the timer expires.

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

- `timerName`: string (required) — The name of the timer.
