EfsConfig¶
Bases: BaseModel, NameValidationMixin
Configuration model for AWS EFS (Elastic File System) file systems.
Comprehensive configuration model that defines all aspects of an EFS file system including performance characteristics, throughput modes, encryption settings, access point configurations, and lifecycle management policies. This model validates EFS configuration parameters, ensures optimal performance settings, and enforces organizational standards for EFS deployments including naming conventions, security requirements, and access control patterns.
EFS provides scalable, fully managed NFS file systems for use with AWS services and on-premises resources. This configuration model supports both general-purpose and high-performance workloads with configurable throughput modes and multiple access points for fine-grained access control.
Attributes:
| Name | Type | Description |
|---|---|---|
efs_base_name |
str
|
Base name for the EFS file system resource |
removal_policy |
str
|
CDK removal policy for resource cleanup behavior |
performance_mode |
Optional[str]
|
EFS performance mode (GeneralPurpose or MaxIO) |
throughput_mode |
Optional[str]
|
EFS throughput mode (Bursting or Provisioned) |
encrypted |
bool
|
Whether to enable encryption at rest for the file system |
access_points |
Optional[List[EfsAccessPointConfig]]
|
List of access point configurations for controlled access |
use_foundation_key |
bool
|
Use organizational KMS key from foundation infrastructure |
Source code in mare_aws_common_lib/models/efs_config.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 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 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 | |
get_performance_mode()
¶
Convert string to CDK PerformanceMode enum.
Transforms the string-based performance mode configuration into the corresponding CDK PerformanceMode enum for use in infrastructure code.
Returns:
| Type | Description |
|---|---|
PerformanceMode
|
CDK PerformanceMode enum value, defaults to GENERAL_PURPOSE if not specified |
Source code in mare_aws_common_lib/models/efs_config.py
263 264 265 266 267 268 269 270 271 272 273 274 | |
get_removal_policy()
¶
Convert string to CDK RemovalPolicy enum.
Transforms the string-based removal policy configuration into the corresponding CDK RemovalPolicy enum for use in infrastructure code.
Returns:
| Type | Description |
|---|---|
RemovalPolicy
|
CDK RemovalPolicy enum value |
Source code in mare_aws_common_lib/models/efs_config.py
289 290 291 292 293 294 295 296 297 298 | |
get_throughput_mode()
¶
Convert string to CDK ThroughputMode enum.
Transforms the string-based throughput mode configuration into the corresponding CDK ThroughputMode enum for use in infrastructure code.
Returns:
| Type | Description |
|---|---|
ThroughputMode
|
CDK ThroughputMode enum value, defaults to BURSTING if not specified |
Source code in mare_aws_common_lib/models/efs_config.py
276 277 278 279 280 281 282 283 284 285 286 287 | |
validate_ap_name(value)
classmethod
¶
Validate the EFS base name.
Applies organizational naming standards to EFS file system names to ensure consistency and compliance with AWS resource naming requirements.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Raw EFS base name from configuration |
required |
Returns:
| Type | Description |
|---|---|
|
Validated EFS base name |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the EFS base name fails validation rules |
Source code in mare_aws_common_lib/models/efs_config.py
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | |
validate_performance_mode(value)
classmethod
¶
Validate the EFS performance mode.
Ensures the performance mode string matches a valid EFS PerformanceMode enum value for optimal file system performance configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Performance mode string from configuration |
required |
Returns:
| Type | Description |
|---|---|
|
Validated performance mode string |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the performance mode is not a valid EFS PerformanceMode value |
Source code in mare_aws_common_lib/models/efs_config.py
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | |
validate_removal_policy(value)
classmethod
¶
Validate the CDK removal policy.
Ensures the removal policy string matches a valid CDK RemovalPolicy enum value for proper resource cleanup behavior.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Removal policy string from configuration |
required |
Returns:
| Type | Description |
|---|---|
|
Validated removal policy string |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the removal policy is not a valid CDK RemovalPolicy value |
Source code in mare_aws_common_lib/models/efs_config.py
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | |
validate_throughput_mode(value)
classmethod
¶
Validate the EFS throughput mode.
Ensures the throughput mode string matches a valid EFS ThroughputMode enum value for proper bandwidth configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Throughput mode string from configuration |
required |
Returns:
| Type | Description |
|---|---|
|
Validated throughput mode string |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the throughput mode is not a valid EFS ThroughputMode value |
Source code in mare_aws_common_lib/models/efs_config.py
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | |