Class: AWSCDK::ECRAssets::TarballImageAssetProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecr_assets/tarball_image_asset_props.rb

Overview

Options for TarballImageAsset.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tarball_file:, display_name: nil) ⇒ TarballImageAssetProps

Returns a new instance of TarballImageAssetProps.

Parameters:

  • tarball_file (String)

    Absolute path to the tarball.

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

    A display name for this asset.



9
10
11
12
13
14
# File 'ecr_assets/tarball_image_asset_props.rb', line 9

def initialize(tarball_file:, display_name: nil)
  @tarball_file = tarball_file
  Jsii::Type.check_type(@tarball_file, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tarballFile")
  @display_name = display_name
  Jsii::Type.check_type(@display_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "displayName") unless @display_name.nil?
end

Instance Attribute Details

#display_nameString? (readonly)

Note:

Default: - Stack-relative construct path

A display name for this asset.

If supplied, the display name will be used in locations where the asset identifier is printed, like in the CLI progress information. If the same asset is added multiple times, the display name of the first occurrence is used.

The default is the construct path of the TarballImageAsset construct, with respect to the enclosing stack. If the asset is produced by a construct helper function (such as lambda.Code.fromAssetImage()), this will look like MyFunction/AssetImage.

We use the stack-relative construct path so that in the common case where you have multiple stacks with the same asset, we won't show something like /MyBetaStack/MyFunction/Code when you are actually deploying to production.

Returns:

  • (String, nil)


43
44
45
# File 'ecr_assets/tarball_image_asset_props.rb', line 43

def display_name
  @display_name
end

#tarball_fileString (readonly)

Absolute path to the tarball.

It is recommended to use the script running directory (e.g. __dirname in Node.js projects or dirname of __file__ in Python) if your tarball is located as a resource inside your project.

Returns:

  • (String)


23
24
25
# File 'ecr_assets/tarball_image_asset_props.rb', line 23

def tarball_file
  @tarball_file
end

Class Method Details

.jsii_propertiesObject



45
46
47
48
49
50
# File 'ecr_assets/tarball_image_asset_props.rb', line 45

def self.jsii_properties
  {
    :tarball_file => "tarballFile",
    :display_name => "displayName",
  }
end

Instance Method Details

#to_jsiiObject



52
53
54
55
56
57
58
59
# File 'ecr_assets/tarball_image_asset_props.rb', line 52

def to_jsii
  result = {}
  result.merge!({
    "tarballFile" => @tarball_file,
    "displayName" => @display_name,
  })
  result.compact
end