import * as datasync from "@distilled.cloud/aws/datasync"; import * as Provider from "../../Provider.ts"; import { Resource } from "../../Resource.ts"; import type { Providers } from "../Providers.ts"; export interface LocationEfsProps { /** * ARN of the Amazon EFS file system this location points at. Cannot be * changed after creation (replacement). */ efsFilesystemArn: string; /** * ARN of the subnet where DataSync creates the network interface used to * mount the file system. The subnet must have an EFS mount target for the * file system. Cannot be changed after creation (replacement). */ subnetArn: string; /** * ARNs of the security groups applied to the DataSync network interface. * Must allow NFS (2049) to the file system's mount target. Cannot be * changed after creation (replacement). */ securityGroupArns: string[]; /** * Subdirectory within the file system to sync, e.g. `/data`. Cannot be * changed after creation (replacement). * @default the file-system root */ subdirectory?: string; /** * ARN of an EFS access point DataSync mounts through. Cannot be changed * after creation (replacement). */ accessPointArn?: string; /** * ARN of the IAM role DataSync assumes to mount the file system (required * when using an access point or in-transit encryption). Cannot be changed * after creation (replacement). */ fileSystemAccessRoleArn?: string; /** * Whether DataSync encrypts data in transit with TLS 1.2. Required when * mounting through an access point. Cannot be changed after creation * (replacement). */ inTransitEncryption?: datasync.EfsInTransitEncryption; /** * Tags to apply to the location. Merged with internal Alchemy tags. */ tags?: Record; } export interface LocationEfs extends Resource<"AWS.DataSync.LocationEfs", LocationEfsProps, { /** ARN of the DataSync location. */ locationArn: string; /** URI of the location (`efs://…`). */ locationUri: string; }, {}, Providers> { } /** * A DataSync location backed by an Amazon EFS file system. Used as a source * or destination endpoint of a {@link Task}. * * EFS locations are immutable apart from their tags: any change to the file * system, subnet, security groups, subdirectory, access point, or encryption * replaces the location. * * ### Creating EFS Locations * **Example:** File system + subnet + security group * ```typescript * import * as AWS from "alchemy/AWS"; * * const location = yield* AWS.DataSync.LocationEfs("Files", { * efsFilesystemArn: files.fileSystemArn, * subnetArn: `arn:aws:ec2:${region}:${accountId}:subnet/${subnetId}`, * securityGroupArns: [ * `arn:aws:ec2:${region}:${accountId}:security-group/${sgId}`, * ], * }); * ``` * * ### Transferring Data * **Example:** Back up EFS to S3 * ```typescript * const dest = yield* AWS.DataSync.LocationS3("Backups", { * s3BucketArn: bucket.bucketArn, * bucketAccessRoleArn: role.roleArn, * }); * * const task = yield* AWS.DataSync.Task("EfsBackup", { * sourceLocationArn: location.locationArn, * destinationLocationArn: dest.locationArn, * schedule: { ScheduleExpression: "cron(0 2 * * ? *)" }, * }); * ``` * * @resource */ export declare const LocationEfs: import("../../Resource.ts").ResourceClass; export declare const LocationEfsProvider: () => import("effect/Layer").Layer, never, import("@distilled.cloud/aws/Credentials").Credentials | import("effect/unstable/http/HttpClient").HttpClient | import("../../Stack.ts").Stack | import("../../Stage.ts").Stage>; //# sourceMappingURL=LocationEfs.d.ts.map