deleteFleet method

Future<DeleteFleetResponse> deleteFleet({
  1. required String fleetId,
})

Deletes a fleet. Before you delete a fleet, all vehicles must be dissociated from the fleet. For more information, see Delete a fleet (AWS CLI) in the Amazon Web Services IoT FleetWise Developer Guide.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter fleetId : The ID of the fleet to delete.

Implementation

Future<DeleteFleetResponse> deleteFleet({
  required String fleetId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'IoTAutobahnControlPlane.DeleteFleet'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'fleetId': fleetId,
    },
  );

  return DeleteFleetResponse.fromJson(jsonResponse.body);
}