Associate a vehicle with a fleet (AWS CLI) - AWS IoT FleetWise

Associate a vehicle with a fleet (AWS CLI)

AWS IoT FleetWise is in preview release and is subject to change. We recommend that you use the service only with test data, and not in production environments.

While AWS IoT FleetWise is in preview, you must download the preview AWS SDK and AWS CLI to use the API operations for this service. These API operations aren't available in the public AWS SDK or AWS CLI. For more information, see AWS CLI and AWS SDKs (preview).

You can use the AssociateVehicleFleet API operation to associate a vehicle with a fleet. The following example uses AWS CLI.

Important
  • You must have a vehicle and a fleet before you can associate a vehicle with a fleet. For more information, see Create, provision, and manage vehicles.

  • If you associate a vehicle with a fleet that is targeted by a campaign, AWS IoT FleetWise automatically deploys the campaign to the vehicle.

To associate a vehicle with a fleet, run the following command.

  • Replace fleet-id with the ID of the fleet.

  • Replace vehicle-name with the ID of the vehicle.

aws iotfleetwise associate-vehicle-fleet --fleet-id fleet-id --vehicle-name vehicle-name