StateTemplate
Source:
src/AWS/IoTFleetWise/StateTemplate.ts
An AWS IoT FleetWise state template — a definition of which signals’
last-known state the Edge Agent reports for a Vehicle
(associated via the vehicle’s stateTemplates prop).
Only the description, tracked properties, and extra dimensions are
mutable — changing the name or signal catalog replaces the template.
AWS IoT FleetWise is allowlist-gated and offered in
us-east-1/eu-central-1 only.
Creating a State Template
Section titled “Creating a State Template”Track Last-Known Speed
const template = yield* StateTemplate("SpeedState", { signalCatalogArn: catalog.signalCatalogArn, stateTemplateProperties: ["Vehicle.Speed"],});Associate with a Vehicle
const vehicle = yield* Vehicle("TestVehicle", { modelManifestArn: model.modelManifestArn, decoderManifestArn: decoder.decoderManifestArn, stateTemplates: [ { identifier: template.stateTemplateName, stateTemplateUpdateStrategy: { onChange: {} }, }, ],});