OnlineEvaluationBaseProps

class aws_cdk.aws_bedrock_agentcore_alpha.OnlineEvaluationBaseProps(*, online_evaluation_config_name, description=None, execution_role=None, execution_status=None, filters=None, sampling_percentage=None, session_timeout=None)

Bases: object

(experimental) Base properties for creating an OnlineEvaluationConfig.

The actual OnlineEvaluationProps is defined in online-evaluation-config.ts to avoid circular dependencies.

Parameters:
  • online_evaluation_config_name (str) – (experimental) The name of the online evaluation configuration. Must be unique within your account. Valid characters are a-z, A-Z, 0-9, _ (underscore). Must start with a letter and can be up to 48 characters long.

  • description (Optional[str]) – (experimental) The description of the online evaluation configuration. Default: - No description

  • execution_role (Optional[IRole]) – (experimental) The IAM role that provides permissions for the evaluation to access AWS services. If not provided, a role will be created automatically with the required permissions including cross-region Bedrock model invocation (to support cross-region inference profiles). For strict cost controls or data residency compliance, provide a custom role with region-scoped permissions. Default: - A new role will be created

  • execution_status (Optional[ExecutionStatus]) – (experimental) The execution status of the online evaluation configuration. Controls whether the evaluation actively processes agent traces. Default: ExecutionStatus.ENABLED

  • filters (Optional[Sequence[Union[FilterConfig, Dict[str, Any]]]]) – (experimental) The list of filters that determine which agent traces should be evaluated. Default: - No filters (evaluate all sampled traces)

  • sampling_percentage (Union[int, float, None]) – (experimental) The percentage of agent traces to sample for evaluation. Default: 10

  • session_timeout (Optional[Duration]) – (experimental) The duration of inactivity after which an agent session is considered complete and ready for evaluation. Must be between 1 minute and 1440 minutes (24 hours). Default: Duration.minutes(15)

Stability:

experimental

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_bedrock_agentcore_alpha as bedrock_agentcore_alpha
import aws_cdk as cdk
from aws_cdk import aws_iam as iam

# execution_status: bedrock_agentcore_alpha.ExecutionStatus
# filter_operator: bedrock_agentcore_alpha.FilterOperator
# filter_value: bedrock_agentcore_alpha.FilterValue
# role: iam.Role

online_evaluation_base_props = bedrock_agentcore_alpha.OnlineEvaluationBaseProps(
    online_evaluation_config_name="onlineEvaluationConfigName",

    # the properties below are optional
    description="description",
    execution_role=role,
    execution_status=execution_status,
    filters=[bedrock_agentcore_alpha.FilterConfig(
        key="key",
        operator=filter_operator,
        value=filter_value
    )],
    sampling_percentage=123,
    session_timeout=cdk.Duration.minutes(30)
)

Attributes

description

(experimental) The description of the online evaluation configuration.

Default:
  • No description

Stability:

experimental

MaxLength:

200

execution_role

(experimental) The IAM role that provides permissions for the evaluation to access AWS services.

If not provided, a role will be created automatically with the required permissions including cross-region Bedrock model invocation (to support cross-region inference profiles). For strict cost controls or data residency compliance, provide a custom role with region-scoped permissions.

Default:
  • A new role will be created

Stability:

experimental

execution_status

(experimental) The execution status of the online evaluation configuration.

Controls whether the evaluation actively processes agent traces.

Default:

ExecutionStatus.ENABLED

Stability:

experimental

filters

(experimental) The list of filters that determine which agent traces should be evaluated.

Default:
  • No filters (evaluate all sampled traces)

Stability:

experimental

Maximum:

5

online_evaluation_config_name

(experimental) The name of the online evaluation configuration.

Must be unique within your account. Valid characters are a-z, A-Z, 0-9, _ (underscore). Must start with a letter and can be up to 48 characters long.

Stability:

experimental

Pattern:

^[a-zA-Z][a-zA-Z0-9_]{0,47}$

sampling_percentage

(experimental) The percentage of agent traces to sample for evaluation.

Default:

10

Stability:

experimental

Maximum:

100

Minimum:

0.01

session_timeout

(experimental) The duration of inactivity after which an agent session is considered complete and ready for evaluation.

Must be between 1 minute and 1440 minutes (24 hours).

Default:

Duration.minutes(15)

Stability:

experimental