Class MemoryBase
- All Implemented Interfaces:
IMemoryRef,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.bedrockagentcore.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) protectedMemoryBase(software.constructs.Construct scope, String id, ResourceProps props) -
Method Summary
Modifier and TypeMethodDescriptionabstract StringTimestamp when the memory was created.abstract IRoleThe IAM role that provides permissions for the memory to access AWS services.abstract IPrincipalThe principal to grant permissions to.abstract IKeyCustom KMS key for encryption (if provided).abstract StringThe ARN of the memory resource.abstract StringThe id of the memory.A reference to a Memory resource.abstract StringThe status of the memory.abstract StringTimestamp when the memory was last updated.grant(IGrantable grantee, String... actions) Grants IAM actions to the IAM Principal.grantAdmin(IGrantable grantee) Grant the given principal identity permissions to manage the control plane of this memory.grantDelete(IGrantable grantee) Grant the given principal identity permissions to delete content on this memory.grantDeleteLongTermMemory(IGrantable grantee) Grant the given principal identity permissions to delete Long-Term Memory (LTM) content on this memory.grantDeleteShortTermMemory(IGrantable grantee) Grant the given principal identity permissions to delete Short-Term Memory (STM) content on this memory.grantFullAccess(IGrantable grantee) Grant the given principal identity permissions to do every action on this memory.grantRead(IGrantable grantee) Grant the given principal identity permissions to read the contents of this memory.grantReadLongTermMemory(IGrantable grantee) Grant the given principal identity permissions to read the Long-Term Memory (LTM) contents of this memory.grantReadShortTermMemory(IGrantable grantee) Grant the given principal identity permissions to read the Short-Term Memory (STM) contents of this memory.grantWrite(IGrantable grantee) Grant the given principal identity permissions to write content to short-term memory.Return the given named metric for this memory.metric(String metricName, MetricOptions props) Return the given named metric for this memory.metricErrorsForApiOperation(String operation) Return a metric containing the number of errors for a specific API operation performed on this memory.metricErrorsForApiOperation(String operation, MetricOptions props) Return a metric containing the number of errors for a specific API operation performed on this memory.Returns the metric containing the number of short-term memory events.Returns the metric containing the number of short-term memory events.metricForApiOperation(String metricName, String operation) Return the given named metric related to the API operation performed on this memory.metricForApiOperation(String metricName, String operation, MetricOptions props) Return the given named metric related to the API operation performed on this memory.metricInvocationsForApiOperation(String operation) Return a metric containing the total number of API requests made for a specific memory operation likeCreateEvent,ListEvents,RetrieveMemoryRecords...metricInvocationsForApiOperation(String operation, MetricOptions props) Return a metric containing the total number of API requests made for a specific memory operation likeCreateEvent,ListEvents,RetrieveMemoryRecords...metricLatencyForApiOperation(String operation) Return a metric measuring the latency of a specific API operation performed on this memory.metricLatencyForApiOperation(String operation, MetricOptions props) Return a metric measuring the latency of a specific API operation performed on this memory.Returns the metric containing the number of long-term memory records created by the long-term extraction strategies.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, isResource, withMethods 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
getNode, withMethods 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(Stable) protected MemoryBase(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ResourceProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
MemoryBase
@Stability(Stable) 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(Stable) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull String... actions) Grants IAM actions to the IAM Principal.[disable-awslint:no-grants]
-
grantAdmin
Grant the given principal identity permissions to manage the control plane of this memory.[disable-awslint:no-grants]
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
Grant the given principal identity permissions to delete content on this memory.Both Short-Term Memory (STM) and Long-Term Memory (LTM).
[disable-awslint:no-grants]
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
Grant the given principal identity permissions to delete Long-Term Memory (LTM) content on this memory.[disable-awslint:no-grants]
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
Grant the given principal identity permissions to delete Short-Term Memory (STM) content on this memory.[disable-awslint:no-grants]
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
Grant the given principal identity permissions to do every action on this memory.[disable-awslint:no-grants]
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
Grant the given principal identity permissions to read the contents of this memory.Both Short-Term Memory (STM) and Long-Term Memory (LTM).
[disable-awslint:no-grants]
Default: - Default grant configuration: - actions: ['bedrock-agentcore:GetMemoryRecord', 'bedrock-agentcore:RetrieveMemoryRecords', 'bedrock-agentcore:ListMemoryRecords', 'bedrock-agentcore:ListActors', 'bedrock-agentcore:ListSessions] on this.memoryArn
-
grantReadLongTermMemory
Grant the given principal identity permissions to read the Long-Term Memory (LTM) contents of this memory.[disable-awslint:no-grants]
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
Grant the given principal identity permissions to read the Short-Term Memory (STM) contents of this memory.[disable-awslint:no-grants]
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
Grant the given principal identity permissions to write content to short-term memory.[disable-awslint:no-grants]
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(Stable) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props) 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
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(Stable) @NotNull public Metric metricErrorsForApiOperation(@NotNull String operation, @Nullable MetricOptions props) 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
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
Returns the metric containing the number of short-term memory events.- Specified by:
metricEventCreationCountin interfaceIMemory- Parameters:
props-
-
metricEventCreationCount
Returns the metric containing the number of short-term memory events.- Specified by:
metricEventCreationCountin interfaceIMemory
-
metricForApiOperation
@Stability(Stable) @NotNull public Metric metricForApiOperation(@NotNull String metricName, @NotNull String operation, @Nullable MetricOptions props) 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(Stable) @NotNull public Metric metricForApiOperation(@NotNull String metricName, @NotNull String operation) 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(Stable) @NotNull public Metric metricInvocationsForApiOperation(@NotNull String operation, @Nullable MetricOptions props) 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(Stable) @NotNull public Metric metricInvocationsForApiOperation(@NotNull String operation) 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(Stable) @NotNull public Metric metricLatencyForApiOperation(@NotNull String operation, @Nullable MetricOptions props) 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
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(Stable) @NotNull public Metric metricMemoryRecordCreationCount(@Nullable MetricOptions props) Returns the metric containing the number of long-term memory records created by the long-term extraction strategies.- Parameters:
props-
-
metricMemoryRecordCreationCount
Returns the metric containing the number of long-term memory records created by the long-term extraction strategies. -
getGrantPrincipal
The principal to grant permissions to.- Specified by:
getGrantPrincipalin interfaceIGrantable
-
getMemoryArn
The ARN of the memory resource.- Specified by:
getMemoryArnin interfaceIMemory
-
getMemoryId
The id of the memory.- Specified by:
getMemoryIdin interfaceIMemory
-
getMemoryRef
A reference to a Memory resource.- Specified by:
getMemoryRefin interfaceIMemoryRef
-
getCreatedAt
Timestamp when the memory was created.- Specified by:
getCreatedAtin interfaceIMemory
-
getExecutionRole
The IAM role that provides permissions for the memory to access AWS services.- Specified by:
getExecutionRolein interfaceIMemory
-
getKmsKey
Custom KMS key for encryption (if provided). -
getStatus
The status of the memory. -
getUpdatedAt
Timestamp when the memory was last updated.- Specified by:
getUpdatedAtin interfaceIMemory
-