Class: AWSCDK::AssetManifestFileDestination
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AssetManifestFileDestination
- Defined in:
- asset_manifest_file_destination.rb
Overview
The destination for a file asset, when it is given to the AssetManifestBuilder.
Instance Attribute Summary collapse
-
#bucket_name ⇒ String
readonly
Bucket name where the file asset should be written.
-
#bucket_prefix ⇒ String?
readonly
Prefix to prepend to the asset hash.
-
#role ⇒ AWSCDK::RoleOptions?
readonly
Role to use for uploading.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(bucket_name:, bucket_prefix: nil, role: nil) ⇒ AssetManifestFileDestination
constructor
A new instance of AssetManifestFileDestination.
- #to_jsii ⇒ Object
Constructor Details
#initialize(bucket_name:, bucket_prefix: nil, role: nil) ⇒ AssetManifestFileDestination
Returns a new instance of AssetManifestFileDestination.
10 11 12 13 14 15 16 17 |
# File 'asset_manifest_file_destination.rb', line 10 def initialize(bucket_name:, bucket_prefix: nil, role: nil) @bucket_name = bucket_name Jsii::Type.check_type(@bucket_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucketName") @bucket_prefix = bucket_prefix Jsii::Type.check_type(@bucket_prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucketPrefix") unless @bucket_prefix.nil? @role = role.is_a?(Hash) ? ::AWSCDK::RoleOptions.new(**role.transform_keys(&:to_sym)) : role Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5Sb2xlT3B0aW9ucyJ9")), "role") unless @role.nil? end |
Instance Attribute Details
#bucket_name ⇒ String (readonly)
Bucket name where the file asset should be written.
22 23 24 |
# File 'asset_manifest_file_destination.rb', line 22 def bucket_name @bucket_name end |
#bucket_prefix ⇒ String? (readonly)
Note:
Default: ''
Prefix to prepend to the asset hash.
27 28 29 |
# File 'asset_manifest_file_destination.rb', line 27 def bucket_prefix @bucket_prefix end |
#role ⇒ AWSCDK::RoleOptions? (readonly)
Note:
Default: - current role
Role to use for uploading.
32 33 34 |
# File 'asset_manifest_file_destination.rb', line 32 def role @role end |
Class Method Details
.jsii_properties ⇒ Object
34 35 36 37 38 39 40 |
# File 'asset_manifest_file_destination.rb', line 34 def self.jsii_properties { :bucket_name => "bucketName", :bucket_prefix => "bucketPrefix", :role => "role", } end |
Instance Method Details
#to_jsii ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'asset_manifest_file_destination.rb', line 42 def to_jsii result = {} result.merge!({ "bucketName" => @bucket_name, "bucketPrefix" => @bucket_prefix, "role" => @role, }) result.compact end |