Class: AWSCDK::BedrockAgentCore::OnlineEvaluationBaseProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::BedrockAgentCore::OnlineEvaluationBaseProps
- Defined in:
- bedrock_agent_core/online_evaluation_base_props.rb
Overview
Base properties for creating an OnlineEvaluationConfig.
The actual OnlineEvaluationProps is defined in online-evaluation-config.ts to avoid circular dependencies.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#description ⇒ String?
readonly
The description of the online evaluation configuration.
-
#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.
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) ⇒ OnlineEvaluationBaseProps
constructor
A new instance of OnlineEvaluationBaseProps.
- #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) ⇒ OnlineEvaluationBaseProps
Returns a new instance of OnlineEvaluationBaseProps.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'bedrock_agent_core/online_evaluation_base_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) @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? end |
Instance Attribute Details
#description ⇒ String? (readonly)
Default: - No description
The description of the online evaluation configuration.
45 46 47 |
# File 'bedrock_agent_core/online_evaluation_base_props.rb', line 45 def description @description 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.
55 56 57 |
# File 'bedrock_agent_core/online_evaluation_base_props.rb', line 55 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.
62 63 64 |
# File 'bedrock_agent_core/online_evaluation_base_props.rb', line 62 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.
67 68 69 |
# File 'bedrock_agent_core/online_evaluation_base_props.rb', line 67 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.
40 41 42 |
# File 'bedrock_agent_core/online_evaluation_base_props.rb', line 40 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.
72 73 74 |
# File 'bedrock_agent_core/online_evaluation_base_props.rb', line 72 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).
79 80 81 |
# File 'bedrock_agent_core/online_evaluation_base_props.rb', line 79 def session_timeout @session_timeout end |
Class Method Details
.jsii_properties ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 |
# File 'bedrock_agent_core/online_evaluation_base_props.rb', line 81 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", } end |
Instance Method Details
#to_jsii ⇒ Object
93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'bedrock_agent_core/online_evaluation_base_props.rb', line 93 def to_jsii result = {} result.merge!({ "onlineEvaluationConfigName" => @online_evaluation_config_name, "description" => @description, "executionRole" => @execution_role, "executionStatus" => @execution_status, "filters" => @filters, "samplingPercentage" => @sampling_percentage, "sessionTimeout" => @session_timeout, }) result.compact end |