IoTFleetWise / Client / create_vehicle
create_vehicle#
- IoTFleetWise.Client.create_vehicle(**kwargs)#
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.
Note
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.
See also: AWS API Documentation
Request Syntax
response = client.create_vehicle( vehicleName='string', modelManifestArn='string', decoderManifestArn='string', attributes={ 'string': 'string' }, associationBehavior='CreateIotThing'|'ValidateIotThingExists', tags=[ { 'Key': 'string', 'Value': 'string' }, ], stateTemplates=[ { 'identifier': 'string', 'stateTemplateUpdateStrategy': { 'periodic': { 'stateTemplateUpdateRate': { 'unit': 'MILLISECOND'|'SECOND'|'MINUTE'|'HOUR', 'value': 123 } }, 'onChange': {} } }, ] )
- Parameters:
vehicleName (string) –
[REQUIRED]
The unique ID of the vehicle to create.
modelManifestArn (string) –
[REQUIRED]
The Amazon Resource Name ARN of a vehicle model.
decoderManifestArn (string) –
[REQUIRED]
The ARN of a decoder manifest.
attributes (dict) –
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/ormetadataExtraDimensions
(for state templates only) when creating your campaign/state template.(string) –
(string) –
associationBehavior (string) –
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:
tags (list) –
Metadata that can be used to manage the vehicle.
(dict) –
A set of key/value pairs that are used to manage the resource.
Key (string) – [REQUIRED]
The tag’s key.
Value (string) – [REQUIRED]
The tag’s value.
stateTemplates (list) –
Associate state templates with the vehicle. You can monitor the last known state of the vehicle in near real time.
(dict) –
The state template associated with a vehicle. State templates contain state properties, which are signals that belong to a signal catalog that is synchronized between the Amazon Web Services IoT FleetWise Edge and the Amazon Web Services Cloud.
Warning
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.
identifier (string) – [REQUIRED]
A unique, service-generated identifier.
stateTemplateUpdateStrategy (dict) – [REQUIRED]
The update strategy for the state template. Vehicles associated with the state template can stream telemetry data with either an
onChange
orperiodic
update strategy.Warning
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.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
periodic
,onChange
.periodic (dict) –
Vehicles associated with the state template will stream telemetry data during a specified time period.
stateTemplateUpdateRate (dict) – [REQUIRED]
The length of time between state template updates.
unit (string) – [REQUIRED]
A unit of time.
value (integer) – [REQUIRED]
A number of time units.
onChange (dict) –
Vehicles associated with the state template will stream telemetry data when there is a change.
- Return type:
dict
- Returns:
Response Syntax
{ 'vehicleName': 'string', 'arn': 'string', 'thingArn': 'string' }
Response Structure
(dict) –
vehicleName (string) –
The unique ID of the created vehicle.
arn (string) –
The ARN of the created vehicle.
thingArn (string) –
The ARN of a created or validated Amazon Web Services IoT thing.
Exceptions
IoTFleetWise.Client.exceptions.InternalServerException
IoTFleetWise.Client.exceptions.ResourceNotFoundException
IoTFleetWise.Client.exceptions.ConflictException
IoTFleetWise.Client.exceptions.LimitExceededException
IoTFleetWise.Client.exceptions.ThrottlingException
IoTFleetWise.Client.exceptions.ValidationException
IoTFleetWise.Client.exceptions.AccessDeniedException