state_templates
Creates, updates, deletes, gets or lists a state_templates resource.
Overview
| Name | state_templates |
| Type | Resource |
| Id | aws.iotfleetwise.state_templates |
Fields
The following fields are returned by SELECT queries:
- get_state_template
- list_state_templates
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the state template. (pattern: <code>[A-Z0-9]+</code>) |
name | string | The name of the state template. (pattern: <code>[a-zA-Z\d-_:]+</code>) |
arn | string | The Amazon Resource Name (ARN) of the state template. |
creation_time | string (date-time) | The time the state template was created in seconds since epoch (January 1, 1970 at midnight UTC time). |
data_extra_dimensions | array | A list of vehicle attributes associated with the payload published on the state template's MQTT topic. Default: An empty array |
description | string | A brief description of the state template. (pattern: <code>[^\u0000-\u001F\u007F]+</code>) |
last_modification_time | string (date-time) | The time the state template was last updated in seconds since epoch (January 1, 1970 at midnight UTC time). |
metadata_extra_dimensions | array | A list of vehicle attributes to associate with user properties of the messages published on the state template's MQTT topic. Default: An empty array |
signal_catalog_arn | string | The ARN of the signal catalog associated with the state template. |
state_template_properties | array | A list of signals from which data is collected. The state template properties contain the fully qualified names of the signals. |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the state template. (pattern: <code>[A-Z0-9]+</code>) |
name | string | The name of the state template. (pattern: <code>[a-zA-Z\d-_:]+</code>) |
arn | string | The Amazon Resource Name (ARN) of the state template. |
creation_time | string (date-time) | The time the state template was created, in seconds since epoch (January 1, 1970 at midnight UTC time). |
description | string | A brief description of the state template. (pattern: <code>[^\u0000-\u001F\u007F]+</code>) |
last_modification_time | string (date-time) | The time the state template was last updated, in seconds since epoch (January 1, 1970 at midnight UTC time). |
signal_catalog_arn | string | The Amazon Resource Name (ARN) of the signal catalog associated with the state template. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_state_template | select | region | Retrieves information about a state template. Access to certain Amazon Web Services IoT FleetWise features is currently gated. For more information, see Amazon Web Services Region and feature availability in the Amazon Web Services IoT FleetWise Developer Guide. | |
list_state_templates | select | region | Lists information about created state templates. Access to certain Amazon Web Services IoT FleetWise features is currently gated. For more information, see Amazon Web Services Region and feature availability in the Amazon Web Services IoT FleetWise Developer Guide. | |
create_state_template | insert | region, name, signalCatalogArn, stateTemplateProperties | Creates a state template. State templates contain state properties, which are signals that belong to a signal catalog that is synchronized between the Amazon Web Services IoT FleetWise Edge and the Amazon Web Services Cloud. Access to certain Amazon Web Services IoT FleetWise features is currently gated. For more information, see Amazon Web Services Region and feature availability in the Amazon Web Services IoT FleetWise Developer Guide. | |
update_state_template | update | region, identifier | Updates a state template. Access to certain Amazon Web Services IoT FleetWise features is currently gated. For more information, see Amazon Web Services Region and feature availability in the Amazon Web Services IoT FleetWise Developer Guide. | |
delete_state_template | delete | region | Deletes a state template. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_state_template
- list_state_templates
Retrieves information about a state template. Access to certain Amazon Web Services IoT FleetWise features is currently gated. For more information, see Amazon Web Services Region and feature availability in the Amazon Web Services IoT FleetWise Developer Guide.
SELECT
id,
name,
arn,
creation_time,
data_extra_dimensions,
description,
last_modification_time,
metadata_extra_dimensions,
signal_catalog_arn,
state_template_properties
FROM aws.iotfleetwise.state_templates
WHERE region = '{{ region }}' -- required
;
Lists information about created state templates. Access to certain Amazon Web Services IoT FleetWise features is currently gated. For more information, see Amazon Web Services Region and feature availability in the Amazon Web Services IoT FleetWise Developer Guide.
SELECT
id,
name,
arn,
creation_time,
description,
last_modification_time,
signal_catalog_arn
FROM aws.iotfleetwise.state_templates
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_state_template
- Manifest
Creates a state template. State templates contain state properties, which are signals that belong to a signal catalog that is synchronized between the Amazon Web Services IoT FleetWise Edge and the Amazon Web Services Cloud. Access to certain Amazon Web Services IoT FleetWise features is currently gated. For more information, see Amazon Web Services Region and feature availability in the Amazon Web Services IoT FleetWise Developer Guide.
INSERT INTO aws.iotfleetwise.state_templates (
name,
description,
signalCatalogArn,
stateTemplateProperties,
dataExtraDimensions,
metadataExtraDimensions,
tags,
region
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ signalCatalogArn }}' /* required */,
'{{ stateTemplateProperties }}' /* required */,
'{{ dataExtraDimensions }}',
'{{ metadataExtraDimensions }}',
'{{ tags }}',
'{{ region }}'
RETURNING
id,
name,
arn
;
# Description fields are for documentation purposes
- name: state_templates
props:
- name: region
value: "{{ region }}"
description: Required parameter for the state_templates resource.
- name: name
value: "{{ name }}"
description: |
The name of the state template.
- name: description
value: "{{ description }}"
description: |
A brief description of the state template.
- name: signalCatalogArn
value: "{{ signalCatalogArn }}"
description: |
The ARN of the signal catalog associated with the state template.
- name: stateTemplateProperties
value:
- "{{ stateTemplateProperties }}"
description: |
A list of signals from which data is collected. The state template properties contain the fully qualified names of the signals.
- name: dataExtraDimensions
value:
- "{{ dataExtraDimensions }}"
description: |
A list of vehicle attributes to associate with the payload published on the state template's MQTT topic. (See Processing last known state vehicle data using MQTT messaging). For example, if you add Vehicle.Attributes.Make and Vehicle.Attributes.Model attributes, Amazon Web Services IoT FleetWise will enrich the protobuf encoded payload with those attributes in the extraDimensions field.
- name: metadataExtraDimensions
value:
- "{{ metadataExtraDimensions }}"
description: |
A list of vehicle attributes to associate with user properties of the messages published on the state template's MQTT topic. (See Processing last known state vehicle data using MQTT messaging). For example, if you add Vehicle.Attributes.Make and Vehicle.Attributes.Model attributes, Amazon Web Services IoT FleetWise will include these attributes as User Properties with the MQTT message. Default: An empty array
- name: tags
description: |
Metadata that can be used to manage the state template.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_state_template
Updates a state template. Access to certain Amazon Web Services IoT FleetWise features is currently gated. For more information, see Amazon Web Services Region and feature availability in the Amazon Web Services IoT FleetWise Developer Guide.
UPDATE aws.iotfleetwise.state_templates
SET
identifier = '{{ identifier }}',
description = '{{ description }}',
stateTemplatePropertiesToAdd = '{{ stateTemplatePropertiesToAdd }}',
stateTemplatePropertiesToRemove = '{{ stateTemplatePropertiesToRemove }}',
dataExtraDimensions = '{{ dataExtraDimensions }}',
metadataExtraDimensions = '{{ metadataExtraDimensions }}'
WHERE
region = '{{ region }}' --required
AND identifier = '{{ identifier }}' --required
RETURNING
id,
name,
arn;
DELETE examples
- delete_state_template
Deletes a state template.
DELETE FROM aws.iotfleetwise.state_templates
WHERE region = '{{ region }}' --required
;