# CfnStateTemplateProps

Struct · External

Properties for defining a `CfnStateTemplate`.

Used as props by: [CfnStateTemplate](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iotfleetwise.CfnStateTemplate.html)

- Source: Generated at build time
- Type last changed: v2.172.0 · 7 Dec 2024

## 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';
const cfnStateTemplateProps: iotfleetwise.CfnStateTemplateProps = {
  name: 'name',
  signalCatalogArn: 'signalCatalogArn',
  stateTemplateProperties: ['stateTemplateProperties'],

  // the properties below are optional
  dataExtraDimensions: ['dataExtraDimensions'],
  description: 'description',
  metadataExtraDimensions: ['metadataExtraDimensions'],
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

```python
from aws_cdk import CfnTag
# 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

cfn_state_template_props = iotfleetwise.CfnStateTemplateProps(
    name="name",
    signal_catalog_arn="signalCatalogArn",
    state_template_properties=["stateTemplateProperties"],

    # the properties below are optional
    data_extra_dimensions=["dataExtraDimensions"],
    description="description",
    metadata_extra_dimensions=["metadataExtraDimensions"],
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

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.*;

CfnStateTemplateProps cfnStateTemplateProps = CfnStateTemplateProps.builder()
        .name("name")
        .signalCatalogArn("signalCatalogArn")
        .stateTemplateProperties(List.of("stateTemplateProperties"))

        // the properties below are optional
        .dataExtraDimensions(List.of("dataExtraDimensions"))
        .description("description")
        .metadataExtraDimensions(List.of("metadataExtraDimensions"))
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
```

C#:

```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 cfnStateTemplateProps = new CfnStateTemplateProps {
    Name = "name",
    SignalCatalogArn = "signalCatalogArn",
    StateTemplateProperties = new [] { "stateTemplateProperties" },

    // the properties below are optional
    DataExtraDimensions = new [] { "dataExtraDimensions" },
    Description = "description",
    MetadataExtraDimensions = new [] { "metadataExtraDimensions" },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

Go:

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

cfnStateTemplateProps := &CfnStateTemplateProps{
	Name: jsii.String("name"),
	SignalCatalogArn: jsii.String("signalCatalogArn"),
	StateTemplateProperties: []*string{
		jsii.String("stateTemplateProperties"),
	},

	// the properties below are optional
	DataExtraDimensions: []*string{
		jsii.String("dataExtraDimensions"),
	},
	Description: jsii.String("description"),
	MetadataExtraDimensions: []*string{
		jsii.String("metadataExtraDimensions"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `dataExtraDimensions`: string[] — A list of vehicle attributes associated with the payload published on the state template's MQTT topic.

- `description`: string — A brief description of the state template.

- `metadataExtraDimensions`: string[] — A list of vehicle attributes to associate with the user properties of the messages published on the state template's MQTT topic.

  For example, if you add `Vehicle.Attributes.Make` and `Vehicle.Attributes.Model` attributes, these attributes are included as user properties with the MQTT message.

- `name`: string (required) — The unique alias of the state template.

- `signalCatalogArn`: string (required) — The Amazon Resource Name (ARN) of the signal catalog associated with the state template.

- `stateTemplateProperties`: string[] (required) — A list of signals from which data is collected.

  The state template properties contain the fully qualified names of the signals.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — Metadata that can be used to manage the state template.
