Class CfnMemory
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.bedrockagentcore.CfnMemory
- All Implemented Interfaces:
IInspectable,IMemoryRef,IEnvironmentAware,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-12-01T16:02:15.649Z")
@Stability(Stable)
public class CfnMemory
extends CfnResource
implements IInspectable, IMemoryRef, ITaggableV2
Memory allows AI agents to maintain both immediate and long-term knowledge, enabling context-aware and personalized interactions.
For more information about using Memory in Amazon Bedrock AgentCore, see Host agent or tools with Amazon Bedrock AgentCore Memory .
See the Properties section below for descriptions of both the required and optional properties.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrockagentcore.*;
CfnMemory cfnMemory = CfnMemory.Builder.create(this, "MyCfnMemory")
.eventExpiryDuration(123)
.name("name")
// the properties below are optional
.description("description")
.encryptionKeyArn("encryptionKeyArn")
.memoryExecutionRoleArn("memoryExecutionRoleArn")
.memoryStrategies(List.of(MemoryStrategyProperty.builder()
.customMemoryStrategy(CustomMemoryStrategyProperty.builder()
.name("name")
// the properties below are optional
.configuration(CustomConfigurationInputProperty.builder()
.selfManagedConfiguration(SelfManagedConfigurationProperty.builder()
.historicalContextWindowSize(123)
.invocationConfiguration(InvocationConfigurationInputProperty.builder()
.payloadDeliveryBucketName("payloadDeliveryBucketName")
.topicArn("topicArn")
.build())
.triggerConditions(List.of(TriggerConditionInputProperty.builder()
.messageBasedTrigger(MessageBasedTriggerInputProperty.builder()
.messageCount(123)
.build())
.timeBasedTrigger(TimeBasedTriggerInputProperty.builder()
.idleSessionTimeout(123)
.build())
.tokenBasedTrigger(TokenBasedTriggerInputProperty.builder()
.tokenCount(123)
.build())
.build()))
.build())
.semanticOverride(SemanticOverrideProperty.builder()
.consolidation(SemanticOverrideConsolidationConfigurationInputProperty.builder()
.appendToPrompt("appendToPrompt")
.modelId("modelId")
.build())
.extraction(SemanticOverrideExtractionConfigurationInputProperty.builder()
.appendToPrompt("appendToPrompt")
.modelId("modelId")
.build())
.build())
.summaryOverride(SummaryOverrideProperty.builder()
.consolidation(SummaryOverrideConsolidationConfigurationInputProperty.builder()
.appendToPrompt("appendToPrompt")
.modelId("modelId")
.build())
.build())
.userPreferenceOverride(UserPreferenceOverrideProperty.builder()
.consolidation(UserPreferenceOverrideConsolidationConfigurationInputProperty.builder()
.appendToPrompt("appendToPrompt")
.modelId("modelId")
.build())
.extraction(UserPreferenceOverrideExtractionConfigurationInputProperty.builder()
.appendToPrompt("appendToPrompt")
.modelId("modelId")
.build())
.build())
.build())
.createdAt("createdAt")
.description("description")
.namespaces(List.of("namespaces"))
.status("status")
.strategyId("strategyId")
.type("type")
.updatedAt("updatedAt")
.build())
.semanticMemoryStrategy(SemanticMemoryStrategyProperty.builder()
.name("name")
// the properties below are optional
.createdAt("createdAt")
.description("description")
.namespaces(List.of("namespaces"))
.status("status")
.strategyId("strategyId")
.type("type")
.updatedAt("updatedAt")
.build())
.summaryMemoryStrategy(SummaryMemoryStrategyProperty.builder()
.name("name")
// the properties below are optional
.createdAt("createdAt")
.description("description")
.namespaces(List.of("namespaces"))
.status("status")
.strategyId("strategyId")
.type("type")
.updatedAt("updatedAt")
.build())
.userPreferenceMemoryStrategy(UserPreferenceMemoryStrategyProperty.builder()
.name("name")
// the properties below are optional
.createdAt("createdAt")
.description("description")
.namespaces(List.of("namespaces"))
.status("status")
.strategyId("strategyId")
.type("type")
.updatedAt("updatedAt")
.build())
.build()))
.tags(Map.of(
"tagsKey", "tags"))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnMemory.static interfaceThe memory configuration input.static interfaceThe memory strategy.static interfaceThe memory invocation configuration input.static interfaceThe memory strategy.static interfaceThe message based trigger input.static interfaceThe self managed configuration.static interfaceThe memory strategy.static interfaceThe memory override configuration.static interfaceThe memory override configuration.static interfaceThe memory override.static interfaceThe memory strategy.static interfaceThe consolidation configuration.static interfaceThe memory summary override.static interfaceThe memory trigger condition input for the time based trigger.static interfaceThe token based trigger input.static interfaceThe memory trigger condition input.static interfaceThe memory strategy.static interfaceThe configuration input.static interfaceThe memory override configuration.static interfaceThe memory user preference override.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.bedrockagentcore.IMemoryRef
IMemoryRef.Jsii$Default, IMemoryRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnMemory(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnMemory(software.amazon.jsii.JsiiObjectRef objRef) CfnMemory(software.constructs.Construct scope, String id, CfnMemoryProps props) Create a newAWS::BedrockAgentCore::Memory. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForMemory(IMemoryRef resource) The timestamp when the memory record was created.ARN of the Memory resource.The memory ID.The memory status.Tag Manager which manages the tags for this resource.Description of the Memory resource.The memory encryption key Amazon Resource Name (ARN).The event expiry configuration.The memory role ARN.A reference to a Memory resource.The memory strategies.getName()The memory name.getTags()The tags for the resources.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnMemory.renderProperties(Map<String, Object> props) voidsetDescription(String value) Description of the Memory resource.voidsetEncryptionKeyArn(String value) The memory encryption key Amazon Resource Name (ARN).voidsetEventExpiryDuration(Number value) The event expiry configuration.voidsetMemoryExecutionRoleArn(String value) The memory role ARN.voidsetMemoryStrategies(List<Object> value) The memory strategies.voidsetMemoryStrategies(IResolvable value) The memory strategies.voidThe memory name.voidThe tags for the resources.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods 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, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnMemory
protected CfnMemory(software.amazon.jsii.JsiiObjectRef objRef) -
CfnMemory
protected CfnMemory(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnMemory
@Stability(Stable) public CfnMemory(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnMemoryProps props) Create a newAWS::BedrockAgentCore::Memory.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForMemory
- Parameters:
resource- This parameter is required.
-
isCfnMemory
Checks whether the given object is a CfnMemory.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrCreatedAt
The timestamp when the memory record was created. -
getAttrFailureReason
-
getAttrMemoryArn
ARN of the Memory resource. -
getAttrMemoryId
The memory ID. -
getAttrStatus
The memory status. -
getAttrUpdatedAt
-
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getMemoryRef
A reference to a Memory resource.- Specified by:
getMemoryRefin interfaceIMemoryRef
-
getEventExpiryDuration
The event expiry configuration. -
setEventExpiryDuration
The event expiry configuration. -
getName
The memory name. -
setName
The memory name. -
getDescription
Description of the Memory resource. -
setDescription
Description of the Memory resource. -
getEncryptionKeyArn
The memory encryption key Amazon Resource Name (ARN). -
setEncryptionKeyArn
The memory encryption key Amazon Resource Name (ARN). -
getMemoryExecutionRoleArn
The memory role ARN. -
setMemoryExecutionRoleArn
The memory role ARN. -
getMemoryStrategies
The memory strategies.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnMemory.MemoryStrategyProperty> -
setMemoryStrategies
The memory strategies. -
setMemoryStrategies
The memory strategies. -
getTags
The tags for the resources. -
setTags
The tags for the resources.
-