Class: AWSCDK::BedrockAgentCore::FilterConfig

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
bedrock_agent_core/filter_config.rb

Overview

Filter configuration for online evaluation.

Filters determine which agent traces should be included in the evaluation based on trace properties.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, operator:, value:) ⇒ FilterConfig

Returns a new instance of FilterConfig.

Parameters:



13
14
15
16
17
18
19
20
# File 'bedrock_agent_core/filter_config.rb', line 13

def initialize(key:, operator:, value:)
  @key = key
  Jsii::Type.check_type(@key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key")
  @operator = operator
  Jsii::Type.check_type(@operator, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5GaWx0ZXJPcGVyYXRvciJ9")), "operator")
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5GaWx0ZXJWYWx1ZSJ9")), "value")
end

Instance Attribute Details

#keyString (readonly)

The key or field name to filter on within the agent trace data.

Examples:

"user.region"

Returns:

  • (String)


27
28
29
# File 'bedrock_agent_core/filter_config.rb', line 27

def key
  @key
end

#operatorAWSCDK::BedrockAgentCore::FilterOperator (readonly)

The comparison operator to use for filtering.



31
32
33
# File 'bedrock_agent_core/filter_config.rb', line 31

def operator
  @operator
end

#valueAWSCDK::BedrockAgentCore::FilterValue (readonly)

The value to compare against using the specified operator.

Use FilterValue.string(), FilterValue.number(), or FilterValue.boolean() to create typed filter values.



38
39
40
# File 'bedrock_agent_core/filter_config.rb', line 38

def value
  @value
end

Class Method Details

.jsii_propertiesObject



40
41
42
43
44
45
46
# File 'bedrock_agent_core/filter_config.rb', line 40

def self.jsii_properties
  {
    :key => "key",
    :operator => "operator",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



48
49
50
51
52
53
54
55
56
# File 'bedrock_agent_core/filter_config.rb', line 48

def to_jsii
  result = {}
  result.merge!({
    "key" => @key,
    "operator" => @operator,
    "value" => @value,
  })
  result.compact
end