UNPKG

1.97 kBTypeScriptView Raw
1import { CfnProject } from './codebuild.generated';
2import { IProject } from './project';
3import { Construct as CoreConstruct } from '@aws-cdk/core';
4/**
5 * The type returned from {@link IFileSystemLocation#bind}.
6 */
7export interface FileSystemConfig {
8 /**
9 * File system location wrapper property.
10 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectfilesystemlocation.html
11 */
12 readonly location: CfnProject.ProjectFileSystemLocationProperty;
13}
14/**
15 * The interface of a CodeBuild FileSystemLocation.
16 * Implemented by {@link EfsFileSystemLocation}.
17 */
18export interface IFileSystemLocation {
19 /**
20 * Called by the project when a file system is added so it can perform
21 * binding operations on this file system location.
22 */
23 bind(scope: CoreConstruct, project: IProject): FileSystemConfig;
24}
25/**
26 * FileSystemLocation provider definition for a CodeBuild Project.
27 */
28export declare class FileSystemLocation {
29 /**
30 * EFS file system provider.
31 * @param props the EFS File System location property.
32 */
33 static efs(props: EfsFileSystemLocationProps): IFileSystemLocation;
34}
35/**
36 * Construction properties for {@link EfsFileSystemLocation}.
37 */
38export interface EfsFileSystemLocationProps {
39 /**
40 * The name used to access a file system created by Amazon EFS.
41 */
42 readonly identifier: string;
43 /**
44 * A string that specifies the location of the file system, like Amazon EFS.
45 *
46 * This value looks like `fs-abcd1234.efs.us-west-2.amazonaws.com:/my-efs-mount-directory`.
47 */
48 readonly location: string;
49 /**
50 * The mount options for a file system such as Amazon EFS.
51 * @default 'nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2'.
52 */
53 readonly mountOptions?: string;
54 /**
55 * The location in the container where you mount the file system.
56 */
57 readonly mountPoint: string;
58}