Interface MemoryProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
MemoryProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.130.0 (build 048a5ee)",
date="2026-05-19T19:44:37.157Z")
@Stability(Stable)
public interface MemoryProps
extends software.amazon.jsii.JsiiSerializable
Properties for creating a Memory resource.
Example:
// Create a custom execution role
Role executionRole = Role.Builder.create(this, "MemoryExecutionRole")
.assumedBy(new ServicePrincipal("bedrock-agentcore.amazonaws.com"))
.managedPolicies(List.of(ManagedPolicy.fromAwsManagedPolicyName("AmazonBedrockAgentCoreMemoryBedrockModelInferenceExecutionRolePolicy")))
.build();
// Create memory with custom execution role
Memory memory = Memory.Builder.create(this, "MyMemory")
.memoryName("my_memory")
.description("Memory with custom execution role")
.expirationDuration(Duration.days(90))
.executionRole(executionRole)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forMemoryPropsstatic final classAn implementation forMemoryProps -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryProps.Builderbuilder()default StringOptional 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 IRoleThe IAM role that provides permissions for the memory to access AWS services when using custom strategies.default DurationShort-term memory expiration in days (between 7 and 365).default IKeyCustom KMS key to use for encryption.default StringThe 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 List<IMemoryStrategy> 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.getTags()Tags (optional) A list of key:value pairs of tags to apply to this memory resource.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getDescription
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
-
getExecutionRole
The IAM role that provides permissions for the memory to access AWS services when using custom strategies.Default: - A new role will be created.
-
getExpirationDuration
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
-
getKmsKey
Custom KMS key to use for encryption.Default: - Your data is encrypted with a key that AWS owns and manages for you
-
getMemoryName
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
-
getMemoryStrategies
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)
-
getTags
Tags (optional) A list of key:value pairs of tags to apply to this memory resource.Default: - no tags
-
builder
- Returns:
- a
MemoryProps.BuilderofMemoryProps
-