Skip to content
v2.278.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 bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';
import * as cdk from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';

declare const executionStatus: bedrock_agentcore_alpha.ExecutionStatus;
declare const filterOperator: bedrock_agentcore_alpha.FilterOperator;
declare const filterValue: bedrock_agentcore_alpha.FilterValue;
declare const role: iam.Role;
const onlineEvaluationBaseProps: bedrock_agentcore_alpha.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),
};
python
# 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)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrock.agentcore.alpha.*;
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.iam.*;

ExecutionStatus executionStatus;
FilterOperator filterOperator;
FilterValue filterValue;
Role role;

OnlineEvaluationBaseProps onlineEvaluationBaseProps = OnlineEvaluationBaseProps.builder()
        .onlineEvaluationConfigName("onlineEvaluationConfigName")

        // the properties below are optional
        .description("description")
        .executionRole(role)
        .executionStatus(executionStatus)
        .filters(List.of(FilterConfig.builder()
                .key("key")
                .operator(filterOperator)
                .value(filterValue)
                .build()))
        .samplingPercentage(123)
        .sessionTimeout(Duration.minutes(30))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Bedrock.Agentcore.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock.Agentcore.Alpha;
using Amazon.CDK;
using Amazon.CDK.AWS.IAM;

ExecutionStatus executionStatus;
FilterOperator filterOperator;
FilterValue filterValue;
Role role;

var onlineEvaluationBaseProps = new OnlineEvaluationBaseProps {
    OnlineEvaluationConfigName = "onlineEvaluationConfigName",

    // the properties below are optional
    Description = "description",
    ExecutionRole = role,
    ExecutionStatus = executionStatus,
    Filters = new [] { new FilterConfig {
        Key = "key",
        Operator = filterOperator,
        Value = filterValue
    } },
    SamplingPercentage = 123,
    SessionTimeout = Duration.Minutes(30)
};
go
// Install: go get github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import bedrock_agentcore_alpha "github.com/aws/aws-cdk-go/awsbedrockagentcorealpha"
import cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var executionStatus ExecutionStatus
var filterOperator FilterOperator
var filterValue FilterValue
var role Role

onlineEvaluationBaseProps := &OnlineEvaluationBaseProps{
	OnlineEvaluationConfigName: jsii.String("onlineEvaluationConfigName"),

	// the properties below are optional
	Description: jsii.String("description"),
	ExecutionRole: role,
	ExecutionStatus: executionStatus,
	Filters: []FilterConfig{
		&FilterConfig{
			Key: jsii.String("key"),
			Operator: filterOperator,
			Value: filterValue,
		},
	},
	SamplingPercentage: jsii.Number(123),
	SessionTimeout: cdk.Duration_Minutes(jsii.Number(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*string required #
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).