Class MemoryProps
(experimental) Properties for creating a Memory resource.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.Bedrock.Agentcore.Alpha
Assembly: Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.dll
Syntax (csharp)
public class MemoryProps : IMemoryProps
Syntax (vb)
Public Class MemoryProps Implements IMemoryProps
Remarks
Stability: Experimental
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock.Agentcore.Alpha;
using Amazon.CDK;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.AWS.KMS;
Key key;
IMemoryStrategy memoryStrategy;
Role role;
var memoryProps = new MemoryProps {
Description = "description",
ExecutionRole = role,
ExpirationDuration = Duration.Minutes(30),
KmsKey = key,
MemoryName = "memoryName",
MemoryStrategies = new [] { memoryStrategy },
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
}
};
Synopsis
Constructors
| MemoryProps() | (experimental) Properties for creating a Memory resource. |
Properties
| Description | (experimental) 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 | (experimental) The IAM role that provides permissions for the memory to access AWS services when using custom strategies. |
| ExpirationDuration | (experimental) Short-term memory expiration in days (between 7 and 365). |
| KmsKey | (experimental) Custom KMS key to use for encryption. |
| MemoryName | (experimental) 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 | (experimental) 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 | (experimental) Tags (optional) A list of key:value pairs of tags to apply to this memory resource. |
Constructors
MemoryProps()
(experimental) Properties for creating a Memory resource.
public MemoryProps()
Remarks
Stability: Experimental
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock.Agentcore.Alpha;
using Amazon.CDK;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.AWS.KMS;
Key key;
IMemoryStrategy memoryStrategy;
Role role;
var memoryProps = new MemoryProps {
Description = "description",
ExecutionRole = role,
ExpirationDuration = Duration.Minutes(30),
KmsKey = key,
MemoryName = "memoryName",
MemoryStrategies = new [] { memoryStrategy },
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
}
};
Properties
Description
(experimental) 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.
public string? Description { get; set; }
Property Value
Remarks
Default: - No description
Stability: Experimental
ExecutionRole
(experimental) The IAM role that provides permissions for the memory to access AWS services when using custom strategies.
public IRole? ExecutionRole { get; set; }
Property Value
Remarks
Default: - A new role will be created.
Stability: Experimental
ExpirationDuration
(experimental) Short-term memory expiration in days (between 7 and 365).
public Duration? ExpirationDuration { get; set; }
Property Value
Remarks
Sets the short-term (raw event) memory retention. Events older than the specified duration will expire and no longer be stored.
Default: - 90 days
Stability: Experimental
KmsKey
(experimental) Custom KMS key to use for encryption.
public IKey? KmsKey { get; set; }
Property Value
Remarks
Default: - Your data is encrypted with a key that AWS owns and manages for you
Stability: Experimental
MemoryName
(experimental) 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}.
public string? MemoryName { get; set; }
Property Value
Remarks
Default: - auto generate
Stability: Experimental
MemoryStrategies
(experimental) 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.
public IMemoryStrategy[]? MemoryStrategies { get; set; }
Property Value
Remarks
Default: - No extraction strategies (short term memory only)
Stability: Experimental
Tags
(experimental) Tags (optional) A list of key:value pairs of tags to apply to this memory resource.
public IDictionary<string, string>? Tags { get; set; }
Property Value
Remarks
Default: - no tags
Stability: Experimental