Class: AWSCDK::CloudFront::ImportSource

Inherits:
Jsii::Object
  • Object
show all
Defined in:
cloud_front/import_source.rb

Overview

The data to be imported to the key value store.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeImportSource

Returns a new instance of ImportSource.



8
9
10
# File 'cloud_front/import_source.rb', line 8

def initialize
  Jsii::Object.instance_method(:initialize).bind(self).call
end

Class Method Details

.from_asset(path, options = nil) ⇒ AWSCDK::CloudFront::ImportSource

An import source that exists as a local file.

Parameters:

  • path (String)

    the path to the local file.

  • options (AWSCDK::S3Assets::AssetOptions, nil) (defaults to: nil)

    the configuration for the temporarily created S3 file.

Returns:

  • (AWSCDK::CloudFront::ImportSource)


22
23
24
25
26
27
# File 'cloud_front/import_source.rb', line 22

def self.from_asset(path, options = nil)
  Jsii::Type.check_type(path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path")
  options = options.is_a?(Hash) ? ::AWSCDK::S3Assets::AssetOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczNfYXNzZXRzLkFzc2V0T3B0aW9ucyJ9")), "options") unless options.nil?
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudfront.ImportSource", "fromAsset", [path, options])
end

.from_bucket(bucket, key) ⇒ AWSCDK::CloudFront::ImportSource

An import source that exists as an object in an S3 bucket.

Parameters:

  • bucket (AWSCDK::S3::IBucket)

    the S3 bucket that contains the data.

  • key (String)

    the key within the S3 bucket that contains the data.

Returns:

  • (AWSCDK::CloudFront::ImportSource)


34
35
36
37
38
# File 'cloud_front/import_source.rb', line 34

def self.from_bucket(bucket, key)
  Jsii::Type.check_type(bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket")
  Jsii::Type.check_type(key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudfront.ImportSource", "fromBucket", [bucket, key])
end

.from_inline(data) ⇒ AWSCDK::CloudFront::ImportSource

An import source that uses an inline string.

Parameters:

  • data (String)

    the contents of the KeyValueStore.

Returns:

  • (AWSCDK::CloudFront::ImportSource)


44
45
46
47
# File 'cloud_front/import_source.rb', line 44

def self.from_inline(data)
  Jsii::Type.check_type(data, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "data")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudfront.ImportSource", "fromInline", [data])
end

.jsii_overridable_methodsObject



12
13
14
15
# File 'cloud_front/import_source.rb', line 12

def self.jsii_overridable_methods
  {
  }
end