Class: AWSCDK::ECS::AssetImage
- Inherits:
-
ContainerImage
- Object
- ContainerImage
- AWSCDK::ECS::AssetImage
- Defined in:
- ecs/asset_image.rb
Overview
An image that will be built from a local directory with a Dockerfile.
Class Method Summary collapse
Instance Method Summary collapse
-
#bind(scope, container_definition) ⇒ AWSCDK::ECS::ContainerImageConfig
Called when the image is used by a ContainerDefinition.
-
#initialize(directory, props = nil) ⇒ AssetImage
constructor
Constructs a new instance of the AssetImage class.
Constructor Details
#initialize(directory, props = nil) ⇒ AssetImage
Constructs a new instance of the AssetImage class.
12 13 14 15 16 17 |
# File 'ecs/asset_image.rb', line 12 def initialize(directory, props = nil) props = props.is_a?(Hash) ? ::AWSCDK::ECS::AssetImageProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(directory, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "directory") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkFzc2V0SW1hZ2VQcm9wcyJ9")), "props") unless props.nil? Jsii::Object.instance_method(:initialize).bind(self).call(directory, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
19 20 21 22 23 |
# File 'ecs/asset_image.rb', line 19 def self.jsii_overridable_methods { :bind => { kind: :method, name: "bind", is_optional: false }, } end |
Instance Method Details
#bind(scope, container_definition) ⇒ AWSCDK::ECS::ContainerImageConfig
Called when the image is used by a ContainerDefinition.
30 31 32 33 34 |
# File 'ecs/asset_image.rb', line 30 def bind(scope, container_definition) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(container_definition, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNvbnRhaW5lckRlZmluaXRpb24ifQ==")), "containerDefinition") jsii_call_method("bind", [scope, container_definition]) end |