Skip to main content

vehicles

Creates, updates, deletes, gets or lists a vehicles resource.

Overview

Namevehicles
TypeResource
Idaws.iotfleetwise.vehicles

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the vehicle to retrieve information about.
attributesobjectStatic information about a vehicle in a key-value pair. For example: "engineType" : "1.3 L R2"
creation_timestring (date-time)The time the vehicle was created in seconds since epoch (January 1, 1970 at midnight UTC time).
decoder_manifest_arnstringThe ARN of a decoder manifest associated with the vehicle.
last_modification_timestring (date-time)The time the vehicle was last updated in seconds since epoch (January 1, 1970 at midnight UTC time).
model_manifest_arnstringThe ARN of a vehicle model (model manifest) associated with the vehicle.
state_templatesarrayState templates associated with the vehicle.
vehicle_namestringThe ID of the vehicle. (pattern: <code>[a-zA-Z\d-_:]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_vehicleselectregionRetrieves information about a vehicle.
list_vehiclesselectregionRetrieves a list of summaries of created vehicles. This API operation uses pagination. Specify the nextToken parameter in the request to return more results.
create_vehicleinsertregion, vehicleName, modelManifestArn, decoderManifestArnCreates a vehicle, which is an instance of a vehicle model (model manifest). Vehicles created from the same vehicle model consist of the same signals inherited from the vehicle model. If you have an existing Amazon Web Services IoT thing, you can use Amazon Web Services IoT FleetWise to create a vehicle and collect data from your thing. For more information, see Create a vehicle (AWS CLI) in the Amazon Web Services IoT FleetWise Developer Guide.
update_vehicleupdateregion, vehicleNameUpdates a vehicle. 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_vehicledeleteregionDeletes a vehicle and removes it from any campaigns.

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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Retrieves information about a vehicle.

SELECT
arn,
attributes,
creation_time,
decoder_manifest_arn,
last_modification_time,
model_manifest_arn,
state_templates,
vehicle_name
FROM aws.iotfleetwise.vehicles
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a vehicle, which is an instance of a vehicle model (model manifest). Vehicles created from the same vehicle model consist of the same signals inherited from the vehicle model. If you have an existing Amazon Web Services IoT thing, you can use Amazon Web Services IoT FleetWise to create a vehicle and collect data from your thing. For more information, see Create a vehicle (AWS CLI) in the Amazon Web Services IoT FleetWise Developer Guide.

INSERT INTO aws.iotfleetwise.vehicles (
vehicleName,
modelManifestArn,
decoderManifestArn,
attributes,
associationBehavior,
tags,
stateTemplates,
region
)
SELECT
'{{ vehicleName }}' /* required */,
'{{ modelManifestArn }}' /* required */,
'{{ decoderManifestArn }}' /* required */,
'{{ attributes }}',
'{{ associationBehavior }}',
'{{ tags }}',
'{{ stateTemplates }}',
'{{ region }}'
RETURNING
arn,
thing_arn,
vehicle_name
;

UPDATE examples

Updates a vehicle. 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.vehicles
SET
vehicleName = '{{ vehicleName }}',
modelManifestArn = '{{ modelManifestArn }}',
decoderManifestArn = '{{ decoderManifestArn }}',
attributes = '{{ attributes }}',
attributeUpdateMode = '{{ attributeUpdateMode }}',
stateTemplatesToAdd = '{{ stateTemplatesToAdd }}',
stateTemplatesToRemove = '{{ stateTemplatesToRemove }}',
stateTemplatesToUpdate = '{{ stateTemplatesToUpdate }}'
WHERE
region = '{{ region }}' --required
AND vehicleName = '{{ vehicleName }}' --required
RETURNING
arn,
vehicle_name;

DELETE examples

Deletes a vehicle and removes it from any campaigns.

DELETE FROM aws.iotfleetwise.vehicles
WHERE region = '{{ region }}' --required
;