aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 1.45 kB
JavaScript
;var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.FileSystem=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),iam=require("../../aws-iam"),core_1=require("../../core");class FileSystem{constructor(config){this.config=config;try{jsiiDeprecationWarnings.aws_cdk_lib_aws_lambda_FileSystemConfig(config)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,FileSystem),error}}static fromEfsAccessPoint(ap,mountPath){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_efs_IAccessPoint(ap)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromEfsAccessPoint),error}return new FileSystem({localMountPath:mountPath,arn:ap.accessPointArn,dependency:[ap.fileSystem.mountTargetsAvailable],connections:ap.fileSystem.connections,policies:[new iam.PolicyStatement({actions:["elasticfilesystem:ClientMount"],resources:["*"],conditions:{StringEquals:{"elasticfilesystem:AccessPointArn":ap.accessPointArn}}}),new iam.PolicyStatement({actions:["elasticfilesystem:ClientWrite"],resources:[core_1.Stack.of(ap).formatArn({service:"elasticfilesystem",resource:"file-system",resourceName:ap.fileSystem.fileSystemId})]})]})}}exports.FileSystem=FileSystem,_a=JSII_RTTI_SYMBOL_1,FileSystem[_a]={fqn:"aws-cdk-lib.aws_lambda.FileSystem",version:"2.70.0"};