Class: AWSCDK::BedrockAgentCore::CfnHarnessProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::BedrockAgentCore::CfnHarnessProps
- Defined in:
- bedrock_agent_core/cfn_harness_props.rb
Overview
Properties for defining a CfnHarness.
Instance Attribute Summary collapse
-
#allowed_tools ⇒ Array<String>?
readonly
The tools that the agent is allowed to use.
- #authorizer_configuration ⇒ AWSCDK::IResolvable, ... readonly
- #environment ⇒ AWSCDK::IResolvable, ... readonly
- #environment_artifact ⇒ AWSCDK::IResolvable, ... readonly
-
#environment_variables ⇒ AWSCDK::IResolvable, ...
readonly
Environment variables to set in the harness runtime environment.
-
#execution_role_arn ⇒ String
readonly
The ARN of the IAM role that the harness assumes when running.
-
#harness_name ⇒ String
readonly
The name of the harness.
-
#max_iterations ⇒ Numeric?
readonly
The maximum number of iterations the agent loop can execute per invocation.
-
#max_tokens ⇒ Numeric?
readonly
The maximum number of tokens the agent can generate per iteration.
- #memory ⇒ AWSCDK::IResolvable, ... readonly
- #model ⇒ AWSCDK::IResolvable, AWSCDK::BedrockAgentCore::CfnHarness::HarnessModelConfigurationProperty readonly
-
#skills ⇒ AWSCDK::IResolvable, ...
readonly
The skills available to the agent.
-
#system_prompt ⇒ AWSCDK::IResolvable, ...
readonly
The system prompt that defines the agent's behavior.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
Tags to apply to the harness resource.
-
#timeout_seconds ⇒ Numeric?
readonly
The maximum duration in seconds for the agent loop execution per invocation.
-
#tools ⇒ AWSCDK::IResolvable, ...
readonly
The tools available to the agent.
- #truncation ⇒ AWSCDK::IResolvable, ... readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(execution_role_arn:, harness_name:, model:, allowed_tools: nil, authorizer_configuration: nil, environment: nil, environment_artifact: nil, environment_variables: nil, max_iterations: nil, max_tokens: nil, memory: nil, skills: nil, system_prompt: nil, tags: nil, timeout_seconds: nil, tools: nil, truncation: nil) ⇒ CfnHarnessProps
constructor
A new instance of CfnHarnessProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(execution_role_arn:, harness_name:, model:, allowed_tools: nil, authorizer_configuration: nil, environment: nil, environment_artifact: nil, environment_variables: nil, max_iterations: nil, max_tokens: nil, memory: nil, skills: nil, system_prompt: nil, tags: nil, timeout_seconds: nil, tools: nil, truncation: nil) ⇒ CfnHarnessProps
Returns a new instance of CfnHarnessProps.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 26 def initialize(execution_role_arn:, harness_name:, model:, allowed_tools: nil, authorizer_configuration: nil, environment: nil, environment_artifact: nil, environment_variables: nil, max_iterations: nil, max_tokens: nil, memory: nil, skills: nil, system_prompt: nil, tags: nil, timeout_seconds: nil, tools: nil, truncation: nil) @execution_role_arn = execution_role_arn Jsii::Type.check_type(@execution_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "executionRoleArn") @harness_name = harness_name Jsii::Type.check_type(@harness_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "harnessName") @model = model.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::CfnHarness::HarnessModelConfigurationProperty.new(**model.transform_keys(&:to_sym)) : model Jsii::Type.check_type(@model, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkNmbkhhcm5lc3MuSGFybmVzc01vZGVsQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "model") @allowed_tools = allowed_tools Jsii::Type.check_type(@allowed_tools, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "allowedTools") unless @allowed_tools.nil? @authorizer_configuration = .is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::CfnHarness::AuthorizerConfigurationProperty.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@authorizer_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkNmbkhhcm5lc3MuQXV0aG9yaXplckNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "authorizerConfiguration") unless @authorizer_configuration.nil? @environment = environment.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::CfnHarness::HarnessEnvironmentProviderProperty.new(**environment.transform_keys(&:to_sym)) : environment Jsii::Type.check_type(@environment, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkNmbkhhcm5lc3MuSGFybmVzc0Vudmlyb25tZW50UHJvdmlkZXJQcm9wZXJ0eSJ9XX19")), "environment") unless @environment.nil? @environment_artifact = environment_artifact.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::CfnHarness::HarnessEnvironmentArtifactProperty.new(**environment_artifact.transform_keys(&:to_sym)) : environment_artifact Jsii::Type.check_type(@environment_artifact, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkNmbkhhcm5lc3MuSGFybmVzc0Vudmlyb25tZW50QXJ0aWZhY3RQcm9wZXJ0eSJ9XX19")), "environmentArtifact") unless @environment_artifact.nil? @environment_variables = environment_variables Jsii::Type.check_type(@environment_variables, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "environmentVariables") unless @environment_variables.nil? @max_iterations = max_iterations Jsii::Type.check_type(@max_iterations, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxIterations") unless @max_iterations.nil? @max_tokens = max_tokens Jsii::Type.check_type(@max_tokens, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxTokens") unless @max_tokens.nil? @memory = memory.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::CfnHarness::HarnessMemoryConfigurationProperty.new(**memory.transform_keys(&:to_sym)) : memory Jsii::Type.check_type(@memory, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkNmbkhhcm5lc3MuSGFybmVzc01lbW9yeUNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "memory") unless @memory.nil? @skills = skills Jsii::Type.check_type(@skills, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5DZm5IYXJuZXNzLkhhcm5lc3NTa2lsbFByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "skills") unless @skills.nil? @system_prompt = system_prompt Jsii::Type.check_type(@system_prompt, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5DZm5IYXJuZXNzLkhhcm5lc3NTeXN0ZW1Db250ZW50QmxvY2tQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "systemPrompt") unless @system_prompt.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? @timeout_seconds = timeout_seconds Jsii::Type.check_type(@timeout_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "timeoutSeconds") unless @timeout_seconds.nil? @tools = tools Jsii::Type.check_type(@tools, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5DZm5IYXJuZXNzLkhhcm5lc3NUb29sUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "tools") unless @tools.nil? @truncation = truncation.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::CfnHarness::HarnessTruncationConfigurationProperty.new(**truncation.transform_keys(&:to_sym)) : truncation Jsii::Type.check_type(@truncation, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkNmbkhhcm5lc3MuSGFybmVzc1RydW5jYXRpb25Db25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "truncation") unless @truncation.nil? end |
Instance Attribute Details
#allowed_tools ⇒ Array<String>? (readonly)
The tools that the agent is allowed to use.
80 81 82 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 80 def allowed_tools @allowed_tools end |
#authorizer_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
83 84 85 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 83 def @authorizer_configuration end |
#environment ⇒ AWSCDK::IResolvable, ... (readonly)
86 87 88 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 86 def environment @environment end |
#environment_artifact ⇒ AWSCDK::IResolvable, ... (readonly)
89 90 91 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 89 def environment_artifact @environment_artifact end |
#environment_variables ⇒ AWSCDK::IResolvable, ... (readonly)
Environment variables to set in the harness runtime environment.
94 95 96 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 94 def environment_variables @environment_variables end |
#execution_role_arn ⇒ String (readonly)
The ARN of the IAM role that the harness assumes when running.
67 68 69 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 67 def execution_role_arn @execution_role_arn end |
#harness_name ⇒ String (readonly)
The name of the harness.
72 73 74 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 72 def harness_name @harness_name end |
#max_iterations ⇒ Numeric? (readonly)
The maximum number of iterations the agent loop can execute per invocation.
99 100 101 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 99 def max_iterations @max_iterations end |
#max_tokens ⇒ Numeric? (readonly)
The maximum number of tokens the agent can generate per iteration.
104 105 106 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 104 def max_tokens @max_tokens end |
#memory ⇒ AWSCDK::IResolvable, ... (readonly)
107 108 109 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 107 def memory @memory end |
#model ⇒ AWSCDK::IResolvable, AWSCDK::BedrockAgentCore::CfnHarness::HarnessModelConfigurationProperty (readonly)
75 76 77 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 75 def model @model end |
#skills ⇒ AWSCDK::IResolvable, ... (readonly)
The skills available to the agent.
112 113 114 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 112 def skills @skills end |
#system_prompt ⇒ AWSCDK::IResolvable, ... (readonly)
The system prompt that defines the agent's behavior.
117 118 119 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 117 def system_prompt @system_prompt end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
Tags to apply to the harness resource.
122 123 124 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 122 def @tags end |
#timeout_seconds ⇒ Numeric? (readonly)
The maximum duration in seconds for the agent loop execution per invocation.
127 128 129 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 127 def timeout_seconds @timeout_seconds end |
#tools ⇒ AWSCDK::IResolvable, ... (readonly)
The tools available to the agent.
132 133 134 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 132 def tools @tools end |
#truncation ⇒ AWSCDK::IResolvable, ... (readonly)
135 136 137 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 135 def truncation @truncation end |
Class Method Details
.jsii_properties ⇒ Object
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 137 def self.jsii_properties { :execution_role_arn => "executionRoleArn", :harness_name => "harnessName", :model => "model", :allowed_tools => "allowedTools", :authorizer_configuration => "authorizerConfiguration", :environment => "environment", :environment_artifact => "environmentArtifact", :environment_variables => "environmentVariables", :max_iterations => "maxIterations", :max_tokens => "maxTokens", :memory => "memory", :skills => "skills", :system_prompt => "systemPrompt", :tags => "tags", :timeout_seconds => "timeoutSeconds", :tools => "tools", :truncation => "truncation", } end |
Instance Method Details
#to_jsii ⇒ Object
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'bedrock_agent_core/cfn_harness_props.rb', line 159 def to_jsii result = {} result.merge!({ "executionRoleArn" => @execution_role_arn, "harnessName" => @harness_name, "model" => @model, "allowedTools" => @allowed_tools, "authorizerConfiguration" => @authorizer_configuration, "environment" => @environment, "environmentArtifact" => @environment_artifact, "environmentVariables" => @environment_variables, "maxIterations" => @max_iterations, "maxTokens" => @max_tokens, "memory" => @memory, "skills" => @skills, "systemPrompt" => @system_prompt, "tags" => @tags, "timeoutSeconds" => @timeout_seconds, "tools" => @tools, "truncation" => @truncation, }) result.compact end |