updateModel method
Future<void>
updateModel({
- required String modelId,
- required ModelTypeEnum modelType,
- String? description,
Updates a model. You can update the description attribute using this action.
May throw ValidationException. May throw ResourceNotFoundException. May throw InternalServerException. May throw AccessDeniedException.
Parameter modelId
:
The model ID.
Parameter modelType
:
The model type.
Parameter description
:
The new model description.
Implementation
Future<void> updateModel({
required String modelId,
required ModelTypeEnum modelType,
String? description,
}) async {
ArgumentError.checkNotNull(modelId, 'modelId');
_s.validateStringLength(
'modelId',
modelId,
1,
64,
isRequired: true,
);
ArgumentError.checkNotNull(modelType, 'modelType');
_s.validateStringLength(
'description',
description,
1,
128,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSHawksNestServiceFacade.UpdateModel'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'modelId': modelId,
'modelType': modelType.toValue(),
if (description != null) 'description': description,
},
);
}