updateOnlineEvaluationConfig method
Updates an online evaluation configuration's settings, including rules, data sources, evaluators, and execution status. Changes take effect immediately for ongoing evaluations.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter onlineEvaluationConfigId :
The unique identifier of the online evaluation configuration to update.
Parameter clientToken :
A unique, case-sensitive identifier to ensure that the API request
completes no more than one time. If you don't specify this field, a value
is randomly generated for you. If this token matches a previous request,
the service ignores the request, but doesn't return an error. For more
information, see Ensuring
idempotency.
Parameter dataSourceConfig :
The updated data source configuration specifying CloudWatch log groups and
service names to monitor.
Parameter description :
The updated description of the online evaluation configuration.
Parameter evaluationExecutionRoleArn :
The updated Amazon Resource Name (ARN) of the IAM role used for evaluation
execution.
Parameter evaluators :
The updated list of evaluators to apply during online evaluation.
Parameter executionStatus :
The updated execution status to enable or disable the online evaluation.
Parameter rule :
The updated evaluation rule containing sampling configuration, filters,
and session settings.
Implementation
Future<UpdateOnlineEvaluationConfigResponse> updateOnlineEvaluationConfig({
required String onlineEvaluationConfigId,
String? clientToken,
DataSourceConfig? dataSourceConfig,
String? description,
String? evaluationExecutionRoleArn,
List<EvaluatorReference>? evaluators,
OnlineEvaluationExecutionStatus? executionStatus,
Rule? rule,
}) async {
final $payload = <String, dynamic>{
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (dataSourceConfig != null) 'dataSourceConfig': dataSourceConfig,
if (description != null) 'description': description,
if (evaluationExecutionRoleArn != null)
'evaluationExecutionRoleArn': evaluationExecutionRoleArn,
if (evaluators != null) 'evaluators': evaluators,
if (executionStatus != null) 'executionStatus': executionStatus.value,
if (rule != null) 'rule': rule,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/online-evaluation-configs/${Uri.encodeComponent(onlineEvaluationConfigId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateOnlineEvaluationConfigResponse.fromJson(response);
}