class MemoryBase
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.MemoryBase |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#MemoryBase |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.MemoryBase |
Python | aws_cdk.aws_bedrock_agentcore_alpha.MemoryBase |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha » MemoryBase |
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Implements
IConstruct, IDependable, IResource, IEnvironment, IMemory, IGrantable, IMemory
Extends
Resource
Implemented by
Memory
Abstract base class for a Memory.
Contains methods and attributes valid for Memories either created with CDK or imported.
Initializer
new MemoryBase(scope: Construct, id: string, props?: ResourceProps)
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- scope
Construct - id
string - props
ResourceProps
Properties
| Name | Type | Description |
|---|---|---|
| env | Resource | The environment this resource belongs to. |
| grant | IPrincipal | The principal to grant permissions to. |
| memory | string | The ARN of the memory resource. |
| memory | string | The id of the memory. |
| memory | Memory | A reference to a Memory resource. |
| node | Node | The tree node. |
| stack | Stack | The stack in which this resource is defined. |
| created | string | Timestamp when the memory was created. |
| execution | IRole | The IAM role that provides permissions for the memory to access AWS services. |
| kms | IKey | Custom KMS key for encryption (if provided). |
| status? | string | The status of the memory. |
| updated | string | Timestamp when the memory was last updated. |
env
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
grantPrincipal
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
IPrincipal
The principal to grant permissions to.
memoryArn
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
string
The ARN of the memory resource.
memoryId
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
string
The id of the memory.
memoryRef
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
Memory
A reference to a Memory resource.
node
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
Node
The tree node.
stack
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
Stack
The stack in which this resource is defined.
createdAt?
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
string
(optional)
Timestamp when the memory was created.
executionRole?
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
IRole
(optional)
The IAM role that provides permissions for the memory to access AWS services.
kmsKey?
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
IKey
(optional)
Custom KMS key for encryption (if provided).
status?
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
string
(optional)
The status of the memory.
updatedAt?
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
string
(optional)
Timestamp when the memory was last updated.
Methods
| Name | Description |
|---|---|
| apply | Override the cross-stack reference strength for this resource. |
| apply | Apply the given removal policy to this resource. |
| grant(grantee, ...actions) | Grants IAM actions to the IAM Principal. |
| grant | Grant the given principal identity permissions to manage the control plane of this memory. |
| grant | Grant the given principal identity permissions to delete content on this memory. |
| grant | Grant the given principal identity permissions to delete Long-Term Memory (LTM) content on this memory. |
| grant | Grant the given principal identity permissions to delete Short-Term Memory (STM) content on this memory. |
| grant | Grant the given principal identity permissions to do every action on this memory. |
| grant | Grant the given principal identity permissions to read the contents of this memory. |
| grant | Grant the given principal identity permissions to read the Long-Term Memory (LTM) contents of this memory. |
| grant | Grant the given principal identity permissions to read the Short-Term Memory (STM) contents of this memory. |
| grant | Grant the given principal identity permissions to write content to short-term memory. |
| metric(metricName, dimensions, props?) | Return the given named metric for this memory. |
| metric | Return a metric containing the number of errors for a specific API operation performed on this memory. |
| metric | Returns the metric containing the number of short-term memory events. |
| metric | Return the given named metric related to the API operation performed on this memory. |
| metric | Return a metric containing the total number of API requests made for a specific memory operation like CreateEvent, ListEvents, RetrieveMemoryRecords ... |
| metric | Return a metric measuring the latency of a specific API operation performed on this memory. |
| metric | Returns the metric containing the number of long-term memory records created by the long-term extraction strategies. |
| to | Returns a string representation of this construct. |
| with(...mixins) | Applies one or more mixins to this construct. |
applyCrossStackReferenceStrength(strength)
public applyCrossStackReferenceStrength(strength: ReferenceStrength): void
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- strength
Reference— - The reference strength to use for this resource.Strength
Override the cross-stack reference strength for this resource.
When set, any cross-stack reference to this resource will use the specified
mechanism instead of the global default determined by the
@aws-cdk/core:defaultCrossStackReferences context key. This is useful for
selectively weakening specific references to avoid the "deadly embrace" problem
without changing the app-wide default.
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- policy
RemovalPolicy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
grant(grantee, ...actions)
public grant(grantee: IGrantable, ...actions: string[]): Grant
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- grantee
IGrantable— - The IAM principal to grant permissions to. - actions
string— - The actions to grant.
Returns
Grants IAM actions to the IAM Principal.
[disable-awslint:no-grants]
grantAdmin(grantee)
public grantAdmin(grantee: IGrantable): Grant
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- grantee
IGrantable— - The IAM principal to grant admin permissions to.
Returns
Grant the given principal identity permissions to manage the control plane of this memory.
[disable-awslint:no-grants]
grantDelete(grantee)
public grantDelete(grantee: IGrantable): Grant
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- grantee
IGrantable— - The IAM principal to grant delete permissions to.
Returns
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]
grantDeleteLongTermMemory(grantee)
public grantDeleteLongTermMemory(grantee: IGrantable): Grant
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- grantee
IGrantable— - The IAM principal to grant delete permissions to.
Returns
Grant the given principal identity permissions to delete Long-Term Memory (LTM) content on this memory.
[disable-awslint:no-grants]
grantDeleteShortTermMemory(grantee)
public grantDeleteShortTermMemory(grantee: IGrantable): Grant
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- grantee
IGrantable— - The IAM principal to grant delete permissions to.
Returns
Grant the given principal identity permissions to delete Short-Term Memory (STM) content on this memory.
[disable-awslint:no-grants]
grantFullAccess(grantee)
public grantFullAccess(grantee: IGrantable): Grant
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- grantee
IGrantable— - The IAM principal to grant full access permissions to.
Returns
Grant the given principal identity permissions to do every action on this memory.
[disable-awslint:no-grants]
grantRead(grantee)
public grantRead(grantee: IGrantable): Grant
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- grantee
IGrantable— - The IAM principal to grant read permissions to.
Returns
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]
grantReadLongTermMemory(grantee)
public grantReadLongTermMemory(grantee: IGrantable): Grant
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- grantee
IGrantable— - The IAM principal to grant read permissions to.
Returns
Grant the given principal identity permissions to read the Long-Term Memory (LTM) contents of this memory.
[disable-awslint:no-grants]
grantReadShortTermMemory(grantee)
public grantReadShortTermMemory(grantee: IGrantable): Grant
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- grantee
IGrantable— - The IAM principal to grant read permissions to.
Returns
Grant the given principal identity permissions to read the Short-Term Memory (STM) contents of this memory.
[disable-awslint:no-grants]
grantWrite(grantee)
public grantWrite(grantee: IGrantable): Grant
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- grantee
IGrantable— - The IAM principal to grant read permissions to.
Returns
Grant the given principal identity permissions to write content to short-term memory.
[disable-awslint:no-grants]
metric(metricName, dimensions, props?)
public metric(metricName: string, dimensions: { [string]: string }, props?: MetricOptions): Metric
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- metricName
string - dimensions
{ [string]: string } - props
MetricOptions
Returns
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 statistic and period properties.
metricErrorsForApiOperation(operation, props?)
public metricErrorsForApiOperation(operation: string, props?: MetricOptions): Metric
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- operation
string - props
MetricOptions
Returns
Return a metric containing the number of errors for a specific API operation performed on this memory.
metricEventCreationCount(props?)
public metricEventCreationCount(props?: MetricOptions): Metric
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- props
MetricOptions
Returns
Returns the metric containing the number of short-term memory events.
metricForApiOperation(metricName, operation, props?)
public metricForApiOperation(metricName: string, operation: string, props?: MetricOptions): Metric
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- metricName
string - operation
string - props
MetricOptions
Returns
Return the given named metric related to the API operation performed on this memory.
metricInvocationsForApiOperation(operation, props?)
public metricInvocationsForApiOperation(operation: string, props?: MetricOptions): Metric
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- operation
string - props
MetricOptions
Returns
Return a metric containing the total number of API requests made for a specific memory operation like CreateEvent, ListEvents, RetrieveMemoryRecords ...
metricLatencyForApiOperation(operation, props?)
public metricLatencyForApiOperation(operation: string, props?: MetricOptions): Metric
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- operation
string - props
MetricOptions
Returns
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.
metricMemoryRecordCreationCount(props?)
public metricMemoryRecordCreationCount(props?: MetricOptions): Metric
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- props
MetricOptions
Returns
Returns the metric containing the number of long-term memory records created by the long-term extraction strategies.
toString()
public toString(): string
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Returns
string
Returns a string representation of this construct.
with(...mixins)
public with(...mixins: IMixin[]): IConstruct
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- mixins
IMixin
Returns
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.

.NET
Go
Java
Python
TypeScript (