Class MemoryBase
- All Implemented Interfaces:
IEnvironmentAware,IResource,IMemory,IGrantable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
- Direct Known Subclasses:
Memory
Contains methods and attributes valid for Memories either created with CDK or imported.
-
Nested Class Summary
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.services.bedrock.agentcore.alpha.IMemory
IMemory.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMemoryBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedMemoryBase(software.amazon.jsii.JsiiObjectRef objRef) protectedMemoryBase(software.constructs.Construct scope, String id) -
Method Summary
Modifier and TypeMethodDescriptionabstract String(experimental) Timestamp when the memory was created.abstract IRole(experimental) The IAM role that provides permissions for the memory to access AWS services.abstract IPrincipal(experimental) The principal to grant permissions to.abstract IKey(experimental) Custom KMS key for encryption (if provided).abstract String(experimental) The ARN of the memory resource.abstract String(experimental) The id of the memory.abstract String(experimental) The status of the memory.abstract String(experimental) Timestamp when the memory was last updated.grant(IGrantable grantee, String... actions) (experimental) Grants IAM actions to the IAM Principal.grantAdmin(IGrantable grantee) (experimental) Grant the given principal identity permissions to manage the control plane of this memory.grantDelete(IGrantable grantee) (experimental) Grant the given principal identity permissions to delete content on this memory.grantDeleteLongTermMemory(IGrantable grantee) (experimental) Grant the given principal identity permissions to delete Long-Term Memory (LTM) content on this memory.grantDeleteShortTermMemory(IGrantable grantee) (experimental) Grant the given principal identity permissions to delete Short-Term Memory (STM) content on this memory.grantFullAccess(IGrantable grantee) (experimental) Grant the given principal identity permissions to do every action on this memory.grantRead(IGrantable grantee) (experimental) Grant the given principal identity permissions to read the contents of this memory.grantReadLongTermMemory(IGrantable grantee) (experimental) Grant the given principal identity permissions to read the Long-Term Memory (LTM) contents of this memory.grantReadShortTermMemory(IGrantable grantee) (experimental) Grant the given principal identity permissions to read the Short-Term Memory (STM) contents of this memory.grantWrite(IGrantable grantee) (experimental) Grant the given principal identity permissions to write content to short-term memory.(experimental) Return the given named metric for this memory.(experimental) Return the given named metric for this memory.metricErrorsForApiOperation(String operation) (experimental) Return a metric containing the number of errors for a specific API operation performed on this memory.metricErrorsForApiOperation(String operation, MetricOptions props) (experimental) Return a metric containing the number of errors for a specific API operation performed on this memory.(experimental) Returns the metric containing the number of short-term memory events.(experimental) Returns the metric containing the number of short-term memory events.metricForApiOperation(String metricName, String operation) (experimental) Return the given named metric related to the API operation performed on this memory.metricForApiOperation(String metricName, String operation, MetricOptions props) (experimental) Return the given named metric related to the API operation performed on this memory.metricInvocationsForApiOperation(String operation) (experimental) Return a metric containing the total number of API requests made for a specific memory operation likeCreateEvent,ListEvents,RetrieveMemoryRecords...metricInvocationsForApiOperation(String operation, MetricOptions props) (experimental) Return a metric containing the total number of API requests made for a specific memory operation likeCreateEvent,ListEvents,RetrieveMemoryRecords...metricLatencyForApiOperation(String operation) (experimental) Return a metric measuring the latency of a specific API operation performed on this memory.metricLatencyForApiOperation(String operation, MetricOptions props) (experimental) Return a metric measuring the latency of a specific API operation performed on this memory.(experimental) Returns the metric containing the number of long-term memory records created by the long-term extraction strategies.(experimental) Returns the metric containing the number of long-term memory records created by the long-term extraction strategies.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods 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.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
MemoryBase
protected MemoryBase(software.amazon.jsii.JsiiObjectRef objRef) -
MemoryBase
protected MemoryBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
MemoryBase
@Stability(Experimental) protected MemoryBase(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
grant
@Stability(Experimental) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull String... actions) (experimental) Grants IAM actions to the IAM Principal. -
grantAdmin
(experimental) Grant the given principal identity permissions to manage the control plane of this memory.Default: - Default grant configuration: - actions: ['bedrock-agentcore:CreateMemory', 'bedrock-agentcore:GetMemory', 'bedrock-agentcore:DeleteMemory', 'bedrock-agentcore:UpdateMemory'] on this.memoryArn
- Specified by:
grantAdminin interfaceIMemory- Parameters:
grantee-- The IAM principal to grant admin permissions to.
- Returns:
- An IAM Grant object representing the granted permissions
-
grantDelete
(experimental) Grant the given principal identity permissions to delete content on this memory.Both Short-Term Memory (STM) and Long-Term Memory (LTM).
Default: - Default grant configuration: - actions: ['bedrock-agentcore:DeleteEvent', 'bedrock-agentcore:DeleteMemoryRecord'] on this.memoryArn
- Specified by:
grantDeletein interfaceIMemory- Parameters:
grantee-- The IAM principal to grant delete permissions to.
- Returns:
- An IAM Grant object representing the granted permissions
-
grantDeleteLongTermMemory
@Stability(Experimental) @NotNull public Grant grantDeleteLongTermMemory(@NotNull IGrantable grantee) (experimental) Grant the given principal identity permissions to delete Long-Term Memory (LTM) content on this memory.Default: - Default grant configuration: - actions: ['bedrock-agentcore:DeleteMemoryRecord'] on this.memoryArn
- Specified by:
grantDeleteLongTermMemoryin interfaceIMemory- Parameters:
grantee-- The IAM principal to grant delete permissions to.
- Returns:
- An IAM Grant object representing the granted permissions
-
grantDeleteShortTermMemory
@Stability(Experimental) @NotNull public Grant grantDeleteShortTermMemory(@NotNull IGrantable grantee) (experimental) Grant the given principal identity permissions to delete Short-Term Memory (STM) content on this memory.Default: - Default grant configuration: - actions: ['bedrock-agentcore:DeleteEvent'] on this.memoryArn
- Specified by:
grantDeleteShortTermMemoryin interfaceIMemory- Parameters:
grantee-- The IAM principal to grant delete permissions to.
- Returns:
- An IAM Grant object representing the granted permissions
-
grantFullAccess
(experimental) Grant the given principal identity permissions to do every action on this memory.Default: - Default grant configuration: - actions: ['bedrock-agentcore:CreateEvent', 'bedrock-agentcore:GetEvent', 'bedrock-agentcore:DeleteEvent', 'bedrock-agentcore:GetMemoryRecord', 'bedrock-agentcore:RetrieveMemoryRecords', 'bedrock-agentcore:ListMemoryRecords', 'bedrock-agentcore:ListActors', 'bedrock-agentcore:ListSessions', 'bedrock-agentcore:CreateMemory', 'bedrock-agentcore:GetMemory', 'bedrock-agentcore:DeleteMemory', 'bedrock-agentcore:UpdateMemory'] on this.memoryArn
- Specified by:
grantFullAccessin interfaceIMemory- Parameters:
grantee-- The IAM principal to grant full access permissions to.
- Returns:
- An IAM Grant object representing the granted permissions
-
grantRead
(experimental) Grant the given principal identity permissions to read the contents of this memory.Both Short-Term Memory (STM) and Long-Term Memory (LTM).
Default: - Default grant configuration: - actions: ['bedrock-agentcore:GetMemoryRecord', 'bedrock-agentcore:RetrieveMemoryRecords', 'bedrock-agentcore:ListMemoryRecords', 'bedrock-agentcore:ListActors', 'bedrock-agentcore:ListSessions] on this.memoryArn
-
grantReadLongTermMemory
(experimental) Grant the given principal identity permissions to read the Long-Term Memory (LTM) contents of this memory.Default: - Default grant configuration: - actions: ['bedrock-agentcore:GetMemoryRecord', 'bedrock-agentcore:RetrieveMemoryRecords', 'bedrock-agentcore:ListMemoryRecords', 'bedrock-agentcore:ListActors', 'bedrock-agentcore:ListSessions',] on this.memoryArn
- Specified by:
grantReadLongTermMemoryin interfaceIMemory- Parameters:
grantee-- The IAM principal to grant read permissions to.
- Returns:
- An IAM Grant object representing the granted permissions
-
grantReadShortTermMemory
@Stability(Experimental) @NotNull public Grant grantReadShortTermMemory(@NotNull IGrantable grantee) (experimental) Grant the given principal identity permissions to read the Short-Term Memory (STM) contents of this memory.Default: - Default grant configuration: - actions: ['bedrock-agentcore:GetEvent', 'bedrock-agentcore:ListEvents', 'bedrock-agentcore:ListActors', 'bedrock-agentcore:ListSessions',] on this.memoryArn
- Specified by:
grantReadShortTermMemoryin interfaceIMemory- Parameters:
grantee-- The IAM principal to grant read permissions to.
- Returns:
- An IAM Grant object representing the granted permissions
-
grantWrite
(experimental) Grant the given principal identity permissions to write content to short-term memory.Default: - Default grant configuration: - actions: ['bedrock-agentcore:CreateEvent'] on this.memoryArn
- Specified by:
grantWritein interfaceIMemory- Parameters:
grantee-- The IAM principal to grant read permissions to.
- Returns:
- An IAM Grant object representing the granted permissions
-
metric
@Stability(Experimental) @NotNull public Metric metric(@NotNull String metricName, @NotNull Map<String, String> dimensions, @Nullable MetricOptions props) (experimental) Return the given named metric for this memory.By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties. -
metric
@Stability(Experimental) @NotNull public Metric metric(@NotNull String metricName, @NotNull Map<String, String> dimensions) (experimental) Return the given named metric for this memory.By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties. -
metricErrorsForApiOperation
@Stability(Experimental) @NotNull public Metric metricErrorsForApiOperation(@NotNull String operation, @Nullable MetricOptions props) (experimental) Return a metric containing the number of errors for a specific API operation performed on this memory.- Specified by:
metricErrorsForApiOperationin interfaceIMemory- Parameters:
operation- This parameter is required.props-
-
metricErrorsForApiOperation
@Stability(Experimental) @NotNull public Metric metricErrorsForApiOperation(@NotNull String operation) (experimental) Return a metric containing the number of errors for a specific API operation performed on this memory.- Specified by:
metricErrorsForApiOperationin interfaceIMemory- Parameters:
operation- This parameter is required.
-
metricEventCreationCount
@Stability(Experimental) @NotNull public Metric metricEventCreationCount(@Nullable MetricOptions props) (experimental) Returns the metric containing the number of short-term memory events.- Specified by:
metricEventCreationCountin interfaceIMemory- Parameters:
props-
-
metricEventCreationCount
(experimental) Returns the metric containing the number of short-term memory events.- Specified by:
metricEventCreationCountin interfaceIMemory
-
metricForApiOperation
@Stability(Experimental) @NotNull public Metric metricForApiOperation(@NotNull String metricName, @NotNull String operation, @Nullable MetricOptions props) (experimental) Return the given named metric related to the API operation performed on this memory.- Specified by:
metricForApiOperationin interfaceIMemory- Parameters:
metricName- This parameter is required.operation- This parameter is required.props-
-
metricForApiOperation
@Stability(Experimental) @NotNull public Metric metricForApiOperation(@NotNull String metricName, @NotNull String operation) (experimental) Return the given named metric related to the API operation performed on this memory.- Specified by:
metricForApiOperationin interfaceIMemory- Parameters:
metricName- This parameter is required.operation- This parameter is required.
-
metricInvocationsForApiOperation
@Stability(Experimental) @NotNull public Metric metricInvocationsForApiOperation(@NotNull String operation, @Nullable MetricOptions props) (experimental) Return a metric containing the total number of API requests made for a specific memory operation likeCreateEvent,ListEvents,RetrieveMemoryRecords...- Specified by:
metricInvocationsForApiOperationin interfaceIMemory- Parameters:
operation- This parameter is required.props-
-
metricInvocationsForApiOperation
@Stability(Experimental) @NotNull public Metric metricInvocationsForApiOperation(@NotNull String operation) (experimental) Return a metric containing the total number of API requests made for a specific memory operation likeCreateEvent,ListEvents,RetrieveMemoryRecords...- Specified by:
metricInvocationsForApiOperationin interfaceIMemory- Parameters:
operation- This parameter is required.
-
metricLatencyForApiOperation
@Stability(Experimental) @NotNull public Metric metricLatencyForApiOperation(@NotNull String operation, @Nullable MetricOptions props) (experimental) Return a metric measuring the latency of a specific API operation performed on this memory.The latency metric represents the total time elapsed between receiving the request and sending the final response token, measuring complete end-to-end processing time.
For memory creation events specifically, this measures the time from the last CreateEvent that met strategy criteria until memory storage is completed.
- Specified by:
metricLatencyForApiOperationin interfaceIMemory- Parameters:
operation- This parameter is required.props-
-
metricLatencyForApiOperation
@Stability(Experimental) @NotNull public Metric metricLatencyForApiOperation(@NotNull String operation) (experimental) Return a metric measuring the latency of a specific API operation performed on this memory.The latency metric represents the total time elapsed between receiving the request and sending the final response token, measuring complete end-to-end processing time.
For memory creation events specifically, this measures the time from the last CreateEvent that met strategy criteria until memory storage is completed.
- Specified by:
metricLatencyForApiOperationin interfaceIMemory- Parameters:
operation- This parameter is required.
-
metricMemoryRecordCreationCount
@Stability(Experimental) @NotNull public Metric metricMemoryRecordCreationCount(@Nullable MetricOptions props) (experimental) Returns the metric containing the number of long-term memory records created by the long-term extraction strategies.- Parameters:
props-
-
metricMemoryRecordCreationCount
(experimental) Returns the metric containing the number of long-term memory records created by the long-term extraction strategies. -
getGrantPrincipal
(experimental) The principal to grant permissions to.- Specified by:
getGrantPrincipalin interfaceIGrantable
-
getMemoryArn
(experimental) The ARN of the memory resource.- Specified by:
getMemoryArnin interfaceIMemory
-
getMemoryId
(experimental) The id of the memory.- Specified by:
getMemoryIdin interfaceIMemory
-
getCreatedAt
(experimental) Timestamp when the memory was created.- Specified by:
getCreatedAtin interfaceIMemory
-
getExecutionRole
(experimental) The IAM role that provides permissions for the memory to access AWS services.- Specified by:
getExecutionRolein interfaceIMemory
-
getKmsKey
(experimental) Custom KMS key for encryption (if provided). -
getStatus
(experimental) The status of the memory. -
getUpdatedAt
(experimental) Timestamp when the memory was last updated.- Specified by:
getUpdatedAtin interfaceIMemory
-