Class: AWSCDK::ECRAssets::TarballImageAssetProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECRAssets::TarballImageAssetProps
- Defined in:
- ecr_assets/tarball_image_asset_props.rb
Overview
Options for TarballImageAsset.
Instance Attribute Summary collapse
-
#display_name ⇒ String?
readonly
A display name for this asset.
-
#tarball_file ⇒ String
readonly
Absolute path to the tarball.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(tarball_file:, display_name: nil) ⇒ TarballImageAssetProps
constructor
A new instance of TarballImageAssetProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(tarball_file:, display_name: nil) ⇒ TarballImageAssetProps
Returns a new instance of TarballImageAssetProps.
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_name ⇒ String? (readonly)
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.
43 44 45 |
# File 'ecr_assets/tarball_image_asset_props.rb', line 43 def display_name @display_name end |
#tarball_file ⇒ String (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.
23 24 25 |
# File 'ecr_assets/tarball_image_asset_props.rb', line 23 def tarball_file @tarball_file end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |