Class OnlineEvaluationConfig.Builder

java.lang.Object
software.amazon.awscdk.services.bedrockagentcore.OnlineEvaluationConfig.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<OnlineEvaluationConfig>
Enclosing class:
OnlineEvaluationConfig

@Stability(Stable) public static final class OnlineEvaluationConfig.Builder extends Object implements software.amazon.jsii.Builder<OnlineEvaluationConfig>
A fluent builder for OnlineEvaluationConfig.
  • Method Details

    • create

      @Stability(Stable) public static OnlineEvaluationConfig.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of OnlineEvaluationConfig.Builder.
    • onlineEvaluationConfigName

      @Stability(Stable) public OnlineEvaluationConfig.Builder onlineEvaluationConfigName(String onlineEvaluationConfigName)
      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.

      Parameters:
      onlineEvaluationConfigName - The name of the online evaluation configuration. This parameter is required.
      Returns:
      this
    • description

      @Stability(Stable) public OnlineEvaluationConfig.Builder description(String description)
      The description of the online evaluation configuration.

      Default: - No description

      Parameters:
      description - The description of the online evaluation configuration. This parameter is required.
      Returns:
      this
    • executionRole

      @Stability(Stable) public OnlineEvaluationConfig.Builder executionRole(IRole executionRole)
      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

      Parameters:
      executionRole - The IAM role that provides permissions for the evaluation to access AWS services. This parameter is required.
      Returns:
      this
    • executionStatus

      @Stability(Stable) public OnlineEvaluationConfig.Builder executionStatus(ExecutionStatus executionStatus)
      The execution status of the online evaluation configuration.

      Controls whether the evaluation actively processes agent traces.

      Default: ExecutionStatus.ENABLED

      Parameters:
      executionStatus - The execution status of the online evaluation configuration. This parameter is required.
      Returns:
      this
    • filters

      @Stability(Stable) public OnlineEvaluationConfig.Builder filters(List<? extends FilterConfig> filters)
      The list of filters that determine which agent traces should be evaluated.

      Default: - No filters (evaluate all sampled traces)

      Parameters:
      filters - The list of filters that determine which agent traces should be evaluated. This parameter is required.
      Returns:
      this
    • samplingPercentage

      @Stability(Stable) public OnlineEvaluationConfig.Builder samplingPercentage(Number samplingPercentage)
      The percentage of agent traces to sample for evaluation.

      Default: 10

      Parameters:
      samplingPercentage - The percentage of agent traces to sample for evaluation. This parameter is required.
      Returns:
      this
    • sessionTimeout

      @Stability(Stable) public OnlineEvaluationConfig.Builder sessionTimeout(Duration sessionTimeout)
      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)

      Parameters:
      sessionTimeout - The duration of inactivity after which an agent session is considered complete and ready for evaluation. This parameter is required.
      Returns:
      this
    • dataSource

      @Stability(Stable) public OnlineEvaluationConfig.Builder dataSource(DataSourceConfig dataSource)
      The data source configuration that specifies where to read agent traces from.

      Parameters:
      dataSource - The data source configuration that specifies where to read agent traces from. This parameter is required.
      Returns:
      this
    • evaluators

      @Stability(Stable) public OnlineEvaluationConfig.Builder evaluators(List<? extends EvaluatorSelector> evaluators)
      The list of evaluators to apply during online evaluation.

      Can include both built-in evaluators and custom evaluators.

      Parameters:
      evaluators - The list of evaluators to apply during online evaluation. This parameter is required.
      Returns:
      this
    • tags

      @Stability(Stable) public OnlineEvaluationConfig.Builder tags(Map<String,String> tags)
      Tags for the online evaluation configuration.

      A list of key:value pairs of tags to apply to this OnlineEvaluationConfig resource.

      Default: - No tags

      Parameters:
      tags - Tags for the online evaluation configuration. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public OnlineEvaluationConfig build()
      Specified by:
      build in interface software.amazon.jsii.Builder<OnlineEvaluationConfig>
      Returns:
      a newly built instance of OnlineEvaluationConfig.