Class: AWSCDK::S3Deployment::SourceConfig

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
s3_deployment/source_config.rb

Overview

Source information.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bucket:, zip_object_key:, markers: nil, markers_config: nil) ⇒ SourceConfig

Returns a new instance of SourceConfig.

Parameters:

  • bucket (AWSCDK::S3::IBucket)

    The source bucket to deploy from.

  • zip_object_key (String)

    An S3 object key in the source bucket that points to a zip file.

  • markers (Hash{String => Object}, nil) (defaults to: nil)

    A set of markers to substitute in the source content.

  • markers_config (AWSCDK::S3Deployment::MarkersConfig, nil) (defaults to: nil)

    A configuration for markers substitution strategy.



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

#bucketAWSCDK::S3::IBucket (readonly)

The source bucket to deploy from.

Returns:



25
26
27
# File 's3_deployment/source_config.rb', line 25

def bucket
  @bucket
end

#markersHash{String => Object}? (readonly)

Note:

Default: - no markers

A set of markers to substitute in the source content.

Returns:

  • (Hash{String => Object}, nil)


34
35
36
# File 's3_deployment/source_config.rb', line 34

def markers
  @markers
end

#markers_configAWSCDK::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_keyString (readonly)

An S3 object key in the source bucket that points to a zip file.

Returns:

  • (String)


29
30
31
# File 's3_deployment/source_config.rb', line 29

def zip_object_key
  @zip_object_key
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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