Class: AWSCDK::BedrockAgentCore::AgentRuntimeArtifact
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::BedrockAgentCore::AgentRuntimeArtifact
- Defined in:
- bedrock_agent_core/agent_runtime_artifact.rb
Overview
Abstract base class for agent runtime artifacts.
Provides methods to reference container images from ECR repositories or local assets.
Class Method Summary collapse
-
.from_asset(directory, options = nil) ⇒ AWSCDK::BedrockAgentCore::AgentRuntimeArtifact
Reference an agent runtime artifact that's constructed directly from sources on disk.
-
.from_code_asset(options) ⇒ AWSCDK::BedrockAgentCore::AgentRuntimeArtifact
Reference an agent runtime artifact that's constructed from local code assets uploaded to a CDK-managed S3 bucket.
-
.from_ecr_repository(repository, tag = nil) ⇒ AWSCDK::BedrockAgentCore::AgentRuntimeArtifact
Reference an image in an ECR repository.
-
.from_image_uri(container_uri) ⇒ AWSCDK::BedrockAgentCore::AgentRuntimeArtifact
Reference an image using an ECR container URI.
-
.from_s3(s3_location, runtime, entrypoint) ⇒ AWSCDK::BedrockAgentCore::AgentRuntimeArtifact
Reference an agent runtime artifact that's constructed directly from an S3 object.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#bind(scope, runtime) ⇒ void
Called when the image is used by a Runtime to handle side effects like permissions.
-
#initialize ⇒ AgentRuntimeArtifact
constructor
A new instance of AgentRuntimeArtifact.
Constructor Details
#initialize ⇒ AgentRuntimeArtifact
Returns a new instance of AgentRuntimeArtifact.
10 11 12 |
# File 'bedrock_agent_core/agent_runtime_artifact.rb', line 10 def initialize Jsii::Object.instance_method(:initialize).bind(self).call end |
Class Method Details
.from_asset(directory, options = nil) ⇒ AWSCDK::BedrockAgentCore::AgentRuntimeArtifact
Reference an agent runtime artifact that's constructed directly from sources on disk.
25 26 27 28 29 30 |
# File 'bedrock_agent_core/agent_runtime_artifact.rb', line 25 def self.from_asset(directory, = nil) Jsii::Type.check_type(directory, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "directory") = .is_a?(Hash) ? ::AWSCDK::ECRAssets::DockerImageAssetOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNyX2Fzc2V0cy5Eb2NrZXJJbWFnZUFzc2V0T3B0aW9ucyJ9")), "options") unless .nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_bedrockagentcore.AgentRuntimeArtifact", "fromAsset", [directory, ]) end |
.from_code_asset(options) ⇒ AWSCDK::BedrockAgentCore::AgentRuntimeArtifact
Reference an agent runtime artifact that's constructed from local code assets uploaded to a CDK-managed S3 bucket.
36 37 38 39 40 |
# File 'bedrock_agent_core/agent_runtime_artifact.rb', line 36 def self.from_code_asset() = .is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::CodeAssetOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5Db2RlQXNzZXRPcHRpb25zIn0=")), "options") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_bedrockagentcore.AgentRuntimeArtifact", "fromCodeAsset", []) end |
.from_ecr_repository(repository, tag = nil) ⇒ AWSCDK::BedrockAgentCore::AgentRuntimeArtifact
Reference an image in an ECR repository.
47 48 49 50 51 |
# File 'bedrock_agent_core/agent_runtime_artifact.rb', line 47 def self.from_ecr_repository(repository, tag = nil) Jsii::Type.check_type(repository, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNyLklSZXBvc2l0b3J5In0=")), "repository") Jsii::Type.check_type(tag, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tag") unless tag.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_bedrockagentcore.AgentRuntimeArtifact", "fromEcrRepository", [repository, tag]) end |
.from_image_uri(container_uri) ⇒ AWSCDK::BedrockAgentCore::AgentRuntimeArtifact
Reference an image using an ECR container URI.
Use this when referencing ECR images from CloudFormation parameters or cross-stack references.
Note: No IAM permissions are automatically granted. You must ensure the runtime has ECR pull permissions for the repository.
62 63 64 65 |
# File 'bedrock_agent_core/agent_runtime_artifact.rb', line 62 def self.from_image_uri(container_uri) Jsii::Type.check_type(container_uri, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "containerUri") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_bedrockagentcore.AgentRuntimeArtifact", "fromImageUri", [container_uri]) end |
.from_s3(s3_location, runtime, entrypoint) ⇒ AWSCDK::BedrockAgentCore::AgentRuntimeArtifact
Reference an agent runtime artifact that's constructed directly from an S3 object.
73 74 75 76 77 78 79 |
# File 'bedrock_agent_core/agent_runtime_artifact.rb', line 73 def self.from_s3(s3_location, runtime, entrypoint) s3_location = s3_location.is_a?(Hash) ? ::AWSCDK::S3::Location.new(**s3_location.transform_keys(&:to_sym)) : s3_location Jsii::Type.check_type(s3_location, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuTG9jYXRpb24ifQ==")), "s3Location") Jsii::Type.check_type(runtime, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5BZ2VudENvcmVSdW50aW1lIn0=")), "runtime") Jsii::Type.check_type(entrypoint, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "entrypoint") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_bedrockagentcore.AgentRuntimeArtifact", "fromS3", [s3_location, runtime, entrypoint]) end |
.jsii_overridable_methods ⇒ Object
14 15 16 17 18 |
# File 'bedrock_agent_core/agent_runtime_artifact.rb', line 14 def self.jsii_overridable_methods { :bind => { kind: :method, name: "bind", is_optional: false }, } end |
Instance Method Details
#bind(scope, runtime) ⇒ void
This method returns an undefined value.
Called when the image is used by a Runtime to handle side effects like permissions.
86 87 88 89 90 |
# File 'bedrock_agent_core/agent_runtime_artifact.rb', line 86 def bind(scope, runtime) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(runtime, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5SdW50aW1lIn0=")), "runtime") jsii_call_method("bind", [scope, runtime]) end |