Class: AWSCDK::S3Deployment::SourceConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3Deployment::SourceConfig
- Defined in:
- s3_deployment/source_config.rb
Overview
Source information.
Instance Attribute Summary collapse
-
#bucket ⇒ AWSCDK::S3::IBucket
readonly
The source bucket to deploy from.
-
#markers ⇒ Hash{String => Object}?
readonly
A set of markers to substitute in the source content.
-
#markers_config ⇒ AWSCDK::S3Deployment::MarkersConfig?
readonly
A configuration for markers substitution strategy.
-
#zip_object_key ⇒ String
readonly
An S3 object key in the source bucket that points to a zip file.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(bucket:, zip_object_key:, markers: nil, markers_config: nil) ⇒ SourceConfig
constructor
A new instance of SourceConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(bucket:, zip_object_key:, markers: nil, markers_config: nil) ⇒ SourceConfig
Returns a new instance of SourceConfig.
11 12 13 14 15 16 17 18 19 20 |
# File 's3_deployment/source_config.rb', line 11 def initialize(bucket:, zip_object_key:, markers: nil, markers_config: nil) @bucket = bucket Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket") @zip_object_key = zip_object_key Jsii::Type.check_type(@zip_object_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "zipObjectKey") @markers = markers Jsii::Type.check_type(@markers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "markers") unless @markers.nil? @markers_config = markers_config.is_a?(Hash) ? ::AWSCDK::S3Deployment::MarkersConfig.new(**markers_config.transform_keys(&:to_sym)) : markers_config Jsii::Type.check_type(@markers_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczNfZGVwbG95bWVudC5NYXJrZXJzQ29uZmlnIn0=")), "markersConfig") unless @markers_config.nil? end |
Instance Attribute Details
#bucket ⇒ AWSCDK::S3::IBucket (readonly)
The source bucket to deploy from.
25 26 27 |
# File 's3_deployment/source_config.rb', line 25 def bucket @bucket end |
#markers ⇒ Hash{String => Object}? (readonly)
Note:
Default: - no markers
A set of markers to substitute in the source content.
34 35 36 |
# File 's3_deployment/source_config.rb', line 34 def markers @markers end |
#markers_config ⇒ AWSCDK::S3Deployment::MarkersConfig? (readonly)
Note:
Default: - no configuration
A configuration for markers substitution strategy.
39 40 41 |
# File 's3_deployment/source_config.rb', line 39 def markers_config @markers_config end |
#zip_object_key ⇒ String (readonly)
An S3 object key in the source bucket that points to a zip file.
29 30 31 |
# File 's3_deployment/source_config.rb', line 29 def zip_object_key @zip_object_key end |
Class Method Details
.jsii_properties ⇒ Object
41 42 43 44 45 46 47 48 |
# File 's3_deployment/source_config.rb', line 41 def self.jsii_properties { :bucket => "bucket", :zip_object_key => "zipObjectKey", :markers => "markers", :markers_config => "markersConfig", } end |
Instance Method Details
#to_jsii ⇒ Object
50 51 52 53 54 55 56 57 58 59 |
# File 's3_deployment/source_config.rb', line 50 def to_jsii result = {} result.merge!({ "bucket" => @bucket, "zipObjectKey" => @zip_object_key, "markers" => @markers, "markersConfig" => @markers_config, }) result.compact end |