Class: AWSCDK::Lambda::ECRImageCodeProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lambda::ECRImageCodeProps
- Defined in:
- lambda/ecr_image_code_props.rb
Overview
Properties to initialize a new EcrImageCode.
Instance Attribute Summary collapse
-
#cmd ⇒ Array<String>?
readonly
Specify or override the CMD on the specified Docker image or Dockerfile.
-
#entrypoint ⇒ Array<String>?
readonly
Specify or override the ENTRYPOINT on the specified Docker image or Dockerfile.
-
#tag ⇒ String?
readonly
deprecated
Deprecated.
use
tagOrDigest -
#tag_or_digest ⇒ String?
readonly
The image tag or digest to use when pulling the image from ECR (digests must start with
sha256:). -
#working_directory ⇒ String?
readonly
Specify or override the WORKDIR on the specified Docker image or Dockerfile.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cmd: nil, entrypoint: nil, tag: nil, tag_or_digest: nil, working_directory: nil) ⇒ ECRImageCodeProps
constructor
A new instance of ECRImageCodeProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cmd: nil, entrypoint: nil, tag: nil, tag_or_digest: nil, working_directory: nil) ⇒ ECRImageCodeProps
Returns a new instance of ECRImageCodeProps.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lambda/ecr_image_code_props.rb', line 12 def initialize(cmd: nil, entrypoint: nil, tag: nil, tag_or_digest: nil, working_directory: nil) @cmd = cmd Jsii::Type.check_type(@cmd, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "cmd") unless @cmd.nil? @entrypoint = entrypoint Jsii::Type.check_type(@entrypoint, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "entrypoint") unless @entrypoint.nil? @tag = tag Jsii::Type.check_type(@tag, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tag") unless @tag.nil? @tag_or_digest = tag_or_digest Jsii::Type.check_type(@tag_or_digest, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tagOrDigest") unless @tag_or_digest.nil? @working_directory = working_directory Jsii::Type.check_type(@working_directory, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "workingDirectory") unless @working_directory.nil? end |
Instance Attribute Details
#cmd ⇒ Array<String>? (readonly)
Default: - use the CMD specified in the docker image or Dockerfile.
Specify or override the CMD on the specified Docker image or Dockerfile.
This needs to be in the 'exec form', viz., [ 'executable', 'param1', 'param2' ].
32 33 34 |
# File 'lambda/ecr_image_code_props.rb', line 32 def cmd @cmd end |
#entrypoint ⇒ Array<String>? (readonly)
Default: - use the ENTRYPOINT in the docker image or Dockerfile.
Specify or override the ENTRYPOINT on the specified Docker image or Dockerfile.
An ENTRYPOINT allows you to configure a container that will run as an executable.
This needs to be in the 'exec form', viz., [ 'executable', 'param1', 'param2' ].
41 42 43 |
# File 'lambda/ecr_image_code_props.rb', line 41 def entrypoint @entrypoint end |
#tag ⇒ String? (readonly)
use tagOrDigest
Default: 'latest'
The image tag to use when pulling the image from ECR.
47 48 49 |
# File 'lambda/ecr_image_code_props.rb', line 47 def tag @tag end |
#tag_or_digest ⇒ String? (readonly)
Default: 'latest'
The image tag or digest to use when pulling the image from ECR (digests must start with sha256:).
52 53 54 |
# File 'lambda/ecr_image_code_props.rb', line 52 def tag_or_digest @tag_or_digest end |
#working_directory ⇒ String? (readonly)
Default: - use the WORKDIR in the docker image or Dockerfile.
Specify or override the WORKDIR on the specified Docker image or Dockerfile.
A WORKDIR allows you to configure the working directory the container will use.
60 61 62 |
# File 'lambda/ecr_image_code_props.rb', line 60 def working_directory @working_directory end |
Class Method Details
.jsii_properties ⇒ Object
62 63 64 65 66 67 68 69 70 |
# File 'lambda/ecr_image_code_props.rb', line 62 def self.jsii_properties { :cmd => "cmd", :entrypoint => "entrypoint", :tag => "tag", :tag_or_digest => "tagOrDigest", :working_directory => "workingDirectory", } end |
Instance Method Details
#to_jsii ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 |
# File 'lambda/ecr_image_code_props.rb', line 72 def to_jsii result = {} result.merge!({ "cmd" => @cmd, "entrypoint" => @entrypoint, "tag" => @tag, "tagOrDigest" => @tag_or_digest, "workingDirectory" => @working_directory, }) result.compact end |