batchCreateVehicle method
Future<BatchCreateVehicleResponse>
batchCreateVehicle({
- required List<
CreateVehicleRequestItem> vehicles,
Creates a group, or batch, of vehicles. For more information, see Create multiple vehicles (AWS CLI) in the Amazon Web Services IoT FleetWise Developer Guide.
May throw AccessDeniedException.
May throw InternalServerException.
May throw LimitExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter vehicles :
A list of information about each vehicle to create. For more information,
see the API data type.
Implementation
Future<BatchCreateVehicleResponse> batchCreateVehicle({
required List<CreateVehicleRequestItem> vehicles,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'IoTAutobahnControlPlane.BatchCreateVehicle'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'vehicles': vehicles,
},
);
return BatchCreateVehicleResponse.fromJson(jsonResponse.body);
}