vehicles
Creates, updates, deletes or gets a vehicle resource or lists vehicles in a region
Overview
| Name | vehicles |
| Type | Resource |
| Description | Definition of AWS::IoTFleetWise::Vehicle Resource Type |
| Id | awscc.iotfleetwise.vehicles |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | |
association_behavior | string | |
attributes | object | |
creation_time | string | |
decoder_manifest_arn | string | |
name | string | |
last_modification_time | string | |
model_manifest_arn | string | |
tags | array | |
state_templates | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
name | string | |
region | string | AWS region. |
For more information, see AWS::IoTFleetWise::Vehicle.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | vehicles | INSERT | Name, DecoderManifestArn, ModelManifestArn, region |
delete_resource | vehicles | DELETE | Identifier, region |
update_resource | vehicles | UPDATE | Identifier, PatchDocument, region |
list_resources | vehicles_list_only | SELECT | region |
get_resource | vehicles | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual vehicle.
SELECT
region,
arn,
association_behavior,
attributes,
creation_time,
decoder_manifest_arn,
name,
last_modification_time,
model_manifest_arn,
tags,
state_templates
FROM awscc.iotfleetwise.vehicles
WHERE
region = 'us-east-1' AND
Identifier = '{{ name }}';
Lists all vehicles in a region.
SELECT
region,
name
FROM awscc.iotfleetwise.vehicles_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new vehicle resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.iotfleetwise.vehicles (
DecoderManifestArn,
Name,
ModelManifestArn,
region
)
SELECT
'{{ decoder_manifest_arn }}',
'{{ name }}',
'{{ model_manifest_arn }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.iotfleetwise.vehicles (
AssociationBehavior,
Attributes,
DecoderManifestArn,
Name,
ModelManifestArn,
Tags,
StateTemplates,
region
)
SELECT
'{{ association_behavior }}',
'{{ attributes }}',
'{{ decoder_manifest_arn }}',
'{{ name }}',
'{{ model_manifest_arn }}',
'{{ tags }}',
'{{ state_templates }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: vehicle
props:
- name: association_behavior
value: '{{ association_behavior }}'
- name: attributes
value: {}
- name: decoder_manifest_arn
value: '{{ decoder_manifest_arn }}'
- name: name
value: '{{ name }}'
- name: model_manifest_arn
value: '{{ model_manifest_arn }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: state_templates
value:
- identifier: '{{ identifier }}'
state_template_update_strategy: null
UPDATE example
Use the following StackQL query and manifest file to update a vehicle resource, using stack-deploy.
/*+ update */
UPDATE awscc.iotfleetwise.vehicles
SET PatchDocument = string('{{ {
"AssociationBehavior": association_behavior,
"Attributes": attributes,
"DecoderManifestArn": decoder_manifest_arn,
"ModelManifestArn": model_manifest_arn,
"Tags": tags,
"StateTemplates": state_templates
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ name }}';
DELETE example
/*+ delete */
DELETE FROM awscc.iotfleetwise.vehicles
WHERE
Identifier = '{{ name }}' AND
region = 'us-east-1';
Permissions
To operate on the vehicles resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
iotfleetwise:GetVehicle,
iotfleetwise:CreateVehicle,
iot:CreateThing,
iot:DeleteThing,
iot:DescribeThing,
iotfleetwise:ListTagsForResource,
iotfleetwise:ListVehicles,
iotfleetwise:TagResource
iotfleetwise:GetVehicle,
iotfleetwise:ListTagsForResource
iotfleetwise:GetVehicle,
iotfleetwise:UpdateVehicle,
iotfleetwise:ListTagsForResource,
iotfleetwise:TagResource,
iotfleetwise:UntagResource
iotfleetwise:GetVehicle,
iotfleetwise:DeleteVehicle
iotfleetwise:ListVehicles