Class: AWSCDK::DockerImageAssetLocation

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
docker_image_asset_location.rb

Overview

The location of the published docker image.

This is where the image can be consumed at runtime.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(image_uri:, repository_name:, image_tag: nil) ⇒ DockerImageAssetLocation

Returns a new instance of DockerImageAssetLocation.

Parameters:

  • image_uri (String)

    The URI of the image in Amazon ECR (including a tag).

  • repository_name (String)

    The name of the ECR repository.

  • image_tag (String, nil) (defaults to: nil)

    The tag of the image in Amazon ECR.



13
14
15
16
17
18
19
20
# File 'docker_image_asset_location.rb', line 13

def initialize(image_uri:, repository_name:, image_tag: nil)
  @image_uri = image_uri
  Jsii::Type.check_type(@image_uri, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "imageUri")
  @repository_name = repository_name
  Jsii::Type.check_type(@repository_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "repositoryName")
  @image_tag = image_tag
  Jsii::Type.check_type(@image_tag, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "imageTag") unless @image_tag.nil?
end

Instance Attribute Details

#image_tagString? (readonly)

Note:

Default: - the hash of the asset, or the dockerTagPrefix concatenated with the asset hash if a dockerTagPrefix is specified in the stack synthesizer

The tag of the image in Amazon ECR.

Returns:

  • (String, nil)


34
35
36
# File 'docker_image_asset_location.rb', line 34

def image_tag
  @image_tag
end

#image_uriString (readonly)

The URI of the image in Amazon ECR (including a tag).

Returns:

  • (String)


25
26
27
# File 'docker_image_asset_location.rb', line 25

def image_uri
  @image_uri
end

#repository_nameString (readonly)

The name of the ECR repository.

Returns:

  • (String)


29
30
31
# File 'docker_image_asset_location.rb', line 29

def repository_name
  @repository_name
end

Class Method Details

.jsii_propertiesObject



36
37
38
39
40
41
42
# File 'docker_image_asset_location.rb', line 36

def self.jsii_properties
  {
    :image_uri => "imageUri",
    :repository_name => "repositoryName",
    :image_tag => "imageTag",
  }
end

Instance Method Details

#to_jsiiObject



44
45
46
47
48
49
50
51
52
# File 'docker_image_asset_location.rb', line 44

def to_jsii
  result = {}
  result.merge!({
    "imageUri" => @image_uri,
    "repositoryName" => @repository_name,
    "imageTag" => @image_tag,
  })
  result.compact
end