Class: AWSCDK::EFS::FileSystemProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EFS::FileSystemProps
- Defined in:
- efs/file_system_props.rb
Overview
Properties of EFS FileSystem.
Instance Attribute Summary collapse
-
#allow_anonymous_access ⇒ Boolean?
readonly
Allow access from anonymous client that doesn't use IAM authentication.
-
#enable_automatic_backups ⇒ Boolean?
readonly
Whether to enable automatic backups for the file system.
-
#encrypted ⇒ Boolean?
readonly
Defines if the data at rest in the file system is encrypted or not.
-
#file_system_name ⇒ String?
readonly
The file system's name.
-
#file_system_policy ⇒ AWSCDK::IAM::PolicyDocument?
readonly
File system policy is an IAM resource policy used to control NFS access to an EFS file system.
-
#kms_key ⇒ AWSCDK::Interfaces::AWSKMS::IKeyRef?
readonly
The KMS key used for encryption.
-
#lifecycle_policy ⇒ AWSCDK::EFS::LifecyclePolicy?
readonly
A policy used by EFS lifecycle management to transition files to the Infrequent Access (IA) storage class.
-
#one_zone ⇒ Boolean?
readonly
Whether this is a One Zone file system.
-
#out_of_infrequent_access_policy ⇒ AWSCDK::EFS::OutOfInfrequentAccessPolicy?
readonly
A policy used by EFS lifecycle management to transition files from Infrequent Access (IA) storage class to primary storage class.
-
#performance_mode ⇒ AWSCDK::EFS::PerformanceMode?
readonly
The performance mode that the file system will operate under.
-
#provisioned_throughput_per_second ⇒ AWSCDK::Size?
readonly
Provisioned throughput for the file system.
-
#removal_policy ⇒ AWSCDK::RemovalPolicy?
readonly
The removal policy to apply to the file system.
-
#replication_configuration ⇒ AWSCDK::EFS::ReplicationConfiguration?
readonly
Replication configuration for the file system.
-
#replication_overwrite_protection ⇒ AWSCDK::EFS::ReplicationOverwriteProtection?
readonly
Whether to enable the filesystem's replication overwrite protection or not.
-
#security_group ⇒ AWSCDK::EC2::ISecurityGroup?
readonly
Security Group to assign to this file system.
-
#throughput_mode ⇒ AWSCDK::EFS::ThroughputMode?
readonly
Enum to mention the throughput mode of the file system.
-
#transition_to_archive_policy ⇒ AWSCDK::EFS::LifecyclePolicy?
readonly
The number of days after files were last accessed in primary storage (the Standard storage class) at which to move them to Archive storage.
-
#vpc ⇒ AWSCDK::EC2::IVPC
readonly
VPC to launch the file system in.
-
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection?
readonly
Which subnets to place the mount target in the VPC.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(vpc:, allow_anonymous_access: nil, enable_automatic_backups: nil, encrypted: nil, file_system_name: nil, file_system_policy: nil, kms_key: nil, lifecycle_policy: nil, one_zone: nil, out_of_infrequent_access_policy: nil, performance_mode: nil, provisioned_throughput_per_second: nil, removal_policy: nil, replication_configuration: nil, replication_overwrite_protection: nil, security_group: nil, throughput_mode: nil, transition_to_archive_policy: nil, vpc_subnets: nil) ⇒ FileSystemProps
constructor
A new instance of FileSystemProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(vpc:, allow_anonymous_access: nil, enable_automatic_backups: nil, encrypted: nil, file_system_name: nil, file_system_policy: nil, kms_key: nil, lifecycle_policy: nil, one_zone: nil, out_of_infrequent_access_policy: nil, performance_mode: nil, provisioned_throughput_per_second: nil, removal_policy: nil, replication_configuration: nil, replication_overwrite_protection: nil, security_group: nil, throughput_mode: nil, transition_to_archive_policy: nil, vpc_subnets: nil) ⇒ FileSystemProps
Returns a new instance of FileSystemProps.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'efs/file_system_props.rb', line 26 def initialize(vpc:, allow_anonymous_access: nil, enable_automatic_backups: nil, encrypted: nil, file_system_name: nil, file_system_policy: nil, kms_key: nil, lifecycle_policy: nil, one_zone: nil, out_of_infrequent_access_policy: nil, performance_mode: nil, provisioned_throughput_per_second: nil, removal_policy: nil, replication_configuration: nil, replication_overwrite_protection: nil, security_group: nil, throughput_mode: nil, transition_to_archive_policy: nil, vpc_subnets: nil) @vpc = vpc Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") @allow_anonymous_access = allow_anonymous_access Jsii::Type.check_type(@allow_anonymous_access, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "allowAnonymousAccess") unless @allow_anonymous_access.nil? @enable_automatic_backups = enable_automatic_backups Jsii::Type.check_type(@enable_automatic_backups, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enableAutomaticBackups") unless @enable_automatic_backups.nil? @encrypted = encrypted Jsii::Type.check_type(@encrypted, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "encrypted") unless @encrypted.nil? @file_system_name = file_system_name Jsii::Type.check_type(@file_system_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "fileSystemName") unless @file_system_name.nil? @file_system_policy = file_system_policy Jsii::Type.check_type(@file_system_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLlBvbGljeURvY3VtZW50In0=")), "fileSystemPolicy") unless @file_system_policy.nil? @kms_key = kms_key Jsii::Type.check_type(@kms_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19rbXMuSUtleVJlZiJ9")), "kmsKey") unless @kms_key.nil? @lifecycle_policy = lifecycle_policy Jsii::Type.check_type(@lifecycle_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWZzLkxpZmVjeWNsZVBvbGljeSJ9")), "lifecyclePolicy") unless @lifecycle_policy.nil? @one_zone = one_zone Jsii::Type.check_type(@one_zone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "oneZone") unless @one_zone.nil? @out_of_infrequent_access_policy = out_of_infrequent_access_policy Jsii::Type.check_type(@out_of_infrequent_access_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWZzLk91dE9mSW5mcmVxdWVudEFjY2Vzc1BvbGljeSJ9")), "outOfInfrequentAccessPolicy") unless @out_of_infrequent_access_policy.nil? @performance_mode = performance_mode Jsii::Type.check_type(@performance_mode, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWZzLlBlcmZvcm1hbmNlTW9kZSJ9")), "performanceMode") unless @performance_mode.nil? @provisioned_throughput_per_second = provisioned_throughput_per_second Jsii::Type.check_type(@provisioned_throughput_per_second, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TaXplIn0=")), "provisionedThroughputPerSecond") unless @provisioned_throughput_per_second.nil? @removal_policy = removal_policy Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil? @replication_configuration = replication_configuration Jsii::Type.check_type(@replication_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWZzLlJlcGxpY2F0aW9uQ29uZmlndXJhdGlvbiJ9")), "replicationConfiguration") unless @replication_configuration.nil? @replication_overwrite_protection = replication_overwrite_protection Jsii::Type.check_type(@replication_overwrite_protection, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWZzLlJlcGxpY2F0aW9uT3ZlcndyaXRlUHJvdGVjdGlvbiJ9")), "replicationOverwriteProtection") unless @replication_overwrite_protection.nil? @security_group = security_group Jsii::Type.check_type(@security_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklTZWN1cml0eUdyb3VwIn0=")), "securityGroup") unless @security_group.nil? @throughput_mode = throughput_mode Jsii::Type.check_type(@throughput_mode, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWZzLlRocm91Z2hwdXRNb2RlIn0=")), "throughputMode") unless @throughput_mode.nil? @transition_to_archive_policy = transition_to_archive_policy Jsii::Type.check_type(@transition_to_archive_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWZzLkxpZmVjeWNsZVBvbGljeSJ9")), "transitionToArchivePolicy") unless @transition_to_archive_policy.nil? @vpc_subnets = vpc_subnets.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**vpc_subnets.transform_keys(&:to_sym)) : vpc_subnets Jsii::Type.check_type(@vpc_subnets, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlN1Ym5ldFNlbGVjdGlvbiJ9")), "vpcSubnets") unless @vpc_subnets.nil? end |
Instance Attribute Details
#allow_anonymous_access ⇒ Boolean? (readonly)
Default: false when using grantRead, grantWrite, grantRootAccess or set @aws-cdk/aws-efs:denyAnonymousAccess feature flag, otherwise true
Allow access from anonymous client that doesn't use IAM authentication.
75 76 77 |
# File 'efs/file_system_props.rb', line 75 def allow_anonymous_access @allow_anonymous_access end |
#enable_automatic_backups ⇒ Boolean? (readonly)
Default: false
Whether to enable automatic backups for the file system.
80 81 82 |
# File 'efs/file_system_props.rb', line 80 def enable_automatic_backups @enable_automatic_backups end |
#encrypted ⇒ Boolean? (readonly)
Default: - If your application has the '@aws-cdk/aws-efs:defaultEncryptionAtRest' feature flag set, the default is true, otherwise, the default is false.
Defines if the data at rest in the file system is encrypted or not.
85 86 87 |
# File 'efs/file_system_props.rb', line 85 def encrypted @encrypted end |
#file_system_name ⇒ String? (readonly)
Default: - CDK generated name
The file system's name.
90 91 92 |
# File 'efs/file_system_props.rb', line 90 def file_system_name @file_system_name end |
#file_system_policy ⇒ AWSCDK::IAM::PolicyDocument? (readonly)
Default: none
File system policy is an IAM resource policy used to control NFS access to an EFS file system.
95 96 97 |
# File 'efs/file_system_props.rb', line 95 def file_system_policy @file_system_policy end |
#kms_key ⇒ AWSCDK::Interfaces::AWSKMS::IKeyRef? (readonly)
Default: - if 'encrypted' is true, the default key for EFS (/aws/elasticfilesystem) is used
The KMS key used for encryption.
This is required to encrypt the data at rest if
102 103 104 |
# File 'efs/file_system_props.rb', line 102 def kms_key @kms_key end |
#lifecycle_policy ⇒ AWSCDK::EFS::LifecyclePolicy? (readonly)
Default: - None. EFS will not transition files to the IA storage class.
A policy used by EFS lifecycle management to transition files to the Infrequent Access (IA) storage class.
107 108 109 |
# File 'efs/file_system_props.rb', line 107 def lifecycle_policy @lifecycle_policy end |
#one_zone ⇒ Boolean? (readonly)
Default: false
Whether this is a One Zone file system.
If enabled, performance_mode must be set to GENERAL_PURPOSE and vpc_subnets cannot be set.
114 115 116 |
# File 'efs/file_system_props.rb', line 114 def one_zone @one_zone end |
#out_of_infrequent_access_policy ⇒ AWSCDK::EFS::OutOfInfrequentAccessPolicy? (readonly)
Default: - None. EFS will not transition files from IA storage to primary storage.
A policy used by EFS lifecycle management to transition files from Infrequent Access (IA) storage class to primary storage class.
119 120 121 |
# File 'efs/file_system_props.rb', line 119 def out_of_infrequent_access_policy @out_of_infrequent_access_policy end |
#performance_mode ⇒ AWSCDK::EFS::PerformanceMode? (readonly)
Default: PerformanceMode.GENERAL_PURPOSE
The performance mode that the file system will operate under.
An Amazon EFS file system's performance mode can't be changed after the file system has been created. Updating this property will replace the file system.
127 128 129 |
# File 'efs/file_system_props.rb', line 127 def performance_mode @performance_mode end |
#provisioned_throughput_per_second ⇒ AWSCDK::Size? (readonly)
Default: - none, errors out
Provisioned throughput for the file system.
This is a required property if the throughput mode is set to PROVISIONED. Must be at least 1MiB/s.
135 136 137 |
# File 'efs/file_system_props.rb', line 135 def provisioned_throughput_per_second @provisioned_throughput_per_second end |
#removal_policy ⇒ AWSCDK::RemovalPolicy? (readonly)
Default: RemovalPolicy.RETAIN
The removal policy to apply to the file system.
140 141 142 |
# File 'efs/file_system_props.rb', line 140 def removal_policy @removal_policy end |
#replication_configuration ⇒ AWSCDK::EFS::ReplicationConfiguration? (readonly)
Default: - no replication
Replication configuration for the file system.
145 146 147 |
# File 'efs/file_system_props.rb', line 145 def replication_configuration @replication_configuration end |
#replication_overwrite_protection ⇒ AWSCDK::EFS::ReplicationOverwriteProtection? (readonly)
Default: ReplicationOverwriteProtection.ENABLED
Whether to enable the filesystem's replication overwrite protection or not.
Set false if you want to create a read-only filesystem for use as a replication destination.
153 154 155 |
# File 'efs/file_system_props.rb', line 153 def replication_overwrite_protection @replication_overwrite_protection end |
#security_group ⇒ AWSCDK::EC2::ISecurityGroup? (readonly)
Default: - creates new security group which allows all outbound traffic
Security Group to assign to this file system.
158 159 160 |
# File 'efs/file_system_props.rb', line 158 def security_group @security_group end |
#throughput_mode ⇒ AWSCDK::EFS::ThroughputMode? (readonly)
Default: ThroughputMode.BURSTING
Enum to mention the throughput mode of the file system.
163 164 165 |
# File 'efs/file_system_props.rb', line 163 def throughput_mode @throughput_mode end |
#transition_to_archive_policy ⇒ AWSCDK::EFS::LifecyclePolicy? (readonly)
Default: - None. EFS will not transition files to Archive storage class.
The number of days after files were last accessed in primary storage (the Standard storage class) at which to move them to Archive storage.
Metadata operations such as listing the contents of a directory don't count as file access events.
170 171 172 |
# File 'efs/file_system_props.rb', line 170 def transition_to_archive_policy @transition_to_archive_policy end |
#vpc ⇒ AWSCDK::EC2::IVPC (readonly)
VPC to launch the file system in.
70 71 72 |
# File 'efs/file_system_props.rb', line 70 def vpc @vpc end |
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection? (readonly)
Default: - the Vpc default strategy if not specified
Which subnets to place the mount target in the VPC.
175 176 177 |
# File 'efs/file_system_props.rb', line 175 def vpc_subnets @vpc_subnets end |
Class Method Details
.jsii_properties ⇒ Object
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'efs/file_system_props.rb', line 177 def self.jsii_properties { :vpc => "vpc", :allow_anonymous_access => "allowAnonymousAccess", :enable_automatic_backups => "enableAutomaticBackups", :encrypted => "encrypted", :file_system_name => "fileSystemName", :file_system_policy => "fileSystemPolicy", :kms_key => "kmsKey", :lifecycle_policy => "lifecyclePolicy", :one_zone => "oneZone", :out_of_infrequent_access_policy => "outOfInfrequentAccessPolicy", :performance_mode => "performanceMode", :provisioned_throughput_per_second => "provisionedThroughputPerSecond", :removal_policy => "removalPolicy", :replication_configuration => "replicationConfiguration", :replication_overwrite_protection => "replicationOverwriteProtection", :security_group => "securityGroup", :throughput_mode => "throughputMode", :transition_to_archive_policy => "transitionToArchivePolicy", :vpc_subnets => "vpcSubnets", } end |
Instance Method Details
#to_jsii ⇒ Object
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
# File 'efs/file_system_props.rb', line 201 def to_jsii result = {} result.merge!({ "vpc" => @vpc, "allowAnonymousAccess" => @allow_anonymous_access, "enableAutomaticBackups" => @enable_automatic_backups, "encrypted" => @encrypted, "fileSystemName" => @file_system_name, "fileSystemPolicy" => @file_system_policy, "kmsKey" => @kms_key, "lifecyclePolicy" => @lifecycle_policy, "oneZone" => @one_zone, "outOfInfrequentAccessPolicy" => @out_of_infrequent_access_policy, "performanceMode" => @performance_mode, "provisionedThroughputPerSecond" => @provisioned_throughput_per_second, "removalPolicy" => @removal_policy, "replicationConfiguration" => @replication_configuration, "replicationOverwriteProtection" => @replication_overwrite_protection, "securityGroup" => @security_group, "throughputMode" => @throughput_mode, "transitionToArchivePolicy" => @transition_to_archive_policy, "vpcSubnets" => @vpc_subnets, }) result.compact end |