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 = '{{ region }}' AND
Identifier = '{{ name }}';
Lists all vehicles in a region.
SELECT
region,
name
FROM awscc.iotfleetwise.vehicles_list_only
WHERE
region = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.iotfleetwise.vehicles
WHERE
Identifier = '{{ name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
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