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 Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A builder for MemoryProps
    static final class 
    An implementation for MemoryProps
  • Method Summary

    Modifier and Type
    Method
    Description
     
    default String
    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 IRole
    The IAM role that provides permissions for the memory to access AWS services when using custom strategies.
    default Duration
    Short-term memory expiration in days (between 7 and 365).
    default IKey
    Custom KMS key to use for encryption.
    default String
    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}.
    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 Map<String,String>
    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

      @Stability(Stable) @Nullable default String 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

      @Stability(Stable) @Nullable default IRole 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

      @Stability(Stable) @Nullable default Duration 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

      @Stability(Stable) @Nullable default IKey getKmsKey()
      Custom KMS key to use for encryption.

      Default: - Your data is encrypted with a key that AWS owns and manages for you

    • getMemoryName

      @Stability(Stable) @Nullable default String 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

      @Stability(Stable) @Nullable default List<IMemoryStrategy> 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

      @Stability(Stable) @Nullable default Map<String,String> getTags()
      Tags (optional) A list of key:value pairs of tags to apply to this memory resource.

      Default: - no tags

    • builder

      @Stability(Stable) static MemoryProps.Builder builder()
      Returns:
      a MemoryProps.Builder of MemoryProps