Class SelfManagedMemoryStrategy
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.bedrockagentcore.SelfManagedMemoryStrategy
- All Implemented Interfaces:
IMemoryStrategy,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.129.0 (build eaca441)",
date="2026-05-19T08:18:44.505Z")
@Stability(Stable)
public class SelfManagedMemoryStrategy
extends software.amazon.jsii.JsiiObject
implements IMemoryStrategy
Use AgentCore memory for event storage with custom triggers.
Define memory processing logic in your own environment.
Example:
Bucket bucket = Bucket.Builder.create(this, "memoryBucket")
.bucketName("test-memory")
.removalPolicy(RemovalPolicy.DESTROY)
.autoDeleteObjects(true)
.build();
Topic topic = new Topic(this, "topic");
// Create a custom semantic memory strategy
SelfManagedMemoryStrategy selfManagedStrategy = MemoryStrategy.usingSelfManaged(SelfManagedStrategyProps.builder()
.strategyName("selfManagedStrategy")
.description("self managed memory strategy")
.historicalContextWindowSize(5)
.invocationConfiguration(InvocationConfiguration.builder()
.topic(topic)
.s3Location(Location.builder()
.bucketName(bucket.getBucketName())
.objectKey("memory/")
.build())
.build())
.triggerConditions(TriggerConditions.builder()
.messageBasedTrigger(1)
.timeBasedTrigger(Duration.seconds(10))
.tokenBasedTrigger(100)
.build())
.build());
// Create memory with custom strategy
Memory memory = Memory.Builder.create(this, "MyMemory")
.memoryName("my-custom-memory")
.description("Memory with custom strategy")
.expirationDuration(Duration.days(90))
.memoryStrategies(List.of(selfManagedStrategy))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forSelfManagedMemoryStrategy.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.bedrockagentcore.IMemoryStrategy
IMemoryStrategy.Jsii$Default, IMemoryStrategy.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionSelfManagedMemoryStrategy(MemoryStrategyType strategyType, SelfManagedStrategyProps props) protectedSelfManagedMemoryStrategy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedSelfManagedMemoryStrategy(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionThe description of the memory strategy.Historical context window size for self managed memory strategy.Invocation configuration for self managed memory strategy.The name of the memory strategy.The type of memory strategy.Trigger conditions for self managed memory strategy.grant(IGrantable grantee) Grants the necessary permissions to the role.render()Renders internal attributes to CloudFormation.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
SelfManagedMemoryStrategy
protected SelfManagedMemoryStrategy(software.amazon.jsii.JsiiObjectRef objRef) -
SelfManagedMemoryStrategy
protected SelfManagedMemoryStrategy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
SelfManagedMemoryStrategy
@Stability(Stable) public SelfManagedMemoryStrategy(@NotNull MemoryStrategyType strategyType, @NotNull SelfManagedStrategyProps props) - Parameters:
strategyType- The type of memory strategy. This parameter is required.props- This parameter is required.
-
-
Method Details
-
grant
Grants the necessary permissions to the role.[disable-awslint:no-grants]
- Specified by:
grantin interfaceIMemoryStrategy- Parameters:
grantee-- The grantee to grant permissions to.
- Returns:
- The Grant object for chaining
-
render
Renders internal attributes to CloudFormation.- Specified by:
renderin interfaceIMemoryStrategy
-
getHistoricalContextWindowSize
Historical context window size for self managed memory strategy. -
getInvocationConfiguration
Invocation configuration for self managed memory strategy. -
getStrategyName
The name of the memory strategy.- Specified by:
getStrategyNamein interfaceIMemoryStrategy
-
getStrategyType
The type of memory strategy.- Specified by:
getStrategyTypein interfaceIMemoryStrategy
-
getTriggerConditions
Trigger conditions for self managed memory strategy. -
getDescription
The description of the memory strategy.- Specified by:
getDescriptionin interfaceIMemoryStrategy
-