Class: AWSCDK::S3Deployment::DeployTimeSubstitutedFileProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3Deployment::DeployTimeSubstitutedFileProps
- Defined in:
- s3_deployment/deploy_time_substituted_file_props.rb
Instance Attribute Summary collapse
-
#destination_bucket ⇒ AWSCDK::S3::IBucket
readonly
The S3 bucket to sync the contents of the zip file to.
-
#destination_key ⇒ String?
readonly
The object key in the destination bucket where the processed file would be written to.
-
#role ⇒ AWSCDK::IAM::IRole?
readonly
Execution role associated with this function.
-
#source ⇒ String
readonly
Path to the user's local file.
-
#substitutions ⇒ Hash{String => String}
readonly
User-defined substitutions to make in the file.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(destination_bucket:, source:, substitutions:, destination_key: nil, role: nil) ⇒ DeployTimeSubstitutedFileProps
constructor
A new instance of DeployTimeSubstitutedFileProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(destination_bucket:, source:, substitutions:, destination_key: nil, role: nil) ⇒ DeployTimeSubstitutedFileProps
Returns a new instance of DeployTimeSubstitutedFileProps.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 's3_deployment/deploy_time_substituted_file_props.rb', line 11 def initialize(destination_bucket:, source:, substitutions:, destination_key: nil, role: nil) @destination_bucket = destination_bucket Jsii::Type.check_type(@destination_bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "destinationBucket") @source = source Jsii::Type.check_type(@source, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "source") @substitutions = substitutions Jsii::Type.check_type(@substitutions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "substitutions") @destination_key = destination_key Jsii::Type.check_type(@destination_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "destinationKey") unless @destination_key.nil? @role = role Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil? end |
Instance Attribute Details
#destination_bucket ⇒ AWSCDK::S3::IBucket (readonly)
The S3 bucket to sync the contents of the zip file to.
27 28 29 |
# File 's3_deployment/deploy_time_substituted_file_props.rb', line 27 def destination_bucket @destination_bucket end |
#destination_key ⇒ String? (readonly)
Default: - Fingerprint of the file content would be used as object key
The object key in the destination bucket where the processed file would be written to.
45 46 47 |
# File 's3_deployment/deploy_time_substituted_file_props.rb', line 45 def destination_key @destination_key end |
#role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - A role is automatically created
Execution role associated with this function.
50 51 52 |
# File 's3_deployment/deploy_time_substituted_file_props.rb', line 50 def role @role end |
#source ⇒ String (readonly)
Path to the user's local file.
31 32 33 |
# File 's3_deployment/deploy_time_substituted_file_props.rb', line 31 def source @source end |
#substitutions ⇒ Hash{String => String} (readonly)
User-defined substitutions to make in the file.
Placeholders in the user's local file must be specified with double curly brackets and spaces. For example, if you use the key 'xxxx' in the file, it must be written as: xxxx } to be recognized by the construct as a substitution.
40 41 42 |
# File 's3_deployment/deploy_time_substituted_file_props.rb', line 40 def substitutions @substitutions end |
Class Method Details
.jsii_properties ⇒ Object
52 53 54 55 56 57 58 59 60 |
# File 's3_deployment/deploy_time_substituted_file_props.rb', line 52 def self.jsii_properties { :destination_bucket => "destinationBucket", :source => "source", :substitutions => "substitutions", :destination_key => "destinationKey", :role => "role", } end |
Instance Method Details
#to_jsii ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 |
# File 's3_deployment/deploy_time_substituted_file_props.rb', line 62 def to_jsii result = {} result.merge!({ "destinationBucket" => @destination_bucket, "source" => @source, "substitutions" => @substitutions, "destinationKey" => @destination_key, "role" => @role, }) result.compact end |