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 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

      @Stability(Stable) public Memory.Builder description(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.

      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

      @Stability(Stable) public Memory.Builder executionRole(IRole 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

      @Stability(Stable) public Memory.Builder expirationDuration(Duration 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

      @Stability(Stable) public Memory.Builder kmsKey(IKey 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

      @Stability(Stable) public Memory.Builder 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}.

      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

      @Stability(Stable) public Memory.Builder tags(Map<String,String> 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

      @Stability(Stable) public Memory build()
      Specified by:
      build in interface software.amazon.jsii.Builder<Memory>
      Returns:
      a newly built instance of Memory.