Class Runtime
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.bedrockagentcore.RuntimeBase
software.amazon.awscdk.services.bedrockagentcore.Runtime
- All Implemented Interfaces:
IRuntimeRef,IEnvironmentAware,IResource,IBedrockAgentRuntime,IConnectable,IGrantable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.129.0 (build eaca441)",
date="2026-05-19T08:18:44.494Z")
@Stability(Stable)
public class Runtime
extends RuntimeBase
Bedrock Agent Core Runtime Enables running containerized agents with specific network configurations, security settings, and runtime artifacts.
Example:
// S3 bucket containing the agent core
Bucket codeBucket = Bucket.Builder.create(this, "AgentCode")
.bucketName("my-code-bucket")
.removalPolicy(RemovalPolicy.DESTROY)
.build();
// the bucket above needs to contain the agent code
AgentRuntimeArtifact agentRuntimeArtifact = AgentRuntimeArtifact.fromS3(Location.builder()
.bucketName(codeBucket.getBucketName())
.objectKey("deployment_package.zip")
.build(), AgentCoreRuntime.PYTHON_3_12, List.of("opentelemetry-instrument", "main.py"));
Runtime runtimeInstance = Runtime.Builder.create(this, "MyAgentRuntime")
.runtimeName("myAgent")
.agentRuntimeArtifact(agentRuntimeArtifact)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.bedrockagentcore.IBedrockAgentRuntime
IBedrockAgentRuntime.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRuntime(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedRuntime(software.amazon.jsii.JsiiObjectRef objRef) Runtime(software.constructs.Construct scope, String id, RuntimeProps props) -
Method Summary
Modifier and TypeMethodDescriptionaddEndpoint(String endpointName) Add an endpoint to this runtime This is a convenience method that creates a RuntimeEndpoint associated with this runtime.addEndpoint(String endpointName, AddEndpointOptions options) Add an endpoint to this runtime This is a convenience method that creates a RuntimeEndpoint associated with this runtime.static IBedrockAgentRuntimefromAgentRuntimeAttributes(software.constructs.Construct scope, String id, AgentRuntimeAttributes attrs) Import an existing Agent Runtime using attributes This allows you to reference an Agent Runtime that was created outside of CDK.The ARN of the agent runtime.The artifact configuration for the agent runtime.The unique identifier of the agent runtime.The name of the agent runtime.The version of the agent runtime.The status of the agent runtime.The timestamp when the agent runtime was created.Optional description for the agent runtime.The principal to grant permissions to.The timestamp when the agent runtime was last updated.getRole()The IAM role that provides permissions for the agent runtime.Methods inherited from class software.amazon.awscdk.services.bedrockagentcore.RuntimeBase
addToRolePolicy, getConnections, getRuntimeRef, grant, grantInvoke, grantInvokeRuntime, grantInvokeRuntimeForUser, metric, metric, metricInvocations, metricInvocations, metricInvocationsAggregated, metricInvocationsAggregated, metricLatency, metricLatency, metricSessionCount, metricSessionCount, metricSessionsAggregated, metricSessionsAggregated, metricSystemErrors, metricSystemErrors, metricThrottles, metricThrottles, metricTotalErrors, metricTotalErrors, metricUserErrors, metricUserErrorsMethods 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
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
Runtime
protected Runtime(software.amazon.jsii.JsiiObjectRef objRef) -
Runtime
protected Runtime(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Runtime
@Stability(Stable) public Runtime(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull RuntimeProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromAgentRuntimeAttributes
@Stability(Stable) @NotNull public static IBedrockAgentRuntime fromAgentRuntimeAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull AgentRuntimeAttributes attrs) Import an existing Agent Runtime using attributes This allows you to reference an Agent Runtime that was created outside of CDK.- Parameters:
scope- The construct scope. This parameter is required.id- The construct id. This parameter is required.attrs- The attributes of the existing Agent Runtime. This parameter is required.- Returns:
- An IBedrockAgentRuntime instance representing the imported runtime
-
addEndpoint
@Stability(Stable) @NotNull public RuntimeEndpoint addEndpoint(@NotNull String endpointName, @Nullable AddEndpointOptions options) Add an endpoint to this runtime This is a convenience method that creates a RuntimeEndpoint associated with this runtime.- Parameters:
endpointName- The name of the endpoint. This parameter is required.options- Optional configuration for the endpoint.- Returns:
- The created RuntimeEndpoint
-
addEndpoint
Add an endpoint to this runtime This is a convenience method that creates a RuntimeEndpoint associated with this runtime.- Parameters:
endpointName- The name of the endpoint. This parameter is required.- Returns:
- The created RuntimeEndpoint
-
getAgentRuntimeArn
The ARN of the agent runtime.- Specified by:
getAgentRuntimeArnin interfaceIBedrockAgentRuntime- Specified by:
getAgentRuntimeArnin classRuntimeBase- Returns:
- a token representing the ARN of this agent runtime
-
getAgentRuntimeArtifact
The artifact configuration for the agent runtime. -
getAgentRuntimeId
The unique identifier of the agent runtime.- Specified by:
getAgentRuntimeIdin interfaceIBedrockAgentRuntime- Specified by:
getAgentRuntimeIdin classRuntimeBase- Returns:
- a token representing the ID of this agent runtime
-
getAgentRuntimeName
The name of the agent runtime.- Specified by:
getAgentRuntimeNamein interfaceIBedrockAgentRuntime- Specified by:
getAgentRuntimeNamein classRuntimeBase- Returns:
- a token representing the name of this agent runtime
-
getGrantPrincipal
The principal to grant permissions to.- Specified by:
getGrantPrincipalin interfaceIGrantable- Specified by:
getGrantPrincipalin classRuntimeBase
-
getRole
The IAM role that provides permissions for the agent runtime.- Specified by:
getRolein interfaceIBedrockAgentRuntime- Specified by:
getRolein classRuntimeBase
-
getAgentRuntimeVersion
The version of the agent runtime.- Specified by:
getAgentRuntimeVersionin interfaceIBedrockAgentRuntime- Specified by:
getAgentRuntimeVersionin classRuntimeBase- Returns:
- a token representing the version of this agent runtime
-
getAgentStatus
The status of the agent runtime.- Specified by:
getAgentStatusin interfaceIBedrockAgentRuntime- Specified by:
getAgentStatusin classRuntimeBase- Returns:
- a token representing the status of this agent runtime
-
getCreatedAt
The timestamp when the agent runtime was created.- Specified by:
getCreatedAtin interfaceIBedrockAgentRuntime- Specified by:
getCreatedAtin classRuntimeBase- Returns:
- a token representing the creation timestamp of this agent runtime
-
getDescription
Optional description for the agent runtime. -
getLastUpdatedAt
The timestamp when the agent runtime was last updated.- Specified by:
getLastUpdatedAtin interfaceIBedrockAgentRuntime- Specified by:
getLastUpdatedAtin classRuntimeBase- Returns:
- a token representing the last update timestamp of this agent runtime
-