Skip to content

Bedrock Agentcore Control  >  Operations  >  update_evaluator

update_evaluator

Operation

update_evaluator async

update_evaluator(input: UpdateEvaluatorInput, plugins: list[Plugin] | None = None) -> UpdateEvaluatorOutput

Updates a custom evaluator's configuration, description, or evaluation level. Built-in evaluators cannot be updated. The evaluator must not be locked for modification.

Parameters:

Name Type Description Default
input UpdateEvaluatorInput

An instance of UpdateEvaluatorInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
UpdateEvaluatorOutput

An instance of UpdateEvaluatorOutput.

Input

UpdateEvaluatorInput dataclass

Dataclass for UpdateEvaluatorInput structure.

Attributes

client_token class-attribute instance-attribute
client_token: str | None = None

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.

description class-attribute instance-attribute
description: str | None = field(repr=False, default=None)

The updated description of the evaluator.

evaluator_config class-attribute instance-attribute
evaluator_config: EvaluatorConfig | None = None

The updated configuration for the evaluator. Specify either LLM-as-a-Judge settings with instructions, rating scale, and model configuration, or code-based settings with a customer-managed Lambda function.

evaluator_id class-attribute instance-attribute
evaluator_id: str | None = None

The unique identifier of the evaluator to update.

kms_key_arn class-attribute instance-attribute
kms_key_arn: str | None = None

The Amazon Resource Name (ARN) of a customer managed KMS key to use for encrypting sensitive evaluator data. Specify a new key ARN to rotate the encryption key, or specify a key ARN to add encryption to an evaluator that was previously created without one. When you rotate to a new key, the service decrypts the existing data with the old key and re-encrypts it with the new key. Only symmetric encryption KMS keys are supported. For more information, see Encryption at rest for AgentCore Evaluations.

level class-attribute instance-attribute
level: EvaluatorLevel | None = None

The updated evaluation level (TOOL_CALL, TRACE, or SESSION) that determines the scope of evaluation.

Output

UpdateEvaluatorOutput dataclass

Dataclass for UpdateEvaluatorOutput structure.

Attributes

evaluator_arn instance-attribute
evaluator_arn: str

The Amazon Resource Name (ARN) of the updated evaluator.

evaluator_id instance-attribute
evaluator_id: str

The unique identifier of the updated evaluator.

status instance-attribute

The status of the evaluator update operation.

updated_at instance-attribute
updated_at: datetime

The timestamp when the evaluator was last updated.