Interface MemoryProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
MemoryProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)",
date="2026-08-13T16:20:01.291Z")
@Stability(Stable)
public interface MemoryProps
extends software.amazon.jsii.JsiiSerializable
Properties for creating a Memory resource.
Example:
// Create a Kinesis Data Stream
Stream stream = Stream.Builder.create(this, "MemoryEventStream")
.streamName("memory-events")
.build();
Memory memory = Memory.Builder.create(this, "MemoryWithStreamDelivery")
.memoryName("memory_with_stream")
.description("Memory with Kinesis stream delivery")
.expirationDuration(Duration.days(90))
.streamDeliveryResources(List.of(StreamDeliveryResource.kinesis(stream, KinesisStreamDeliveryOptions.builder()
.contentConfigurations(List.of(StreamDeliveryContentConfiguration.builder()
.type(StreamDeliveryContentType.MEMORY_RECORDS)
.level(StreamDeliveryContentLevel.METADATA_ONLY)
.build()))
.build())))
.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.default List<StreamDeliveryResource> Stream delivery resources for real-time push-based streaming of memory record lifecycle events (created, updated, deleted) to Amazon Kinesis Data Streams.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)
-
getStreamDeliveryResources
Stream delivery resources for real-time push-based streaming of memory record lifecycle events (created, updated, deleted) to Amazon Kinesis Data Streams.The memory execution role will automatically be granted write permissions to each stream.
Only one stream delivery resource is currently supported (CloudFormation maximum); providing more than one fails at synth with
TooManyStreamDeliveryResources:IStream stream; Memory.Builder.create(this, "Memory") .streamDeliveryResources(List.of(StreamDeliveryResource.kinesis(stream, KinesisStreamDeliveryOptions.builder() .contentConfigurations(List.of(StreamDeliveryContentConfiguration.builder() .type(StreamDeliveryContentType.MEMORY_RECORDS) .level(StreamDeliveryContentLevel.METADATA_ONLY) .build())) .build()))) .build();Default: - No stream delivery (events are not pushed to Kinesis)
- See Also:
-
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
-