vehicles
Creates, updates, deletes, gets or lists a vehicles resource.
Overview
| Name | vehicles |
| Type | Resource |
| Id | aws.iotfleetwise.vehicles |
Fields
The following fields are returned by SELECT queries:
- get_vehicle
- list_vehicles
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the vehicle to retrieve information about. |
attributes | object | Static information about a vehicle in a key-value pair. For example: "engineType" : "1.3 L R2" |
creation_time | string (date-time) | The time the vehicle was created in seconds since epoch (January 1, 1970 at midnight UTC time). |
decoder_manifest_arn | string | The ARN of a decoder manifest associated with the vehicle. |
last_modification_time | string (date-time) | The time the vehicle was last updated in seconds since epoch (January 1, 1970 at midnight UTC time). |
model_manifest_arn | string | The ARN of a vehicle model (model manifest) associated with the vehicle. |
state_templates | array | State templates associated with the vehicle. |
vehicle_name | string | The ID of the vehicle. (pattern: <code>[a-zA-Z\d-_:]+</code>) |
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the vehicle. |
attributes | object | Static information about a vehicle in a key-value pair. For example: "engineType" : "1.3 L R2" |
creation_time | string (date-time) | The time the vehicle was created in seconds since epoch (January 1, 1970 at midnight UTC time). |
decoder_manifest_arn | string | The ARN of a decoder manifest associated with the vehicle. |
last_modification_time | string (date-time) | The time the vehicle was last updated in seconds since epoch (January 1, 1970 at midnight UTC time). |
model_manifest_arn | string | The ARN of a vehicle model (model manifest) associated with the vehicle. |
vehicle_name | string | The unique ID of the vehicle. (pattern: <code>[a-zA-Z\d-_:]+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_vehicle | select | region | Retrieves information about a vehicle. | |
list_vehicles | select | region | Retrieves a list of summaries of created vehicles. This API operation uses pagination. Specify the nextToken parameter in the request to return more results. | |
create_vehicle | insert | region, vehicleName, modelManifestArn, decoderManifestArn | 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. | |
update_vehicle | update | region, vehicleName | 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. | |
delete_vehicle | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_vehicle
- list_vehicles
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
;
Retrieves a list of summaries of created vehicles. This API operation uses pagination. Specify the nextToken parameter in the request to return more results.
SELECT
arn,
attributes,
creation_time,
decoder_manifest_arn,
last_modification_time,
model_manifest_arn,
vehicle_name
FROM aws.iotfleetwise.vehicles
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_vehicle
- Manifest
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
;
# Description fields are for documentation purposes
- name: vehicles
props:
- name: region
value: "{{ region }}"
description: Required parameter for the vehicles resource.
- name: vehicleName
value: "{{ vehicleName }}"
description: |
The unique ID of the vehicle to create.
- name: modelManifestArn
value: "{{ modelManifestArn }}"
description: |
The Amazon Resource Name ARN of a vehicle model.
- name: decoderManifestArn
value: "{{ decoderManifestArn }}"
description: |
The ARN of a decoder manifest.
- name: attributes
value: "{{ attributes }}"
description: |
Static information about a vehicle in a key-value pair. For example: "engineType" : "1.3 L R2" To use attributes with Campaigns or State Templates, you must include them using the request parameters dataExtraDimensions and/or metadataExtraDimensions (for state templates only) when creating your campaign/state template.
- name: associationBehavior
value: "{{ associationBehavior }}"
description: |
An option to create a new Amazon Web Services IoT thing when creating a vehicle, or to validate an existing Amazon Web Services IoT thing as a vehicle. Default:
valid_values: ['CreateIotThing', 'ValidateIotThingExists']
- name: tags
description: |
Metadata that can be used to manage the vehicle.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: stateTemplates
description: |
Associate state templates with the vehicle. You can monitor the last known state of the vehicle in near real time.
value:
- identifier: "{{ identifier }}"
stateTemplateUpdateStrategy:
periodic:
stateTemplateUpdateRate:
unit: "{{ unit }}"
value: {{ value }}
onChange: "{{ onChange }}"
UPDATE examples
- update_vehicle
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
- delete_vehicle
Deletes a vehicle and removes it from any campaigns.
DELETE FROM aws.iotfleetwise.vehicles
WHERE region = '{{ region }}' --required
;