Class: AWSCDK::Lambda::CodeImageConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lambda::CodeImageConfig
- Defined in:
- lambda/code_image_config.rb
Overview
Result of the bind when an ECR image is used.
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.
-
#image_uri ⇒ String
readonly
URI to the Docker image.
-
#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(image_uri:, cmd: nil, entrypoint: nil, working_directory: nil) ⇒ CodeImageConfig
constructor
A new instance of CodeImageConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(image_uri:, cmd: nil, entrypoint: nil, working_directory: nil) ⇒ CodeImageConfig
Returns a new instance of CodeImageConfig.
11 12 13 14 15 16 17 18 19 20 |
# File 'lambda/code_image_config.rb', line 11 def initialize(image_uri:, cmd: nil, entrypoint: nil, working_directory: nil) @image_uri = image_uri Jsii::Type.check_type(@image_uri, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "imageUri") @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? @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' ].
33 34 35 |
# File 'lambda/code_image_config.rb', line 33 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' ].
42 43 44 |
# File 'lambda/code_image_config.rb', line 42 def entrypoint @entrypoint end |
#image_uri ⇒ String (readonly)
URI to the Docker image.
25 26 27 |
# File 'lambda/code_image_config.rb', line 25 def image_uri @image_uri 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.
50 51 52 |
# File 'lambda/code_image_config.rb', line 50 def working_directory @working_directory end |
Class Method Details
.jsii_properties ⇒ Object
52 53 54 55 56 57 58 59 |
# File 'lambda/code_image_config.rb', line 52 def self.jsii_properties { :image_uri => "imageUri", :cmd => "cmd", :entrypoint => "entrypoint", :working_directory => "workingDirectory", } end |
Instance Method Details
#to_jsii ⇒ Object
61 62 63 64 65 66 67 68 69 70 |
# File 'lambda/code_image_config.rb', line 61 def to_jsii result = {} result.merge!({ "imageUri" => @image_uri, "cmd" => @cmd, "entrypoint" => @entrypoint, "workingDirectory" => @working_directory, }) result.compact end |