updateModelManifest method
Updates a vehicle model (model manifest). If created vehicles are associated with a vehicle model, it can't be updated.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw InvalidSignalsException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter name :
The name of the vehicle model to update.
Parameter description :
A brief description of the vehicle model.
Parameter nodesToAdd :
A list of fullyQualifiedName of nodes, which are a general
abstraction of signals, to add to the vehicle model.
Parameter nodesToRemove :
A list of fullyQualifiedName of nodes, which are a general
abstraction of signals, to remove from the vehicle model.
Parameter status :
The state of the vehicle model. If the status is ACTIVE, the
vehicle model can't be edited. If the status is DRAFT, you
can edit the vehicle model.
Implementation
Future<UpdateModelManifestResponse> updateModelManifest({
required String name,
String? description,
List<String>? nodesToAdd,
List<String>? nodesToRemove,
ManifestStatus? status,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'IoTAutobahnControlPlane.UpdateModelManifest'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'name': name,
if (description != null) 'description': description,
if (nodesToAdd != null) 'nodesToAdd': nodesToAdd,
if (nodesToRemove != null) 'nodesToRemove': nodesToRemove,
if (status != null) 'status': status.value,
},
);
return UpdateModelManifestResponse.fromJson(jsonResponse.body);
}