interface IMemory
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.IMemory |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#IMemory |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.IMemory |
Python | aws_cdk.aws_bedrock_agentcore_alpha.IMemory |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป IMemory |
Implemented by
Memory
Obtainable from
Memory.fromMemoryAttributes()
Interface for Memory resources.
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. |
| 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
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
Type:
IPrincipal
The principal to grant permissions to.
memoryArn
Type:
string
The ARN of the memory resource.
memoryId
Type:
string
The id of the memory.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
createdAt?
Type:
string
(optional)
Timestamp when the memory was created.
executionRole?
Type:
IRole
(optional)
The IAM role that provides permissions for the memory to access AWS services.
kmsKey?
Type:
IKey
(optional)
Custom KMS key for encryption (if provided).
status?
Type:
string
(optional)
The status of the memory.
updatedAt?
Type:
string
(optional)
Timestamp when the memory was last updated.
Methods
| Name | Description |
|---|---|
| apply | Apply the given removal policy to this resource. |
| grant(grantee, ...actions) | Grant the given principal identity permissions to perform actions on this memory. |
| 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 this 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 created memory events and memory records. |
| 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. |
| metric | Return a metric measuring the latency of a specific API operation performed on this memory. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
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
Parameters
- grantee
IGrantable - actions
string
Returns
Grant the given principal identity permissions to perform actions on this memory.
grantAdmin(grantee)
public grantAdmin(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given principal identity permissions to manage the control plane of this memory.
grantDelete(grantee)
public grantDelete(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given principal identity permissions to delete content on this memory.
grantDeleteLongTermMemory(grantee)
public grantDeleteLongTermMemory(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given principal identity permissions to delete Long-Term Memory (LTM) content on this memory.
grantDeleteShortTermMemory(grantee)
public grantDeleteShortTermMemory(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given principal identity permissions to delete Short-Term Memory (STM) content on this memory.
grantFullAccess(grantee)
public grantFullAccess(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given principal identity permissions to do every action on this memory.
grantRead(grantee)
public grantRead(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given principal identity permissions to read the contents of this memory.
Both Short-Term Memory (STM) and Long-Term Memory (LTM).
grantReadLongTermMemory(grantee)
public grantReadLongTermMemory(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given principal identity permissions to read the Long-Term Memory (LTM) contents of this memory.
grantReadShortTermMemory(grantee)
public grantReadShortTermMemory(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given principal identity permissions to read the Short-Term Memory (STM) contents of this memory.
grantWrite(grantee)
public grantWrite(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given principal identity permissions to write content to this memory.
metric(metricName, dimensions, props?)
public metric(metricName: string, dimensions: { [string]: string }, props?: MetricOptions): Metric
Parameters
- metricName
string - dimensions
{ [string]: string } - props
MetricOptions
Returns
Return the given named metric for this memory.
metricErrorsForApiOperation(operation, props?)
public metricErrorsForApiOperation(operation: string, props?: MetricOptions): Metric
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
Parameters
- props
MetricOptions
Returns
Returns the metric containing the number of created memory events and memory records.
metricForApiOperation(metricName, operation, props?)
public metricForApiOperation(metricName: string, operation: string, props?: MetricOptions): Metric
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
Parameters
- operation
string - props
MetricOptions
Returns
Return a metric containing the total number of API requests made for a specific memory operation.
metricLatencyForApiOperation(operation, props?)
public metricLatencyForApiOperation(operation: string, props?: MetricOptions): Metric
Parameters
- operation
string - props
MetricOptions
Returns
Return a metric measuring the latency of a specific API operation performed on this memory.

.NET
Go
Java
Python
TypeScript (