LustreFileSystem
- class aws_cdk.aws_fsx.LustreFileSystem(scope, id, *, lustre_configuration, vpc_subnet, storage_capacity_gib, vpc, backup_id=None, kms_key=None, removal_policy=None, security_group=None)
Bases:
FileSystemBase
The FSx for Lustre File System implementation of IFileSystem.
- See:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html
- Resource:
AWS::FSx::FileSystem
- ExampleMetadata:
infused
Example:
from aws_cdk import aws_s3 as s3 # vpc: ec2.Vpc # bucket: s3.Bucket lustre_configuration = { "deployment_type": fsx.LustreDeploymentType.SCRATCH_2, "export_path": bucket.s3_url_for_object(), "import_path": bucket.s3_url_for_object(), "auto_import_policy": fsx.LustreAutoImportPolicy.NEW_CHANGED_DELETED } fs = fsx.LustreFileSystem(self, "FsxLustreFileSystem", vpc=vpc, vpc_subnet=vpc.private_subnets[0], storage_capacity_gi_b=1200, lustre_configuration=lustre_configuration )
- Parameters:
scope (
Construct
) –id (
str
) –lustre_configuration (
Union
[LustreConfiguration
,Dict
[str
,Any
]]) – Additional configuration for FSx specific to Lustre.vpc_subnet (
ISubnet
) – The subnet that the file system will be accessible from.storage_capacity_gib (
Union
[int
,float
]) – The storage capacity of the file system being created. For Windows file systems, valid values are 32 GiB to 65,536 GiB. For SCRATCH_1 deployment types, valid values are 1,200, 2,400, 3,600, then continuing in increments of 3,600 GiB. For SCRATCH_2 and PERSISTENT_1 types, valid values are 1,200, 2,400, then continuing in increments of 2,400 GiB.vpc (
IVpc
) – The VPC to launch the file system in.backup_id (
Optional
[str
]) – The ID of the backup. Specifies the backup to use if you’re creating a file system from an existing backup. Default: - no backup will be used.kms_key (
Optional
[IKey
]) – The KMS key used for encryption to protect your data at rest. Default: - the aws/fsx default KMS key for the AWS account being deployed into.removal_policy (
Optional
[RemovalPolicy
]) – Policy to apply when the file system is removed from the stack. Default: RemovalPolicy.RETAINsecurity_group (
Optional
[ISecurityGroup
]) – Security Group to assign to this file system. Default: - creates new security group which allows all outbound traffic.
Methods
- apply_removal_policy(policy)
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
).- Parameters:
policy (
RemovalPolicy
) –- Return type:
None
- to_string()
Returns a string representation of this construct.
- Return type:
str
Attributes
- connections
The security groups/rules used to allow network connections to the file system.
- dns_name
The DNS name assigned to this file system.
- env
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
- file_system_id
The ID that AWS assigns to the file system.
- mount_name
The mount name of the file system, generated by FSx.
- Attribute:
LustreMountName
- node
The tree node.
- stack
The stack in which this resource is defined.
Static Methods
- classmethod from_lustre_file_system_attributes(scope, id, *, dns_name, file_system_id, security_group)
Import an existing FSx for Lustre file system from the given properties.
- Parameters:
scope (
Construct
) –id (
str
) –dns_name (
str
) – The DNS name assigned to this file system.file_system_id (
str
) – The ID of the file system, assigned by Amazon FSx.security_group (
ISecurityGroup
) – The security group of the file system.
- Return type:
- classmethod is_construct(x)
Checks if
x
is a construct.Use this method instead of
instanceof
to properly detectConstruct
instances, even when the construct library is symlinked.Explanation: in JavaScript, multiple copies of the
constructs
library on disk are seen as independent, completely different libraries. As a consequence, the classConstruct
in each copy of theconstructs
library is seen as a different class, and an instance of one class will not test asinstanceof
the other class.npm install
will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of theconstructs
library can be accidentally installed, andinstanceof
will behave unpredictably. It is safest to avoid usinginstanceof
, and using this type-testing method instead.- Parameters:
x (
Any
) – Any object.- Return type:
bool
- Returns:
true if
x
is an object created from a class which extendsConstruct
.
- classmethod is_owned_resource(construct)
Returns true if the construct was created by CDK, and false otherwise.
- Parameters:
construct (
IConstruct
) –- Return type:
bool
- classmethod is_resource(construct)
Check whether the given construct is a Resource.
- Parameters:
construct (
IConstruct
) –- Return type:
bool