Class: AWSCDK::Lambda::FileSystem

Inherits:
Jsii::Object
  • Object
show all
Defined in:
lambda/file_system.rb

Overview

Represents the filesystem for the Lambda function.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ FileSystem

Returns a new instance of FileSystem.

Parameters:



9
10
11
12
13
# File 'lambda/file_system.rb', line 9

def initialize(config)
  config = config.is_a?(Hash) ? ::AWSCDK::Lambda::FileSystemConfig.new(**config.transform_keys(&:to_sym)) : config
  Jsii::Type.check_type(config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkZpbGVTeXN0ZW1Db25maWcifQ==")), "config")
  Jsii::Object.instance_method(:initialize).bind(self).call(config)
end

Class Method Details

.from_efs_access_point(ap, mount_path) ⇒ AWSCDK::Lambda::FileSystem

mount the filesystem from Amazon EFS.

Parameters:

  • ap (AWSCDK::EFS::IAccessPoint)

    the Amazon EFS access point.

  • mount_path (String)

    the target path in the lambda runtime environment.

Returns:

  • (AWSCDK::Lambda::FileSystem)


26
27
28
29
30
# File 'lambda/file_system.rb', line 26

def self.from_efs_access_point(ap, mount_path)
  Jsii::Type.check_type(ap, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWZzLklBY2Nlc3NQb2ludCJ9")), "ap")
  Jsii::Type.check_type(mount_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mountPath")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_lambda.FileSystem", "fromEfsAccessPoint", [ap, mount_path])
end

.from_s3_files_access_point(ap, mount_path) ⇒ AWSCDK::Lambda::FileSystem

Mount the filesystem from Amazon S3 Files.

Parameters:

Returns:

  • (AWSCDK::Lambda::FileSystem)


37
38
39
40
41
# File 'lambda/file_system.rb', line 37

def self.from_s3_files_access_point(ap, mount_path)
  Jsii::Type.check_type(ap, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19zM2ZpbGVzLklBY2Nlc3NQb2ludFJlZiJ9")), "ap")
  Jsii::Type.check_type(mount_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mountPath")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_lambda.FileSystem", "fromS3FilesAccessPoint", [ap, mount_path])
end

.jsii_overridable_methodsObject



15
16
17
18
19
# File 'lambda/file_system.rb', line 15

def self.jsii_overridable_methods
  {
    :config => { kind: :property, name: "config", is_optional: false },
  }
end

Instance Method Details

#configAWSCDK::Lambda::FileSystemConfig

the FileSystem configurations for the Lambda function.



46
47
48
# File 'lambda/file_system.rb', line 46

def config()
  jsii_get_property("config")
end