updateModelVersion method

Future<UpdateModelVersionResult> updateModelVersion({
  1. required String majorVersionNumber,
  2. required String modelId,
  3. required ModelTypeEnum modelType,
  4. ExternalEventsDetail? externalEventsDetail,
  5. IngestedEventsDetail? ingestedEventsDetail,
  6. List<Tag>? tags,
})

Updates a model version. Updating a model version retrains an existing model version using updated training data and produces a new minor version of the model. You can update the training data set location and data access role attributes using this action. This action creates and trains a new minor version of the model, for example version 1.01, 1.02, 1.03.

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

Parameter majorVersionNumber : The major version number.

Parameter modelId : The model ID.

Parameter modelType : The model type.

Parameter externalEventsDetail : The details of the external events data used for training the model version. Required if trainingDataSource is EXTERNAL_EVENTS.

Parameter ingestedEventsDetail : The details of the ingested event used for training the model version. Required if your trainingDataSource is INGESTED_EVENTS.

Parameter tags : A collection of key and value pairs.

Implementation

Future<UpdateModelVersionResult> updateModelVersion({
  required String majorVersionNumber,
  required String modelId,
  required ModelTypeEnum modelType,
  ExternalEventsDetail? externalEventsDetail,
  IngestedEventsDetail? ingestedEventsDetail,
  List<Tag>? tags,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSHawksNestServiceFacade.UpdateModelVersion'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'majorVersionNumber': majorVersionNumber,
      'modelId': modelId,
      'modelType': modelType.value,
      if (externalEventsDetail != null)
        'externalEventsDetail': externalEventsDetail,
      if (ingestedEventsDetail != null)
        'ingestedEventsDetail': ingestedEventsDetail,
      if (tags != null) 'tags': tags,
    },
  );

  return UpdateModelVersionResult.fromJson(jsonResponse.body);
}