getVehicle method

Future<GetVehicleResponse> getVehicle({
  1. required String vehicleName,
})

Retrieves information about a vehicle.

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

Parameter vehicleName : The ID of the vehicle to retrieve information about.

Implementation

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

  return GetVehicleResponse.fromJson(jsonResponse.body);
}