updateModel method

Future<Model> updateModel({
  1. required String modelName,
  2. required String restApiId,
  3. List<PatchOperation>? patchOperations,
})

Changes information about a model. The maximum size of the model is 400 KB.

May throw BadRequestException. May throw ConflictException. May throw LimitExceededException. May throw NotFoundException. May throw TooManyRequestsException. May throw UnauthorizedException.

Parameter modelName : The name of the model to update.

Parameter restApiId : The string identifier of the associated RestApi.

Parameter patchOperations : For more information about supported patch operations, see Patch Operations.

Implementation

Future<Model> updateModel({
  required String modelName,
  required String restApiId,
  List<PatchOperation>? patchOperations,
}) async {
  final $payload = <String, dynamic>{
    if (patchOperations != null) 'patchOperations': patchOperations,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/restapis/${Uri.encodeComponent(restApiId)}/models/${Uri.encodeComponent(modelName)}',
    exceptionFnMap: _exceptionFns,
  );
  return Model.fromJson(response);
}