class LustreFileSystem (construct)
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.FSx.LustreFileSystem |
Java | software.amazon.awscdk.services.fsx.LustreFileSystem |
Python | aws_cdk.aws_fsx.LustreFileSystem |
TypeScript (source) | @aws-cdk/aws-fsx » LustreFileSystem |
Implements
IConstruct
, IConstruct
, IDependable
, IResource
, IFile
, IConnectable
The FSx for Lustre File System implementation of IFileSystem.
Example
const sg = ec2.SecurityGroup.fromSecurityGroupId(this, 'FsxSecurityGroup', '{SECURITY-GROUP-ID}');
const fs = fsx.LustreFileSystem.fromLustreFileSystemAttributes(this, 'FsxLustreFileSystem', {
dnsName: '{FILE-SYSTEM-DNS-NAME}',
fileSystemId: '{FILE-SYSTEM-ID}',
securityGroup: sg,
});
const vpc = ec2.Vpc.fromVpcAttributes(this, 'Vpc', {
availabilityZones: ['us-west-2a', 'us-west-2b'],
publicSubnetIds: ['{US-WEST-2A-SUBNET-ID}', '{US-WEST-2B-SUBNET-ID}'],
vpcId: '{VPC-ID}',
});
const inst = new ec2.Instance(this, 'inst', {
instanceType: ec2.InstanceType.of(ec2.InstanceClass.T2, ec2.InstanceSize.LARGE),
machineImage: new ec2.AmazonLinuxImage({
generation: ec2.AmazonLinuxGeneration.AMAZON_LINUX_2,
}),
vpc,
vpcSubnets: {
subnetType: ec2.SubnetType.PUBLIC,
},
});
fs.connections.allowDefaultPortFrom(inst);
Initializer
new LustreFileSystem(scope: Construct, id: string, props: LustreFileSystemProps)
Parameters
- scope
Construct
- id
string
- props
Lustre
File System Props
Construct Props
Name | Type | Description |
---|---|---|
lustre | Lustre | Additional configuration for FSx specific to Lustre. |
storage | number | The storage capacity of the file system being created. |
vpc | IVpc | The VPC to launch the file system in. |
vpc | ISubnet | The subnet that the file system will be accessible from. |
backup | string | The ID of the backup. |
kms | IKey | The KMS key used for encryption to protect your data at rest. |
removal | Removal | Policy to apply when the file system is removed from the stack. |
security | ISecurity | Security Group to assign to this file system. |
lustreConfiguration
Type:
Lustre
Additional configuration for FSx specific to Lustre.
storageCapacityGiB
Type:
number
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
Type:
IVpc
The VPC to launch the file system in.
vpcSubnet
Type:
ISubnet
The subnet that the file system will be accessible from.
backupId?
Type:
string
(optional, default: no backup will be used.)
The ID of the backup.
Specifies the backup to use if you're creating a file system from an existing backup.
kmsKey?
Type:
IKey
(optional, default: the aws/fsx default KMS key for the AWS account being deployed into.)
The KMS key used for encryption to protect your data at rest.
removalPolicy?
Type:
Removal
(optional, default: RemovalPolicy.RETAIN)
Policy to apply when the file system is removed from the stack.
securityGroup?
Type:
ISecurity
(optional, default: creates new security group which allows all outbound traffic.)
Security Group to assign to this file system.
Properties
Name | Type | Description |
---|---|---|
connections | Connections | The security groups/rules used to allow network connections to the file system. |
dns | string | The DNS name assigned to this file system. |
env | Resource | The environment this resource belongs to. |
file | string | The ID that AWS assigns to the file system. |
mount | string | The mount name of the file system, generated by FSx. |
node | Construct | The construct tree node associated with this construct. |
stack | Stack | The stack in which this resource is defined. |
connections
Type:
Connections
The security groups/rules used to allow network connections to the file system.
dnsName
Type:
string
The DNS name assigned to this file system.
env
Type:
Resource
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.
fileSystemId
Type:
string
The ID that AWS assigns to the file system.
mountName
Type:
string
The mount name of the file system, generated by FSx.
node
Type:
Construct
The construct tree node associated with this construct.
stack
Type:
Stack
The stack in which this resource is defined.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
to | Returns a string representation of this construct. |
static from | Import an existing FSx for Lustre file system from the given properties. |
RemovalPolicy(policy)
applypublic applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
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
).
String()
topublic toString(): string
Returns
string
Returns a string representation of this construct.
LustreFileSystemAttributes(scope, id, attrs)
static frompublic static fromLustreFileSystemAttributes(scope: Construct, id: string, attrs: FileSystemAttributes): IFileSystem
Parameters
- scope
Construct
- id
string
- attrs
File
System Attributes
Returns
Import an existing FSx for Lustre file system from the given properties.