updateModel method

Future<void> updateModel({
  1. required String modelId,
  2. required ModelTypeEnum modelType,
  3. String? description,
})

Updates model description.

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

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 {
  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.value,
      if (description != null) 'description': description,
    },
  );
}