@@ -13,6 +13,12 @@ import { CfnFileSystem, CfnMountTarget } from './efs.generated';
13
13
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-filesystem.html#cfn-elasticfilesystem-filesystem-lifecyclepolicies
14
14
*/
15
15
export enum LifecyclePolicy {
16
+
17
+ /**
18
+ * After 1 day of not being accessed.
19
+ */
20
+ AFTER_1_DAY = 'AFTER_1_DAY' ,
21
+
16
22
/**
17
23
* After 7 days of not being accessed.
18
24
*/
@@ -82,14 +88,19 @@ export enum PerformanceMode {
82
88
*/
83
89
export enum ThroughputMode {
84
90
/**
85
- * This mode on Amazon EFS scales as the size of the file system in the standard storage class grows.
91
+ * This mode scales as the size of the file system in the standard storage class grows.
86
92
*/
87
93
BURSTING = 'bursting' ,
88
94
89
95
/**
90
96
* This mode can instantly provision the throughput of the file system (in MiB/s) independent of the amount of data stored.
91
97
*/
92
- PROVISIONED = 'provisioned'
98
+ PROVISIONED = 'provisioned' ,
99
+
100
+ /**
101
+ * This mode scales the throughput automatically regardless of file system size.
102
+ */
103
+ ELASTIC = 'elastic'
93
104
}
94
105
95
106
/**
@@ -333,6 +344,9 @@ export class FileSystem extends FileSystemBase {
333
344
throw new Error ( 'Property provisionedThroughputPerSecond is required when throughputMode is PROVISIONED' ) ;
334
345
}
335
346
347
+ if ( props . throughputMode === ThroughputMode . ELASTIC && props . performanceMode === PerformanceMode . MAX_IO ) {
348
+ throw new Error ( 'ThroughputMode ELASTIC is not supported for file systems with performanceMode MAX_IO' ) ;
349
+ }
336
350
// we explictly use 'undefined' to represent 'false' to maintain backwards compatibility since
337
351
// its considered an actual change in CloudFormations eyes, even though they have the same meaning.
338
352
const encrypted = props . encrypted ?? ( FeatureFlags . of ( this ) . isEnabled (
0 commit comments