class RuntimeBase
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.RuntimeBase |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#RuntimeBase |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.RuntimeBase |
Python | aws_cdk.aws_bedrock_agentcore_alpha.RuntimeBase |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha » RuntimeBase |
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Implements
IConstruct, IDependable, IResource, IEnvironment, IBedrock, IGrantable, IConnectable, IRuntime
Extends
Resource
Implemented by
Runtime
Base class for Agent Runtime.
Initializer
new RuntimeBase(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 |
|---|---|---|
| agent | string | The ARN of the agent runtime resource - Format arn:${Partition}:bedrock-agentcore:${Region}:${Account}:runtime/${RuntimeId}. |
| agent | string | The ID of the agent runtime. |
| agent | string | The name of the agent runtime. |
| connections | Connections | An accessor for the Connections object that will fail if this Runtime does not have a VPC configured. |
| env | Resource | The environment this resource belongs to. |
| grant | IPrincipal | The principal to grant permissions to. |
| node | Node | The tree node. |
| role | IRole | The IAM role that provides permissions for the agent runtime. |
| runtime | Runtime | A reference to a Runtime resource. |
| stack | Stack | The stack in which this resource is defined. |
| agent | string | The version of the agent runtime. |
| agent | string | The current status of the agent runtime. |
| created | string | The time at which the runtime was created. |
| last | string | The time at which the runtime was last updated. |
agentRuntimeArn
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
string
The ARN of the agent runtime resource - Format arn:${Partition}:bedrock-agentcore:${Region}:${Account}:runtime/${RuntimeId}.
agentRuntimeId
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
string
The ID of the agent runtime.
agentRuntimeName
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
string
The name of the agent runtime.
connections
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
Connections
An accessor for the Connections object that will fail if this Runtime does not have a VPC configured.
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.
node
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
Node
The tree node.
role
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
IRole
The IAM role that provides permissions for the agent runtime.
runtimeRef
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
Runtime
A reference to a Runtime resource.
stack
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
Stack
The stack in which this resource is defined.
agentRuntimeVersion?
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
string
(optional)
The version of the agent runtime.
agentStatus?
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
string
(optional)
The current status of the agent runtime.
createdAt?
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
string
(optional)
The time at which the runtime was created.
lastUpdatedAt?
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Type:
string
(optional)
The time at which the runtime was last updated.
Methods
| Name | Description |
|---|---|
| add | Adds a policy statement to the runtime's execution role. |
| apply | Override the cross-stack reference strength for this resource. |
| apply | Apply the given removal policy to this resource. |
| grant(actions, resources) | Grant the runtime specific actions on AWS resources. |
| grant | Permits an IAM principal to invoke this runtime both directly and on behalf of users Grants both bedrock-agentcore:InvokeAgentRuntime and bedrock-agentcore:InvokeAgentRuntimeForUser permissions. |
| grant | Permits an IAM principal to invoke this runtime Grants the bedrock-agentcore:InvokeAgentRuntime permission. |
| grant | Permits an IAM principal to invoke this runtime on behalf of a user Grants the bedrock-agentcore:InvokeAgentRuntimeForUser permission Required when using the X-Amzn-Bedrock-AgentCore-Runtime-User-Id header. |
| metric(metricName, dimensions, props?) | Return the given named metric for this agent runtime. |
| metric | Return a metric containing the total number of invocations for this agent runtime. |
| metric | Return a metric containing the total number of invocations across all resources. |
| metric | Return a metric measuring the latency of requests for this agent runtime. |
| metric | Return a metric containing the number of agent sessions for this agent runtime. |
| metric | Return a metric containing the total number of sessions across all resources. |
| metric | Return a metric containing the number of system errors for this agent runtime. |
| metric | Return a metric containing the number of throttled requests for this agent runtime. |
| metric | Return a metric containing the total number of errors (system + user) for this agent runtime. |
| metric | Return a metric containing the number of user errors for this agent runtime. |
| to | Returns a string representation of this construct. |
| with(...mixins) | Applies one or more mixins to this construct. |
addToRolePolicy(statement)
public addToRolePolicy(statement: PolicyStatement): IBedrockAgentRuntime
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- statement
Policy— The IAM policy statement to add.Statement
Returns
Adds a policy statement to the runtime's execution role.
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(actions, resources)
public grant(actions: string[], resources: string[]): Grant
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- actions
string[]— The actions to grant. - resources
string[]— The resource ARNs to grant access to.
Returns
Grant the runtime specific actions on AWS resources.
[disable-awslint:no-grants]
grantInvoke(grantee)
public grantInvoke(grantee: IGrantable): Grant
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- grantee
IGrantable— The principal to grant access to.
Returns
Permits an IAM principal to invoke this runtime both directly and on behalf of users Grants both bedrock-agentcore:InvokeAgentRuntime and bedrock-agentcore:InvokeAgentRuntimeForUser permissions.
[disable-awslint:no-grants]
grantInvokeRuntime(grantee)
public grantInvokeRuntime(grantee: IGrantable): Grant
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- grantee
IGrantable— The principal to grant access to.
Returns
Permits an IAM principal to invoke this runtime Grants the bedrock-agentcore:InvokeAgentRuntime permission.
[disable-awslint:no-grants]
grantInvokeRuntimeForUser(grantee)
public grantInvokeRuntimeForUser(grantee: IGrantable): Grant
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- grantee
IGrantable— The principal to grant access to.
Returns
Permits an IAM principal to invoke this runtime on behalf of a user Grants the bedrock-agentcore:InvokeAgentRuntimeForUser permission Required when using the X-Amzn-Bedrock-AgentCore-Runtime-User-Id header.
[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 agent runtime.
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.
metricInvocations(props?)
public metricInvocations(props?: MetricOptions): Metric
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- props
MetricOptions
Returns
Return a metric containing the total number of invocations for this agent runtime.
metricInvocationsAggregated(props?)
public metricInvocationsAggregated(props?: MetricOptions): Metric
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- props
MetricOptions
Returns
Return a metric containing the total number of invocations across all resources.
metricLatency(props?)
public metricLatency(props?: MetricOptions): Metric
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- props
MetricOptions
Returns
Return a metric measuring the latency of requests for this agent runtime.
The latency metric represents the total time elapsed between receiving the request and sending the final response token, representing complete end-to-end processing time.
metricSessionCount(props?)
public metricSessionCount(props?: MetricOptions): Metric
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- props
MetricOptions
Returns
Return a metric containing the number of agent sessions for this agent runtime.
metricSessionsAggregated(props?)
public metricSessionsAggregated(props?: MetricOptions): Metric
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- props
MetricOptions
Returns
Return a metric containing the total number of sessions across all resources.
metricSystemErrors(props?)
public metricSystemErrors(props?: MetricOptions): Metric
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- props
MetricOptions
Returns
Return a metric containing the number of system errors for this agent runtime.
metricThrottles(props?)
public metricThrottles(props?: MetricOptions): Metric
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- props
MetricOptions
Returns
Return a metric containing the number of throttled requests for this agent runtime.
metricTotalErrors(props?)
public metricTotalErrors(props?: MetricOptions): Metric
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- props
MetricOptions
Returns
Return a metric containing the total number of errors (system + user) for this agent runtime.
metricUserErrors(props?)
public metricUserErrors(props?: MetricOptions): Metric
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- props
MetricOptions
Returns
Return a metric containing the number of user errors for this agent runtime.
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 (