updateActiveModelVersion method
Sets the active model version for a given machine learning model.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter modelName :
The name of the machine learning model for which the active model version
is being set.
Parameter modelVersion :
The version of the machine learning model for which the active model
version is being set.
Implementation
Future<UpdateActiveModelVersionResponse> updateActiveModelVersion({
required String modelName,
required int modelVersion,
}) async {
_s.validateNumRange(
'modelVersion',
modelVersion,
1,
1152921504606846976,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target':
'AWSLookoutEquipmentFrontendService.UpdateActiveModelVersion'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ModelName': modelName,
'ModelVersion': modelVersion,
},
);
return UpdateActiveModelVersionResponse.fromJson(jsonResponse.body);
}