Class: AWSCDK::BedrockAgentCore::CfnEvaluatorProps

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

Overview

Properties for defining a CfnEvaluator.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(evaluator_config:, evaluator_name:, level:, description: nil, kms_key_arn: nil, tags: nil) ⇒ CfnEvaluatorProps

Returns a new instance of CfnEvaluatorProps.

Parameters:

  • evaluator_config (AWSCDK::IResolvable, AWSCDK::BedrockAgentCore::CfnEvaluator::EvaluatorConfigProperty)

    The configuration that defines how an evaluator assesses agent performance.

  • evaluator_name (String)

    The name of the evaluator.

  • level (String)
  • description (String, nil) (defaults to: nil)

    The description of the evaluator.

  • kms_key_arn (String, nil) (defaults to: nil)

    The ARN of the KMS key used to encrypt evaluator data.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    A list of tags to assign to the evaluator.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'bedrock_agent_core/cfn_evaluator_props.rb', line 15

def initialize(evaluator_config:, evaluator_name:, level:, description: nil, kms_key_arn: nil, tags: nil)
  @evaluator_config = evaluator_config.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::CfnEvaluator::EvaluatorConfigProperty.new(**evaluator_config.transform_keys(&:to_sym)) : evaluator_config
  Jsii::Type.check_type(@evaluator_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkNmbkV2YWx1YXRvci5FdmFsdWF0b3JDb25maWdQcm9wZXJ0eSJ9XX19")), "evaluatorConfig")
  @evaluator_name = evaluator_name
  Jsii::Type.check_type(@evaluator_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "evaluatorName")
  @level = level
  Jsii::Type.check_type(@level, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "level")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @kms_key_arn = kms_key_arn
  Jsii::Type.check_type(@kms_key_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kmsKeyArn") unless @kms_key_arn.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

The description of the evaluator.



49
50
51
# File 'bedrock_agent_core/cfn_evaluator_props.rb', line 49

def description
  @description
end

#evaluator_configAWSCDK::IResolvable, AWSCDK::BedrockAgentCore::CfnEvaluator::EvaluatorConfigProperty (readonly)

The configuration that defines how an evaluator assesses agent performance.



34
35
36
# File 'bedrock_agent_core/cfn_evaluator_props.rb', line 34

def evaluator_config
  @evaluator_config
end

#evaluator_nameString (readonly)

The name of the evaluator.

Must be unique within your account.



41
42
43
# File 'bedrock_agent_core/cfn_evaluator_props.rb', line 41

def evaluator_name
  @evaluator_name
end

#kms_key_arnString? (readonly)

The ARN of the KMS key used to encrypt evaluator data.



54
55
56
# File 'bedrock_agent_core/cfn_evaluator_props.rb', line 54

def kms_key_arn
  @kms_key_arn
end

#levelString (readonly)



44
45
46
# File 'bedrock_agent_core/cfn_evaluator_props.rb', line 44

def level
  @level
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

A list of tags to assign to the evaluator.



59
60
61
# File 'bedrock_agent_core/cfn_evaluator_props.rb', line 59

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



61
62
63
64
65
66
67
68
69
70
# File 'bedrock_agent_core/cfn_evaluator_props.rb', line 61

def self.jsii_properties
  {
    :evaluator_config => "evaluatorConfig",
    :evaluator_name => "evaluatorName",
    :level => "level",
    :description => "description",
    :kms_key_arn => "kmsKeyArn",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



72
73
74
75
76
77
78
79
80
81
82
83
# File 'bedrock_agent_core/cfn_evaluator_props.rb', line 72

def to_jsii
  result = {}
  result.merge!({
    "evaluatorConfig" => @evaluator_config,
    "evaluatorName" => @evaluator_name,
    "level" => @level,
    "description" => @description,
    "kmsKeyArn" => @kms_key_arn,
    "tags" => @tags,
  })
  result.compact
end