# StateTemplateAssociationProperty

The state template associated with a vehicle.

State templates contain state properties, which are signals that belong to a signal catalog that is synchronized between the AWS IoT FleetWise Edge and the AWS Cloud .

> Access to certain AWS IoT FleetWise features is currently gated. For more information, see [AWS Region and feature availability](https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/fleetwise-regions.html) in the *AWS IoT FleetWise Developer Guide* .

- Source: Generated at build time
- Type last changed: v2.178.0 · 6 Feb 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iotfleetwise as iotfleetwise } from 'aws-cdk-lib';

declare const onChange: any;
const stateTemplateAssociationProperty: iotfleetwise.CfnVehicle.StateTemplateAssociationProperty = {
  identifier: 'identifier',
  stateTemplateUpdateStrategy: {
    onChange: onChange,
    periodic: {
      stateTemplateUpdateRate: {
        unit: 'unit',
        value: 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_iotfleetwise as iotfleetwise

# on_change: Any

state_template_association_property = iotfleetwise.CfnVehicle.StateTemplateAssociationProperty(
    identifier="identifier",
    state_template_update_strategy=iotfleetwise.CfnVehicle.StateTemplateUpdateStrategyProperty(
        on_change=on_change,
        periodic=iotfleetwise.CfnVehicle.PeriodicStateTemplateUpdateStrategyProperty(
            state_template_update_rate=iotfleetwise.CfnVehicle.TimePeriodProperty(
                unit="unit",
                value=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.iotfleetwise.*;

Object onChange;

StateTemplateAssociationProperty stateTemplateAssociationProperty = StateTemplateAssociationProperty.builder()
        .identifier("identifier")
        .stateTemplateUpdateStrategy(StateTemplateUpdateStrategyProperty.builder()
                .onChange(onChange)
                .periodic(PeriodicStateTemplateUpdateStrategyProperty.builder()
                        .stateTemplateUpdateRate(TimePeriodProperty.builder()
                                .unit("unit")
                                .value(123)
                                .build())
                        .build())
                .build())
        .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.IoTFleetWise;

var onChange;

var stateTemplateAssociationProperty = new StateTemplateAssociationProperty {
    Identifier = "identifier",
    StateTemplateUpdateStrategy = new StateTemplateUpdateStrategyProperty {
        OnChange = onChange,
        Periodic = new PeriodicStateTemplateUpdateStrategyProperty {
            StateTemplateUpdateRate = new TimePeriodProperty {
                Unit = "unit",
                Value = 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"

var onChange interface{}

stateTemplateAssociationProperty := &StateTemplateAssociationProperty{
	Identifier: jsii.String("identifier"),
	StateTemplateUpdateStrategy: &StateTemplateUpdateStrategyProperty{
		OnChange: onChange,
		Periodic: &PeriodicStateTemplateUpdateStrategyProperty{
			StateTemplateUpdateRate: &TimePeriodProperty{
				Unit: jsii.String("unit"),
				Value: jsii.Number(123),
			},
		},
	},
}
```

## Properties

- `identifier`: string (required) — The unique ID of the state template.

- `stateTemplateUpdateStrategy`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVehicle.StateTemplateUpdateStrategyProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iotfleetwise.CfnVehicle.StateTemplateUpdateStrategyProperty.html) (required)
