Class: AWSCDK::ECRAssets::TarballImageAsset

Inherits:
Constructs::Construct
  • Object
show all
Defined in:
ecr_assets/tarball_image_asset.rb

Overview

An asset that represents a Docker image.

The image will loaded from an existing tarball and uploaded to an ECR repository.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope, id, props) ⇒ TarballImageAsset

Returns a new instance of TarballImageAsset.

Parameters:



13
14
15
16
17
18
19
# File 'ecr_assets/tarball_image_asset.rb', line 13

def initialize(scope, id, props)
  props = props.is_a?(Hash) ? ::AWSCDK::ECRAssets::TarballImageAssetProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNyX2Fzc2V0cy5UYXJiYWxsSW1hZ2VBc3NldFByb3BzIn0=")), "props")
  Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props)
end

Class Method Details

.jsii_overridable_methodsObject



21
22
23
24
25
26
27
28
29
30
31
# File 'ecr_assets/tarball_image_asset.rb', line 21

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :asset_hash => { kind: :property, name: "assetHash", is_optional: false },
    :image_tag => { kind: :property, name: "imageTag", is_optional: false },
    :image_uri => { kind: :property, name: "imageUri", is_optional: false },
    :repository => { kind: :property, name: "repository", is_optional: false },
    :to_string => { kind: :method, name: "toString", is_optional: false },
    :with => { kind: :method, name: "with", is_optional: false },
  }
end

Instance Method Details

#asset_hashString

A hash of this asset, which is available at construction time.

As this is a plain string, it can be used in construct IDs in order to enforce creation of a new resource when the content hash has changed.

Returns:

  • (String)


47
48
49
# File 'ecr_assets/tarball_image_asset.rb', line 47

def asset_hash()
  jsii_get_property("assetHash")
end

#image_tagString

The tag of this asset when it is uploaded to ECR.

The tag may differ from the assetHash if a stack synthesizer adds a dockerTagPrefix.

Returns:

  • (String)


56
57
58
# File 'ecr_assets/tarball_image_asset.rb', line 56

def image_tag()
  jsii_get_property("imageTag")
end

#image_uriString

The full URI of the image (including a tag).

Use this reference to pull the asset.

Returns:

  • (String)


66
67
68
# File 'ecr_assets/tarball_image_asset.rb', line 66

def image_uri()
  jsii_get_property("imageUri")
end

#image_uri=(value) ⇒ Object



70
71
72
73
# File 'ecr_assets/tarball_image_asset.rb', line 70

def image_uri=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "imageUri")
  jsii_set_property("imageUri", value)
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


36
37
38
# File 'ecr_assets/tarball_image_asset.rb', line 36

def node()
  jsii_get_property("node")
end

#repositoryAWSCDK::ECR::IRepository

Repository where the image is stored.



78
79
80
# File 'ecr_assets/tarball_image_asset.rb', line 78

def repository()
  jsii_get_property("repository")
end

#repository=(value) ⇒ Object



82
83
84
85
# File 'ecr_assets/tarball_image_asset.rb', line 82

def repository=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNyLklSZXBvc2l0b3J5In0=")), "repository")
  jsii_set_property("repository", value)
end

#to_stringString

Returns a string representation of this construct.

Returns:

  • (String)


90
91
92
# File 'ecr_assets/tarball_image_asset.rb', line 90

def to_string()
  jsii_call_method("toString", [])
end

#with(*mixins) ⇒ Constructs::IConstruct

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

Parameters:

  • mixins (Array<Constructs::IMixin>)

    The mixins to apply.

Returns:

  • (Constructs::IConstruct)

    This construct for chaining



103
104
105
106
107
108
# File 'ecr_assets/tarball_image_asset.rb', line 103

def with(*mixins)
  mixins.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]")
  end
  jsii_call_method("with", [*mixins])
end