Class Memory.Builder
java.lang.Object
software.amazon.awscdk.services.bedrockagentcore.Memory.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Memory>
- Enclosing class:
Memory
@Stability(Stable)
public static final class Memory.Builder
extends Object
implements software.amazon.jsii.Builder<Memory>
A fluent builder for
Memory.-
Method Summary
Modifier and TypeMethodDescriptionbuild()static Memory.Builderdescription(String 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.executionRole(IRole executionRole) The IAM role that provides permissions for the memory to access AWS services when using custom strategies.expirationDuration(Duration expirationDuration) Short-term memory expiration in days (between 7 and 365).Custom KMS key to use for encryption.memoryName(String memoryName) 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}.memoryStrategies(List<? extends IMemoryStrategy> memoryStrategies) 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 (optional) A list of key:value pairs of tags to apply to this memory resource.
-
Method Details
-
create
@Stability(Stable) public static Memory.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope- This parameter is required.id- This parameter is required.- Returns:
- a new instance of
Memory.Builder.
-
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.Default: - No description
- Parameters:
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. This parameter is required.- Returns:
this
-
executionRole
The IAM role that provides permissions for the memory to access AWS services when using custom strategies.Default: - A new role will be created.
- Parameters:
executionRole- The IAM role that provides permissions for the memory to access AWS services when using custom strategies. This parameter is required.- Returns:
this
-
expirationDuration
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.
Default: - 90 days
- Parameters:
expirationDuration- Short-term memory expiration in days (between 7 and 365). This parameter is required.- Returns:
this
-
kmsKey
Custom KMS key to use for encryption.Default: - Your data is encrypted with a key that AWS owns and manages for you
- Parameters:
kmsKey- Custom KMS key to use for encryption. This parameter is required.- Returns:
this
-
memoryName
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}.Default: - auto generate
- Parameters:
memoryName- 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}. This parameter is required.- Returns:
this
-
memoryStrategies
@Stability(Stable) public Memory.Builder memoryStrategies(List<? extends IMemoryStrategy> memoryStrategies) 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.Default: - No extraction strategies (short term memory only)
- Parameters:
memoryStrategies- 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. This parameter is required.- Returns:
this
-
tags
Tags (optional) A list of key:value pairs of tags to apply to this memory resource.Default: - no tags
- Parameters:
tags- Tags (optional) A list of key:value pairs of tags to apply to this memory resource. This parameter is required.- Returns:
this
-
build
-