Get AWS IoT FleetWise vehicle information
Important
Access to certain AWS IoT FleetWise features is currently gated. For more information, see AWS Region and feature availability in AWS IoT FleetWise.
You can use the GetVehicle API operation to retrieve vehicle information. The following example uses the AWS CLI.
To retrieve the metadata of a vehicle, run the following command.
Replace vehicle-name
with the ID of the vehicle that you
want to retrieve.
aws iotfleetwise get-vehicle --vehicle-name
vehicle-name
Note
This operation is eventually
consistent
You can use the GetVehicleStatus API operation to retrieve the status of resources associated with a vehicle. The following example uses the AWS CLI.
To retrieve the status of resources associated with a vehicle, run the following command.
Replace
vehicle-name
with the ID of the vehicle which the resources are associated with.Replace
type
with the type of the resource whose status you want to retrieve. Valid values fortype
areCAMPAIGN
,STATE_TEMPLATE
, andDECODER
.
aws iotfleetwise get-vehicle-status --vehicle-name
vehicle-name
--typetype
If you enabled encryption using a customer managed AWS KMS key, include the following policy statement so that your role can invoke the GetVehicle
or GetVehicleStatus
API operations.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "kms:Decrypt" ], "Resource": [ "arn:aws:kms:
KMS_KEY_REGION
:KMS_KEY_ACCOUNT_ID
:key/KMS_KEY_ID
" ] }, ] }