"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.FileSystem=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp};class FileSystem{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})]})]})}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}}}exports.FileSystem=FileSystem,_a=JSII_RTTI_SYMBOL_1,FileSystem[_a]={fqn:"aws-cdk-lib.aws_lambda.FileSystem",version:"2.148.1"};
