Class: AWSCDK::BedrockAgentCore::MemoryProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::BedrockAgentCore::MemoryProps
- Defined in:
- bedrock_agent_core/memory_props.rb
Overview
Properties for creating a Memory resource.
Instance Attribute Summary collapse
-
#description ⇒ String?
readonly
Optional description for the memory Valid characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and spaces The description can have up to 200 characters.
-
#execution_role ⇒ AWSCDK::IAM::IRole?
readonly
The IAM role that provides permissions for the memory to access AWS services when using custom strategies.
-
#expiration_duration ⇒ AWSCDK::Duration?
readonly
Short-term memory expiration in days (between 7 and 365).
-
#kms_key ⇒ AWSCDK::KMS::IKey?
readonly
Custom KMS key to use for encryption.
-
#memory_name ⇒ String?
readonly
The name of the memory Valid characters are a-z, A-Z, 0-9, _ (underscore) The name must start with a letter and can be up to 48 characters long Pattern: [a-zA-Z][a-zA-Z0-9_]0,47.
-
#memory_strategies ⇒ Array<AWSCDK::BedrockAgentCore::IMemoryStrategy>?
readonly
If you need long-term memory for context recall across sessions, you can setup memory extraction strategies to extract the relevant memory from the raw events.
-
#tags ⇒ Hash{String => String}?
readonly
Tags (optional) A list of key:value pairs of tags to apply to this memory resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(description: nil, execution_role: nil, expiration_duration: nil, kms_key: nil, memory_name: nil, memory_strategies: nil, tags: nil) ⇒ MemoryProps
constructor
A new instance of MemoryProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(description: nil, execution_role: nil, expiration_duration: nil, kms_key: nil, memory_name: nil, memory_strategies: nil, tags: nil) ⇒ MemoryProps
Returns a new instance of MemoryProps.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'bedrock_agent_core/memory_props.rb', line 14 def initialize(description: nil, execution_role: nil, expiration_duration: nil, kms_key: nil, memory_name: nil, memory_strategies: nil, tags: nil) @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? @expiration_duration = expiration_duration Jsii::Type.check_type(@expiration_duration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "expirationDuration") unless @expiration_duration.nil? @kms_key = kms_key Jsii::Type.check_type(@kms_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "kmsKey") unless @kms_key.nil? @memory_name = memory_name Jsii::Type.check_type(@memory_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "memoryName") unless @memory_name.nil? @memory_strategies = memory_strategies Jsii::Type.check_type(@memory_strategies, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLklNZW1vcnlTdHJhdGVneSJ9LCJraW5kIjoiYXJyYXkifX0=")), "memoryStrategies") unless @memory_strategies.nil? @tags = Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil? end |
Instance Attribute Details
#description ⇒ String? (readonly)
Default: - No description
Optional description for the memory Valid characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and spaces The description can have up to 200 characters.
35 36 37 |
# File 'bedrock_agent_core/memory_props.rb', line 35 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 memory to access AWS services when using custom strategies.
40 41 42 |
# File 'bedrock_agent_core/memory_props.rb', line 40 def execution_role @execution_role end |
#expiration_duration ⇒ AWSCDK::Duration? (readonly)
Default: - 90 days
Short-term memory expiration in days (between 7 and 365).
Sets the short-term (raw event) memory retention. Events older than the specified duration will expire and no longer be stored.
48 49 50 |
# File 'bedrock_agent_core/memory_props.rb', line 48 def expiration_duration @expiration_duration end |
#kms_key ⇒ AWSCDK::KMS::IKey? (readonly)
Default: - Your data is encrypted with a key that AWS owns and manages for you
Custom KMS key to use for encryption.
53 54 55 |
# File 'bedrock_agent_core/memory_props.rb', line 53 def kms_key @kms_key end |
#memory_name ⇒ String? (readonly)
Default: - auto generate
The name of the memory Valid characters are a-z, A-Z, 0-9, _ (underscore) The name must start with a letter and can be up to 48 characters long Pattern: [a-zA-Z][a-zA-Z0-9_]0,47.
58 59 60 |
# File 'bedrock_agent_core/memory_props.rb', line 58 def memory_name @memory_name end |
#memory_strategies ⇒ Array<AWSCDK::BedrockAgentCore::IMemoryStrategy>? (readonly)
Default: - No extraction strategies (short term memory only)
If you need long-term memory for context recall across sessions, you can setup memory extraction strategies to extract the relevant memory from the raw events.
63 64 65 |
# File 'bedrock_agent_core/memory_props.rb', line 63 def memory_strategies @memory_strategies end |
#tags ⇒ Hash{String => String}? (readonly)
Default: - no tags
Tags (optional) A list of key:value pairs of tags to apply to this memory resource.
68 69 70 |
# File 'bedrock_agent_core/memory_props.rb', line 68 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 |
# File 'bedrock_agent_core/memory_props.rb', line 70 def self.jsii_properties { :description => "description", :execution_role => "executionRole", :expiration_duration => "expirationDuration", :kms_key => "kmsKey", :memory_name => "memoryName", :memory_strategies => "memoryStrategies", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'bedrock_agent_core/memory_props.rb', line 82 def to_jsii result = {} result.merge!({ "description" => @description, "executionRole" => @execution_role, "expirationDuration" => @expiration_duration, "kmsKey" => @kms_key, "memoryName" => @memory_name, "memoryStrategies" => @memory_strategies, "tags" => @tags, }) result.compact end |