state_templates
Creates, updates, deletes or gets a state_template
resource or lists state_templates
in a region
Overview
Name | state_templates |
Type | Resource |
Description | Definition of AWS::IoTFleetWise::StateTemplate Resource Type |
Id | aws.iotfleetwise.state_templates |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | |
creation_time | string | |
description | string | |
last_modification_time | string | |
name | string | |
signal_catalog_arn | string | |
state_template_properties | array | |
data_extra_dimensions | array | |
metadata_extra_dimensions | array | |
tags | array | |
region | string | AWS region. |
For more information, see AWS::IoTFleetWise::StateTemplate
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, SignalCatalogArn, StateTemplateProperties, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all state_templates
in a region.
SELECT
region,
arn,
creation_time,
description,
last_modification_time,
name,
signal_catalog_arn,
state_template_properties,
data_extra_dimensions,
metadata_extra_dimensions,
tags
FROM aws.iotfleetwise.state_templates
WHERE region = 'us-east-1';
Gets all properties from an individual state_template
.
SELECT
region,
arn,
creation_time,
description,
last_modification_time,
name,
signal_catalog_arn,
state_template_properties,
data_extra_dimensions,
metadata_extra_dimensions,
tags
FROM aws.iotfleetwise.state_templates
WHERE region = 'us-east-1' AND data__Identifier = '<Name>';
INSERT
example
Use the following StackQL query and manifest file to create a new state_template
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.iotfleetwise.state_templates (
Name,
SignalCatalogArn,
StateTemplateProperties,
region
)
SELECT
'{{ Name }}',
'{{ SignalCatalogArn }}',
'{{ StateTemplateProperties }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.iotfleetwise.state_templates (
Description,
Name,
SignalCatalogArn,
StateTemplateProperties,
DataExtraDimensions,
MetadataExtraDimensions,
Tags,
region
)
SELECT
'{{ Description }}',
'{{ Name }}',
'{{ SignalCatalogArn }}',
'{{ StateTemplateProperties }}',
'{{ DataExtraDimensions }}',
'{{ MetadataExtraDimensions }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: state_template
props:
- name: Description
value: '{{ Description }}'
- name: Name
value: '{{ Name }}'
- name: SignalCatalogArn
value: '{{ SignalCatalogArn }}'
- name: StateTemplateProperties
value:
- '{{ StateTemplateProperties[0] }}'
- name: DataExtraDimensions
value:
- '{{ DataExtraDimensions[0] }}'
- name: MetadataExtraDimensions
value:
- '{{ MetadataExtraDimensions[0] }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.iotfleetwise.state_templates
WHERE data__Identifier = '<Name>'
AND region = 'us-east-1';
Permissions
To operate on the state_templates
resource, the following permissions are required:
Create
iotfleetwise:GetStateTemplate,
iotfleetwise:CreateStateTemplate,
iotfleetwise:ListTagsForResource,
iotfleetwise:TagResource
Read
iotfleetwise:GetStateTemplate,
iotfleetwise:ListTagsForResource
Update
iotfleetwise:UpdateStateTemplate,
iotfleetwise:GetStateTemplate,
iotfleetwise:ListTagsForResource,
iotfleetwise:TagResource,
iotfleetwise:UntagResource
Delete
iotfleetwise:DeleteStateTemplate,
iotfleetwise:GetStateTemplate
List
iotfleetwise:ListStateTemplates