updateComputationModel method
Updates the computation model.
May throw ConflictingOperationException.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw LimitExceededException.
May throw ResourceAlreadyExistsException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter computationModelConfiguration :
The configuration for the computation model.
Parameter computationModelDataBinding :
The data binding for the computation model. Key is a variable name defined
in configuration. Value is a ComputationModelDataBindingValue
referenced by the variable.
Parameter computationModelId :
The ID of the computation model.
Parameter computationModelName :
The name of the computation model.
Parameter clientToken :
A unique case-sensitive identifier that you can provide to ensure the
idempotency of the request. Don't reuse this client token if a new
idempotent request is required.
Parameter computationModelDescription :
The description of the computation model.
Implementation
Future<UpdateComputationModelResponse> updateComputationModel({
required ComputationModelConfiguration computationModelConfiguration,
required Map<String, ComputationModelDataBindingValue>
computationModelDataBinding,
required String computationModelId,
required String computationModelName,
String? clientToken,
String? computationModelDescription,
}) async {
final $payload = <String, dynamic>{
'computationModelConfiguration': computationModelConfiguration,
'computationModelDataBinding': computationModelDataBinding,
'computationModelName': computationModelName,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (computationModelDescription != null)
'computationModelDescription': computationModelDescription,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/computation-models/${Uri.encodeComponent(computationModelId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateComputationModelResponse.fromJson(response);
}