java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
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:
  • Field Details

    • PROPERTY_INJECTION_ID

      @Stability(Stable) public static final String 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

      @Stability(Stable) @NotNull public RuntimeEndpoint addEndpoint(@NotNull String endpointName)
      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

      @Stability(Stable) @NotNull public String getAgentRuntimeArn()
      The ARN of the agent runtime.

      Specified by:
      getAgentRuntimeArn in interface IBedrockAgentRuntime
      Specified by:
      getAgentRuntimeArn in class RuntimeBase
      Returns:
      a token representing the ARN of this agent runtime
    • getAgentRuntimeArtifact

      @Stability(Stable) @NotNull public AgentRuntimeArtifact getAgentRuntimeArtifact()
      The artifact configuration for the agent runtime.
    • getAgentRuntimeId

      @Stability(Stable) @NotNull public String getAgentRuntimeId()
      The unique identifier of the agent runtime.

      Specified by:
      getAgentRuntimeId in interface IBedrockAgentRuntime
      Specified by:
      getAgentRuntimeId in class RuntimeBase
      Returns:
      a token representing the ID of this agent runtime
    • getAgentRuntimeName

      @Stability(Stable) @NotNull public String getAgentRuntimeName()
      The name of the agent runtime.

      Specified by:
      getAgentRuntimeName in interface IBedrockAgentRuntime
      Specified by:
      getAgentRuntimeName in class RuntimeBase
      Returns:
      a token representing the name of this agent runtime
    • getGrantPrincipal

      @Stability(Stable) @NotNull public IPrincipal getGrantPrincipal()
      The principal to grant permissions to.
      Specified by:
      getGrantPrincipal in interface IGrantable
      Specified by:
      getGrantPrincipal in class RuntimeBase
    • getRole

      @Stability(Stable) @NotNull public IRole getRole()
      The IAM role that provides permissions for the agent runtime.
      Specified by:
      getRole in interface IBedrockAgentRuntime
      Specified by:
      getRole in class RuntimeBase
    • getAgentRuntimeVersion

      @Stability(Stable) @Nullable public String getAgentRuntimeVersion()
      The version of the agent runtime.

      Specified by:
      getAgentRuntimeVersion in interface IBedrockAgentRuntime
      Specified by:
      getAgentRuntimeVersion in class RuntimeBase
      Returns:
      a token representing the version of this agent runtime
    • getAgentStatus

      @Stability(Stable) @Nullable public String getAgentStatus()
      The status of the agent runtime.

      Specified by:
      getAgentStatus in interface IBedrockAgentRuntime
      Specified by:
      getAgentStatus in class RuntimeBase
      Returns:
      a token representing the status of this agent runtime
    • getCreatedAt

      @Stability(Stable) @Nullable public String getCreatedAt()
      The timestamp when the agent runtime was created.

      Specified by:
      getCreatedAt in interface IBedrockAgentRuntime
      Specified by:
      getCreatedAt in class RuntimeBase
      Returns:
      a token representing the creation timestamp of this agent runtime
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      Optional description for the agent runtime.
    • getLastUpdatedAt

      @Stability(Stable) @Nullable public String getLastUpdatedAt()
      The timestamp when the agent runtime was last updated.

      Specified by:
      getLastUpdatedAt in interface IBedrockAgentRuntime
      Specified by:
      getLastUpdatedAt in class RuntimeBase
      Returns:
      a token representing the last update timestamp of this agent runtime