Get fleet information (AWS CLI) - AWS IoT FleetWise

Get fleet information (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 Preview AWS CLI and AWS SDKs.

You can use the ListFleets API operation to verify if a fleet has been deleted. The following example uses the AWS CLI.

To retrieve a paginated list of summaries of all fleets, run the following command.

aws iotfleetwise list-fleets

You can use the ListFleetsForVehicle API operation to retrieve a paginated list of IDs of all fleets that the vehicle belongs to. The following example uses the AWS CLI.

To retrieve a paginated list of IDs of all fleets that the vehicle belongs to, run the following command.

Replace vehicle-id with the ID of the vehicle.

aws iotfleetwise list-fleets-for-vehicle \ --vehicle-id vehicle-id

You can use the ListVehiclesInFleet API operation to retrieve a paginated list of summaries of all vehicles in a fleet. The following example uses the AWS CLI.

To retrieve a paginated list of summaries of all vehicles in a fleet, run the following command.

Replace fleet-id with the ID of the fleet.

aws iotfleetwise list-vehicles-in-fleet \ --fleet-id fleet-id

You can use the GetFleet API operation to retrieve fleet information. The following example uses the AWS CLI.

To retrieve the metadata of a fleet, run the following command.

Replace fleet-id with the ID of the fleet.

aws iotfleetwise get-fleet \ --fleet-id fleet-id