Class: AWSCDK::Bedrock::CfnAgentProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
bedrock/cfn_agent_props.rb

Overview

Properties for defining a CfnAgent.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(agent_name:, action_groups: nil, agent_collaboration: nil, agent_collaborators: nil, agent_resource_role_arn: nil, auto_prepare: nil, customer_encryption_key_arn: nil, custom_orchestration: nil, description: nil, foundation_model: nil, guardrail_configuration: nil, idle_session_ttl_in_seconds: nil, instruction: nil, knowledge_bases: nil, memory_configuration: nil, orchestration_type: nil, prompt_override_configuration: nil, skip_resource_in_use_check_on_delete: nil, tags: nil, test_alias_tags: nil) ⇒ CfnAgentProps

Returns a new instance of CfnAgentProps.

Parameters:



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
62
63
64
65
66
67
68
69
70
# File 'bedrock/cfn_agent_props.rb', line 29

def initialize(agent_name:, action_groups: nil, agent_collaboration: nil, agent_collaborators: nil, agent_resource_role_arn: nil, auto_prepare: nil, customer_encryption_key_arn: nil, custom_orchestration: nil, description: nil, foundation_model: nil, guardrail_configuration: nil, idle_session_ttl_in_seconds: nil, instruction: nil, knowledge_bases: nil, memory_configuration: nil, orchestration_type: nil, prompt_override_configuration: nil, skip_resource_in_use_check_on_delete: nil, tags: nil, test_alias_tags: nil)
  @agent_name = agent_name
  Jsii::Type.check_type(@agent_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "agentName")
  @action_groups = action_groups
  Jsii::Type.check_type(@action_groups, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9jay5DZm5BZ2VudC5BZ2VudEFjdGlvbkdyb3VwUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "actionGroups") unless @action_groups.nil?
  @agent_collaboration = agent_collaboration
  Jsii::Type.check_type(@agent_collaboration, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "agentCollaboration") unless @agent_collaboration.nil?
  @agent_collaborators = agent_collaborators
  Jsii::Type.check_type(@agent_collaborators, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9jay5DZm5BZ2VudC5BZ2VudENvbGxhYm9yYXRvclByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "agentCollaborators") unless @agent_collaborators.nil?
  @agent_resource_role_arn = agent_resource_role_arn
  Jsii::Type.check_type(@agent_resource_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "agentResourceRoleArn") unless @agent_resource_role_arn.nil?
  @auto_prepare = auto_prepare
  Jsii::Type.check_type(@auto_prepare, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "autoPrepare") unless @auto_prepare.nil?
  @customer_encryption_key_arn = customer_encryption_key_arn
  Jsii::Type.check_type(@customer_encryption_key_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "customerEncryptionKeyArn") unless @customer_encryption_key_arn.nil?
  @custom_orchestration = custom_orchestration.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnAgent::CustomOrchestrationProperty.new(**custom_orchestration.transform_keys(&:to_sym)) : custom_orchestration
  Jsii::Type.check_type(@custom_orchestration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkFnZW50LkN1c3RvbU9yY2hlc3RyYXRpb25Qcm9wZXJ0eSJ9XX19")), "customOrchestration") unless @custom_orchestration.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @foundation_model = foundation_model
  Jsii::Type.check_type(@foundation_model, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "foundationModel") unless @foundation_model.nil?
  @guardrail_configuration = guardrail_configuration.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnAgent::GuardrailConfigurationProperty.new(**guardrail_configuration.transform_keys(&:to_sym)) : guardrail_configuration
  Jsii::Type.check_type(@guardrail_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkFnZW50Lkd1YXJkcmFpbENvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "guardrailConfiguration") unless @guardrail_configuration.nil?
  @idle_session_ttl_in_seconds = idle_session_ttl_in_seconds
  Jsii::Type.check_type(@idle_session_ttl_in_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "idleSessionTtlInSeconds") unless @idle_session_ttl_in_seconds.nil?
  @instruction = instruction
  Jsii::Type.check_type(@instruction, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instruction") unless @instruction.nil?
  @knowledge_bases = knowledge_bases
  Jsii::Type.check_type(@knowledge_bases, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9jay5DZm5BZ2VudC5BZ2VudEtub3dsZWRnZUJhc2VQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "knowledgeBases") unless @knowledge_bases.nil?
  @memory_configuration = memory_configuration.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnAgent::MemoryConfigurationProperty.new(**memory_configuration.transform_keys(&:to_sym)) : memory_configuration
  Jsii::Type.check_type(@memory_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkFnZW50Lk1lbW9yeUNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "memoryConfiguration") unless @memory_configuration.nil?
  @orchestration_type = orchestration_type
  Jsii::Type.check_type(@orchestration_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "orchestrationType") unless @orchestration_type.nil?
  @prompt_override_configuration = prompt_override_configuration.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnAgent::PromptOverrideConfigurationProperty.new(**prompt_override_configuration.transform_keys(&:to_sym)) : prompt_override_configuration
  Jsii::Type.check_type(@prompt_override_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkFnZW50LlByb21wdE92ZXJyaWRlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "promptOverrideConfiguration") unless @prompt_override_configuration.nil?
  @skip_resource_in_use_check_on_delete = skip_resource_in_use_check_on_delete
  Jsii::Type.check_type(@skip_resource_in_use_check_on_delete, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "skipResourceInUseCheckOnDelete") unless @skip_resource_in_use_check_on_delete.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
  @test_alias_tags = test_alias_tags
  Jsii::Type.check_type(@test_alias_tags, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "testAliasTags") unless @test_alias_tags.nil?
end

Instance Attribute Details

#action_groupsAWSCDK::IResolvable, ... (readonly)

The action groups that belong to an agent.



81
82
83
# File 'bedrock/cfn_agent_props.rb', line 81

def action_groups
  @action_groups
end

#agent_collaborationString? (readonly)

The agent's collaboration settings.



86
87
88
# File 'bedrock/cfn_agent_props.rb', line 86

def agent_collaboration
  @agent_collaboration
end

#agent_collaboratorsAWSCDK::IResolvable, ... (readonly)

List of Agent Collaborators.



91
92
93
# File 'bedrock/cfn_agent_props.rb', line 91

def agent_collaborators
  @agent_collaborators
end

#agent_nameString (readonly)

The name of the agent.



76
77
78
# File 'bedrock/cfn_agent_props.rb', line 76

def agent_name
  @agent_name
end

#agent_resource_role_arnString? (readonly)

The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.



96
97
98
# File 'bedrock/cfn_agent_props.rb', line 96

def agent_resource_role_arn
  @agent_resource_role_arn
end

#auto_prepareBoolean, ... (readonly)

Note:

Default: - false

Specifies whether to automatically update the DRAFT version of the agent after making changes to the agent.

The DRAFT version can be continually iterated upon during internal development. By default, this value is false .



104
105
106
# File 'bedrock/cfn_agent_props.rb', line 104

def auto_prepare
  @auto_prepare
end

#custom_orchestrationAWSCDK::IResolvable, ... (readonly)

Contains custom orchestration configurations for the agent.



114
115
116
# File 'bedrock/cfn_agent_props.rb', line 114

def custom_orchestration
  @custom_orchestration
end

#customer_encryption_key_arnString? (readonly)

The Amazon Resource Name (ARN) of the AWS key that encrypts the agent.



109
110
111
# File 'bedrock/cfn_agent_props.rb', line 109

def customer_encryption_key_arn
  @customer_encryption_key_arn
end

#descriptionString? (readonly)

The description of the agent.



119
120
121
# File 'bedrock/cfn_agent_props.rb', line 119

def description
  @description
end

#foundation_modelString? (readonly)

The foundation model used for orchestration by the agent.



124
125
126
# File 'bedrock/cfn_agent_props.rb', line 124

def foundation_model
  @foundation_model
end

#guardrail_configurationAWSCDK::IResolvable, ... (readonly)

Details about the guardrail associated with the agent.



129
130
131
# File 'bedrock/cfn_agent_props.rb', line 129

def guardrail_configuration
  @guardrail_configuration
end

#idle_session_ttl_in_secondsNumeric? (readonly)

The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.

A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout.



136
137
138
# File 'bedrock/cfn_agent_props.rb', line 136

def idle_session_ttl_in_seconds
  @idle_session_ttl_in_seconds
end

#instructionString? (readonly)

Instructions that tell the agent what it should do and how it should interact with users.



141
142
143
# File 'bedrock/cfn_agent_props.rb', line 141

def instruction
  @instruction
end

#knowledge_basesAWSCDK::IResolvable, ... (readonly)

The knowledge bases associated with the agent.



146
147
148
# File 'bedrock/cfn_agent_props.rb', line 146

def knowledge_bases
  @knowledge_bases
end

#memory_configurationAWSCDK::IResolvable, ... (readonly)

Contains memory configuration for the agent.



151
152
153
# File 'bedrock/cfn_agent_props.rb', line 151

def memory_configuration
  @memory_configuration
end

#orchestration_typeString? (readonly)

Specifies the orchestration strategy for the agent.



156
157
158
# File 'bedrock/cfn_agent_props.rb', line 156

def orchestration_type
  @orchestration_type
end

#prompt_override_configurationAWSCDK::IResolvable, ... (readonly)

Contains configurations to override prompt templates in different parts of an agent sequence.

For more information, see Advanced prompts .



163
164
165
# File 'bedrock/cfn_agent_props.rb', line 163

def prompt_override_configuration
  @prompt_override_configuration
end

#skip_resource_in_use_check_on_deleteBoolean, ... (readonly)

Note:

Default: - false

Specifies whether to delete the resource even if it's in use.

By default, this value is false .



171
172
173
# File 'bedrock/cfn_agent_props.rb', line 171

def skip_resource_in_use_check_on_delete
  @skip_resource_in_use_check_on_delete
end

#tagsHash{String => String}? (readonly)

Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:.



179
180
181
# File 'bedrock/cfn_agent_props.rb', line 179

def tags
  @tags
end

#test_alias_tagsAWSCDK::IResolvable, ... (readonly)

Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:.



187
188
189
# File 'bedrock/cfn_agent_props.rb', line 187

def test_alias_tags
  @test_alias_tags
end

Class Method Details

.jsii_propertiesObject



189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# File 'bedrock/cfn_agent_props.rb', line 189

def self.jsii_properties
  {
    :agent_name => "agentName",
    :action_groups => "actionGroups",
    :agent_collaboration => "agentCollaboration",
    :agent_collaborators => "agentCollaborators",
    :agent_resource_role_arn => "agentResourceRoleArn",
    :auto_prepare => "autoPrepare",
    :customer_encryption_key_arn => "customerEncryptionKeyArn",
    :custom_orchestration => "customOrchestration",
    :description => "description",
    :foundation_model => "foundationModel",
    :guardrail_configuration => "guardrailConfiguration",
    :idle_session_ttl_in_seconds => "idleSessionTtlInSeconds",
    :instruction => "instruction",
    :knowledge_bases => "knowledgeBases",
    :memory_configuration => "memoryConfiguration",
    :orchestration_type => "orchestrationType",
    :prompt_override_configuration => "promptOverrideConfiguration",
    :skip_resource_in_use_check_on_delete => "skipResourceInUseCheckOnDelete",
    :tags => "tags",
    :test_alias_tags => "testAliasTags",
  }
end

Instance Method Details

#to_jsiiObject



214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
# File 'bedrock/cfn_agent_props.rb', line 214

def to_jsii
  result = {}
  result.merge!({
    "agentName" => @agent_name,
    "actionGroups" => @action_groups,
    "agentCollaboration" => @agent_collaboration,
    "agentCollaborators" => @agent_collaborators,
    "agentResourceRoleArn" => @agent_resource_role_arn,
    "autoPrepare" => @auto_prepare,
    "customerEncryptionKeyArn" => @customer_encryption_key_arn,
    "customOrchestration" => @custom_orchestration,
    "description" => @description,
    "foundationModel" => @foundation_model,
    "guardrailConfiguration" => @guardrail_configuration,
    "idleSessionTtlInSeconds" => @idle_session_ttl_in_seconds,
    "instruction" => @instruction,
    "knowledgeBases" => @knowledge_bases,
    "memoryConfiguration" => @memory_configuration,
    "orchestrationType" => @orchestration_type,
    "promptOverrideConfiguration" => @prompt_override_configuration,
    "skipResourceInUseCheckOnDelete" => @skip_resource_in_use_check_on_delete,
    "tags" => @tags,
    "testAliasTags" => @test_alias_tags,
  })
  result.compact
end