Class: AWSCDK::ECS::TagParameterContainerImage
- Inherits:
-
ContainerImage
- Object
- ContainerImage
- AWSCDK::ECS::TagParameterContainerImage
- Defined in:
- ecs/tag_parameter_container_image.rb
Overview
A special type of ContainerImage that uses an ECR repository for the image, but a CloudFormation Parameter for the tag of the image in that repository.
This allows providing this tag through the Parameter at deploy time, for example in a CodePipeline that pushes a new tag of the image to the repository during a build step, and then provides that new tag through the CloudFormation Parameter in the deploy step.
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(repository) ⇒ TagParameterContainerImage
constructor
A new instance of TagParameterContainerImage.
-
#tag_parameter_name ⇒ String
Returns the name of the CloudFormation Parameter that represents the tag of the image in the ECR repository.
-
#tag_parameter_value ⇒ String
Returns the value of the CloudFormation Parameter that represents the tag of the image in the ECR repository.
Constructor Details
#initialize(repository) ⇒ TagParameterContainerImage
Returns a new instance of TagParameterContainerImage.
15 16 17 18 |
# File 'ecs/tag_parameter_container_image.rb', line 15 def initialize(repository) Jsii::Type.check_type(repository, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNyLklSZXBvc2l0b3J5In0=")), "repository") Jsii::Object.instance_method(:initialize).bind(self).call(repository) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
20 21 22 23 24 25 26 |
# File 'ecs/tag_parameter_container_image.rb', line 20 def self.jsii_overridable_methods { :tag_parameter_name => { kind: :property, name: "tagParameterName", is_optional: false }, :tag_parameter_value => { kind: :property, name: "tagParameterValue", is_optional: false }, :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.
47 48 49 50 51 |
# File 'ecs/tag_parameter_container_image.rb', line 47 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 |
#tag_parameter_name ⇒ String
Returns the name of the CloudFormation Parameter that represents the tag of the image in the ECR repository.
31 32 33 |
# File 'ecs/tag_parameter_container_image.rb', line 31 def tag_parameter_name() jsii_get_property("tagParameterName") end |
#tag_parameter_value ⇒ String
Returns the value of the CloudFormation Parameter that represents the tag of the image in the ECR repository.
38 39 40 |
# File 'ecs/tag_parameter_container_image.rb', line 38 def tag_parameter_value() jsii_get_property("tagParameterValue") end |