Class: AWSCDK::Lambda::DockerImageCode
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Lambda::DockerImageCode
- Defined in:
- lambda/docker_image_code.rb
Overview
Code property for the DockerImageFunction construct.
Class Method Summary collapse
-
.from_ecr(repository, props = nil) ⇒ AWSCDK::Lambda::DockerImageCode
Use an existing ECR image as the Lambda code.
-
.from_image_asset(directory, props = nil) ⇒ AWSCDK::Lambda::DockerImageCode
Create an ECR image from the specified asset and bind it as the Lambda code.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#initialize ⇒ DockerImageCode
constructor
A new instance of DockerImageCode.
Constructor Details
#initialize ⇒ DockerImageCode
Returns a new instance of DockerImageCode.
8 9 10 |
# File 'lambda/docker_image_code.rb', line 8 def initialize Jsii::Object.instance_method(:initialize).bind(self).call end |
Class Method Details
.from_ecr(repository, props = nil) ⇒ AWSCDK::Lambda::DockerImageCode
Use an existing ECR image as the Lambda code.
22 23 24 25 26 27 |
# File 'lambda/docker_image_code.rb', line 22 def self.from_ecr(repository, props = nil) Jsii::Type.check_type(repository, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNyLklSZXBvc2l0b3J5In0=")), "repository") props = props.is_a?(Hash) ? ::AWSCDK::Lambda::ECRImageCodeProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkVjckltYWdlQ29kZVByb3BzIn0=")), "props") unless props.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_lambda.DockerImageCode", "fromEcr", [repository, props]) end |
.from_image_asset(directory, props = nil) ⇒ AWSCDK::Lambda::DockerImageCode
Create an ECR image from the specified asset and bind it as the Lambda code.
34 35 36 37 38 39 |
# File 'lambda/docker_image_code.rb', line 34 def self.from_image_asset(directory, props = nil) Jsii::Type.check_type(directory, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "directory") props = props.is_a?(Hash) ? ::AWSCDK::Lambda::AssetImageCodeProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkFzc2V0SW1hZ2VDb2RlUHJvcHMifQ==")), "props") unless props.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_lambda.DockerImageCode", "fromImageAsset", [directory, props]) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 |
# File 'lambda/docker_image_code.rb', line 12 def self.jsii_overridable_methods { } end |