Class: AWSCDK::BedrockAgentCore::OnlineEvaluationConfigProps
- Inherits:
-
OnlineEvaluationBaseProps
- Object
- OnlineEvaluationBaseProps
- AWSCDK::BedrockAgentCore::OnlineEvaluationConfigProps
- Defined in:
- bedrock_agent_core/online_evaluation_config_props.rb
Overview
Properties for creating an OnlineEvaluationConfig.
Instance Attribute Summary collapse
-
#data_source ⇒ AWSCDK::BedrockAgentCore::DataSourceConfig
readonly
The data source configuration that specifies where to read agent traces from.
-
#description ⇒ String?
readonly
The description of the online evaluation configuration.
-
#evaluators ⇒ Array<AWSCDK::BedrockAgentCore::EvaluatorSelector>
readonly
The list of evaluators to apply during online evaluation.
-
#execution_role ⇒ AWSCDK::IAM::IRole?
readonly
The IAM role that provides permissions for the evaluation to access AWS services.
-
#execution_status ⇒ AWSCDK::BedrockAgentCore::ExecutionStatus?
readonly
The execution status of the online evaluation configuration.
-
#filters ⇒ Array<AWSCDK::BedrockAgentCore::FilterConfig>?
readonly
The list of filters that determine which agent traces should be evaluated.
-
#online_evaluation_config_name ⇒ String
readonly
The name of the online evaluation configuration.
-
#sampling_percentage ⇒ Numeric?
readonly
The percentage of agent traces to sample for evaluation.
-
#session_timeout ⇒ AWSCDK::Duration?
readonly
The duration of inactivity after which an agent session is considered complete and ready for evaluation.
-
#tags ⇒ Hash{String => String}?
readonly
Tags for the online evaluation configuration.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(online_evaluation_config_name:, description: nil, execution_role: nil, execution_status: nil, filters: nil, sampling_percentage: nil, session_timeout: nil, data_source:, evaluators:, tags: nil) ⇒ OnlineEvaluationConfigProps
constructor
A new instance of OnlineEvaluationConfigProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(online_evaluation_config_name:, description: nil, execution_role: nil, execution_status: nil, filters: nil, sampling_percentage: nil, session_timeout: nil, data_source:, evaluators:, tags: nil) ⇒ OnlineEvaluationConfigProps
Returns a new instance of OnlineEvaluationConfigProps.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'bedrock_agent_core/online_evaluation_config_props.rb', line 17 def initialize(online_evaluation_config_name:, description: nil, execution_role: nil, execution_status: nil, filters: nil, sampling_percentage: nil, session_timeout: nil, data_source:, evaluators:, tags: nil) @online_evaluation_config_name = online_evaluation_config_name Jsii::Type.check_type(@online_evaluation_config_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "onlineEvaluationConfigName") @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @execution_role = execution_role Jsii::Type.check_type(@execution_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "executionRole") unless @execution_role.nil? @execution_status = execution_status Jsii::Type.check_type(@execution_status, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5FeGVjdXRpb25TdGF0dXMifQ==")), "executionStatus") unless @execution_status.nil? @filters = filters.is_a?(Array) ? filters.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::FilterConfig.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : filters Jsii::Type.check_type(@filters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkZpbHRlckNvbmZpZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "filters") unless @filters.nil? @sampling_percentage = sampling_percentage Jsii::Type.check_type(@sampling_percentage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "samplingPercentage") unless @sampling_percentage.nil? @session_timeout = session_timeout Jsii::Type.check_type(@session_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "sessionTimeout") unless @session_timeout.nil? @data_source = data_source Jsii::Type.check_type(@data_source, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5EYXRhU291cmNlQ29uZmlnIn0=")), "dataSource") @evaluators = evaluators Jsii::Type.check_type(@evaluators, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkV2YWx1YXRvclNlbGVjdG9yIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "evaluators") @tags = Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil? end |
Instance Attribute Details
#data_source ⇒ AWSCDK::BedrockAgentCore::DataSourceConfig (readonly)
The data source configuration that specifies where to read agent traces from.
89 90 91 |
# File 'bedrock_agent_core/online_evaluation_config_props.rb', line 89 def data_source @data_source end |
#description ⇒ String? (readonly)
Default: - No description
The description of the online evaluation configuration.
51 52 53 |
# File 'bedrock_agent_core/online_evaluation_config_props.rb', line 51 def description @description end |
#evaluators ⇒ Array<AWSCDK::BedrockAgentCore::EvaluatorSelector> (readonly)
The list of evaluators to apply during online evaluation.
Can include both built-in evaluators and custom evaluators.
95 96 97 |
# File 'bedrock_agent_core/online_evaluation_config_props.rb', line 95 def evaluators @evaluators end |
#execution_role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - A new role will be created
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.
61 62 63 |
# File 'bedrock_agent_core/online_evaluation_config_props.rb', line 61 def execution_role @execution_role end |
#execution_status ⇒ AWSCDK::BedrockAgentCore::ExecutionStatus? (readonly)
Default: ExecutionStatus.ENABLED
The execution status of the online evaluation configuration.
Controls whether the evaluation actively processes agent traces.
68 69 70 |
# File 'bedrock_agent_core/online_evaluation_config_props.rb', line 68 def execution_status @execution_status end |
#filters ⇒ Array<AWSCDK::BedrockAgentCore::FilterConfig>? (readonly)
Default: - No filters (evaluate all sampled traces)
The list of filters that determine which agent traces should be evaluated.
73 74 75 |
# File 'bedrock_agent_core/online_evaluation_config_props.rb', line 73 def filters @filters end |
#online_evaluation_config_name ⇒ String (readonly)
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.
46 47 48 |
# File 'bedrock_agent_core/online_evaluation_config_props.rb', line 46 def online_evaluation_config_name @online_evaluation_config_name end |
#sampling_percentage ⇒ Numeric? (readonly)
Default: 10
The percentage of agent traces to sample for evaluation.
78 79 80 |
# File 'bedrock_agent_core/online_evaluation_config_props.rb', line 78 def sampling_percentage @sampling_percentage end |
#session_timeout ⇒ AWSCDK::Duration? (readonly)
Default: 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).
85 86 87 |
# File 'bedrock_agent_core/online_evaluation_config_props.rb', line 85 def session_timeout @session_timeout end |
#tags ⇒ Hash{String => String}? (readonly)
Default: - No tags
Tags for the online evaluation configuration.
A list of key:value pairs of tags to apply to this OnlineEvaluationConfig resource.
102 103 104 |
# File 'bedrock_agent_core/online_evaluation_config_props.rb', line 102 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'bedrock_agent_core/online_evaluation_config_props.rb', line 104 def self.jsii_properties { :online_evaluation_config_name => "onlineEvaluationConfigName", :description => "description", :execution_role => "executionRole", :execution_status => "executionStatus", :filters => "filters", :sampling_percentage => "samplingPercentage", :session_timeout => "sessionTimeout", :data_source => "dataSource", :evaluators => "evaluators", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'bedrock_agent_core/online_evaluation_config_props.rb', line 119 def to_jsii result = {} result.merge!(super) result.merge!({ "onlineEvaluationConfigName" => @online_evaluation_config_name, "description" => @description, "executionRole" => @execution_role, "executionStatus" => @execution_status, "filters" => @filters, "samplingPercentage" => @sampling_percentage, "sessionTimeout" => @session_timeout, "dataSource" => @data_source, "evaluators" => @evaluators, "tags" => @tags, }) result.compact end |