Skip to main content

vehicles

Creates, updates, deletes or gets a vehicle resource or lists vehicles in a region

Overview

Namevehicles
TypeResource
DescriptionDefinition of AWS::IoTFleetWise::Vehicle Resource Type
Idawscc.iotfleetwise.vehicles

Fields

NameDatatypeDescription
arnstring
association_behaviorstring
attributesobject
creation_timestring
decoder_manifest_arnstring
namestring
last_modification_timestring
model_manifest_arnstring
tagsarray
state_templatesarray
regionstringAWS region.

For more information, see AWS::IoTFleetWise::Vehicle.

Methods

NameResourceAccessible byRequired Params
create_resourcevehiclesINSERTName, DecoderManifestArn, ModelManifestArn, region
delete_resourcevehiclesDELETEIdentifier, region
update_resourcevehiclesUPDATEIdentifier, PatchDocument, region
list_resourcesvehicles_list_onlySELECTregion
get_resourcevehiclesSELECTIdentifier, region

SELECT examples

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new vehicle resource, using stack-deploy.

/*+ 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
;

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:

ParameterDescription
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:

iotfleetwise:GetVehicle,
iotfleetwise:CreateVehicle,
iot:CreateThing,
iot:DeleteThing,
iot:DescribeThing,
iotfleetwise:ListTagsForResource,
iotfleetwise:ListVehicles,
iotfleetwise:TagResource