Skip to content
v2.275.0

OnlineEvaluationBaseProps Struct ​

Base properties for creating an OnlineEvaluationConfig.

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

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_bedrockagentcore as bedrockagentcore } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';

declare const executionStatus: bedrockagentcore.ExecutionStatus;
declare const filterOperator: bedrockagentcore.FilterOperator;
declare const filterValue: bedrockagentcore.FilterValue;
declare const role: iam.Role;
const onlineEvaluationBaseProps: bedrockagentcore.OnlineEvaluationBaseProps = {
  onlineEvaluationConfigName: 'onlineEvaluationConfigName',

  // the properties below are optional
  description: 'description',
  executionRole: role,
  executionStatus: executionStatus,
  filters: [{
    key: 'key',
    operator: filterOperator,
    value: filterValue,
  }],
  samplingPercentage: 123,
  sessionTimeout: cdk.Duration.minutes(30),
};

Properties ​

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#
The description of the online evaluation configuration.

Default: No description

executionRoleoptionalIRoleexecution_roleoptionalIRoleexecutionRoleoptionalIRoleExecutionRoleoptionalIRoleExecutionRoleoptionalIRole#
The IAM role that provides permissions for the evaluation to access AWS services.

Default: A new role will be created

notes

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.

executionStatusoptionalExecutionStatusexecution_statusoptionalExecutionStatusexecutionStatusoptionalExecutionStatusExecutionStatusoptionalExecutionStatusExecutionStatusoptionalExecutionStatus= ExecutionStatus.ENABLED#
The execution status of the online evaluation configuration.

Controls whether the evaluation actively processes agent traces.

filtersoptionalFilterConfig[]filtersoptionaltyping.List[FilterConfig]filtersoptionalList<FilterConfig>FiltersoptionalFilterConfig[]Filtersoptional*[]FilterConfig#
The list of filters that determine which agent traces should be evaluated.

Default: No filters (evaluate all sampled traces)

onlineEvaluationConfigNamestringonline_evaluation_config_namestronlineEvaluationConfigNameStringOnlineEvaluationConfigNamestringOnlineEvaluationConfigName*stringrequired#
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.

samplingPercentageoptionalnumbersampling_percentageoptionalint | floatsamplingPercentageoptionalNumberSamplingPercentageoptionaldoubleSamplingPercentageoptional*float64= 10#
The percentage of agent traces to sample for evaluation.
sessionTimeoutoptionalDurationsession_timeoutoptionalDurationsessionTimeoutoptionalDurationSessionTimeoutoptionalDurationSessionTimeoutoptionalDuration= Duration.minutes(15)#
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).