CreateFileSystem - Amazon FSx

CreateFileSystem

Creates a new, empty Amazon FSx file system.

If a file system with the specified client request token exists and the parameters match, CreateFileSystem returns the description of the existing file system. If a file system specified client request token exists and the parameters don't match, this call returns IncompatibleParameterError. If a file system with the specified client request token doesn't exist, CreateFileSystem does the following:

  • Creates a new, empty Amazon FSx file system with an assigned ID, and an initial lifecycle state of CREATING.

  • Returns the description of the file system.

This operation requires a client request token in the request that Amazon FSx uses to ensure idempotent creation. This means that calling the operation multiple times with the same client request token has no effect. By using the idempotent operation, you can retry a CreateFileSystem operation without the risk of creating an extra file system. This approach can be useful when an initial call fails in a way that makes it unclear whether a file system was created. Examples are if a transport level timeout occurred, or your connection was reset. If you use the same client request token and the initial call created a file system, the client receives success as long as the parameters are the same.

Note

The CreateFileSystem call returns while the file system's lifecycle state is still CREATING. You can check the file-system creation status by calling the DescribeFileSystems operation, which returns the file system state along with other information.

Request Syntax

{ "ClientRequestToken": "string", "FileSystemType": "string", "KmsKeyId": "string", "LustreConfiguration": { "AutoImportPolicy": "string", "AutomaticBackupRetentionDays": number, "CopyTagsToBackups": boolean, "DailyAutomaticBackupStartTime": "string", "DeploymentType": "string", "DriveCacheType": "string", "ExportPath": "string", "ImportedFileChunkSize": number, "ImportPath": "string", "PerUnitStorageThroughput": number, "WeeklyMaintenanceStartTime": "string" }, "SecurityGroupIds": [ "string" ], "StorageCapacity": number, "StorageType": "string", "SubnetIds": [ "string" ], "Tags": [ { "Key": "string", "Value": "string" } ], "WindowsConfiguration": { "ActiveDirectoryId": "string", "AutomaticBackupRetentionDays": number, "CopyTagsToBackups": boolean, "DailyAutomaticBackupStartTime": "string", "DeploymentType": "string", "PreferredSubnetId": "string", "SelfManagedActiveDirectoryConfiguration": { "DnsIps": [ "string" ], "DomainName": "string", "FileSystemAdministratorsGroup": "string", "OrganizationalUnitDistinguishedName": "string", "Password": "string", "UserName": "string" }, "ThroughputCapacity": number, "WeeklyMaintenanceStartTime": "string" } }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

ClientRequestToken

A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent creation. This string is automatically filled on your behalf when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 63.

Pattern: [A-za-z0-9_.-]{0,63}$

Required: No

FileSystemType

The type of Amazon FSx file system to create, either WINDOWS or LUSTRE.

Type: String

Valid Values: WINDOWS | LUSTRE

Required: Yes

KmsKeyId

The ID of the AWS Key Management Service (AWS KMS) key used to encrypt the file system's data for Amazon FSx for Windows File Server file systems and Amazon FSx for Lustre PERSISTENT_1 file systems at rest. In either case, if not specified, the Amazon FSx managed key is used. The Amazon FSx for Lustre SCRATCH_1 and SCRATCH_2 file systems are always encrypted at rest using Amazon FSx managed keys. For more information, see Encrypt in the AWS Key Management Service API Reference.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: ^.{1,2048}$

Required: No

LustreConfiguration

The Lustre configuration for the file system being created.

Type: CreateFileSystemLustreConfiguration object

Required: No

SecurityGroupIds

A list of IDs specifying the security groups to apply to all network interfaces created for file system access. This list isn't returned in later requests to describe the file system.

Type: Array of strings

Array Members: Maximum number of 50 items.

Length Constraints: Minimum length of 11. Maximum length of 20.

Pattern: ^(sg-[0-9a-f]{8,})$

Required: No

StorageCapacity

Sets the storage capacity of the file system that you're creating.

For Lustre file systems:

  • For SCRATCH_2 and PERSISTENT_1 SSD deployment types, valid values are 1200 GiB, 2400 GiB, and increments of 2400 GiB.

  • For PERSISTENT HDD file systems, valid values are increments of 6000 GiB for 12 MB/s/TiB file systems and increments of 1800 GiB for 40 MB/s/TiB file systems.

  • For SCRATCH_1 deployment type, valid values are 1200 GiB, 2400 GiB, and increments of 3600 GiB.

For Windows file systems:

  • If StorageType=SSD, valid values are 32 GiB - 65,536 GiB (64 TiB).

  • If StorageType=HDD, valid values are 2000 GiB - 65,536 GiB (64 TiB).

Type: Integer

Valid Range: Minimum value of 0. Maximum value of 2147483647.

Required: Yes

StorageType

Sets the storage type for the file system you're creating. Valid values are SSD and HDD.

  • Set to SSD to use solid state drive storage. SSD is supported on all Windows and Lustre deployment types.

  • Set to HDD to use hard disk drive storage. HDD is supported on SINGLE_AZ_2 and MULTI_AZ_1 Windows file system deployment types, and on PERSISTENT Lustre file system deployment types.

Default value is SSD. For more information, see Storage Type Options in the Amazon FSx for Windows User Guide and Multiple Storage Options in the Amazon FSx for Lustre User Guide.

Type: String

Valid Values: SSD | HDD

Required: No

SubnetIds

Specifies the IDs of the subnets that the file system will be accessible from. For Windows MULTI_AZ_1 file system deployment types, provide exactly two subnet IDs, one for the preferred file server and one for the standby file server. You specify one of these subnets as the preferred subnet using the WindowsConfiguration > PreferredSubnetID property.

For Windows SINGLE_AZ_1 and SINGLE_AZ_2 file system deployment types and Lustre file systems, provide exactly one subnet ID. The file server is launched in that subnet's Availability Zone.

Type: Array of strings

Array Members: Maximum number of 50 items.

Length Constraints: Minimum length of 15. Maximum length of 24.

Pattern: ^(subnet-[0-9a-f]{8,})$

Required: Yes

Tags

The tags to apply to the file system being created. The key value of the Name tag appears in the console as the file system name.

Type: Array of Tag objects

Array Members: Minimum number of 1 item. Maximum number of 50 items.

Required: No

WindowsConfiguration

The Microsoft Windows configuration for the file system being created.

Type: CreateFileSystemWindowsConfiguration object

Required: No

Response Syntax

{ "FileSystem": { "AdministrativeActions": [ { "AdministrativeActionType": "string", "FailureDetails": { "Message": "string" }, "ProgressPercent": number, "RequestTime": number, "Status": "string", "TargetFileSystemValues": "FileSystem" } ], "CreationTime": number, "DNSName": "string", "FailureDetails": { "Message": "string" }, "FileSystemId": "string", "FileSystemType": "string", "KmsKeyId": "string", "Lifecycle": "string", "LustreConfiguration": { "AutomaticBackupRetentionDays": number, "CopyTagsToBackups": boolean, "DailyAutomaticBackupStartTime": "string", "DataRepositoryConfiguration": { "AutoImportPolicy": "string", "ExportPath": "string", "FailureDetails": { "Message": "string" }, "ImportedFileChunkSize": number, "ImportPath": "string", "Lifecycle": "string" }, "DeploymentType": "string", "DriveCacheType": "string", "MountName": "string", "PerUnitStorageThroughput": number, "WeeklyMaintenanceStartTime": "string" }, "NetworkInterfaceIds": [ "string" ], "OwnerId": "string", "ResourceARN": "string", "StorageCapacity": number, "StorageType": "string", "SubnetIds": [ "string" ], "Tags": [ { "Key": "string", "Value": "string" } ], "VpcId": "string", "WindowsConfiguration": { "ActiveDirectoryId": "string", "AutomaticBackupRetentionDays": number, "CopyTagsToBackups": boolean, "DailyAutomaticBackupStartTime": "string", "DeploymentType": "string", "MaintenanceOperationsInProgress": [ "string" ], "PreferredFileServerIp": "string", "PreferredSubnetId": "string", "RemoteAdministrationEndpoint": "string", "SelfManagedActiveDirectoryConfiguration": { "DnsIps": [ "string" ], "DomainName": "string", "FileSystemAdministratorsGroup": "string", "OrganizationalUnitDistinguishedName": "string", "UserName": "string" }, "ThroughputCapacity": number, "WeeklyMaintenanceStartTime": "string" } } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

FileSystem

The configuration of the file system that was created.

Type: FileSystem object

Errors

For information about the errors that are common to all actions, see Common Errors.

ActiveDirectoryError

An Active Directory error.

HTTP Status Code: 400

BadRequest

A generic error indicating a failure with a client request.

HTTP Status Code: 400

IncompatibleParameterError

The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.

HTTP Status Code: 400

InternalServerError

A generic error indicating a server-side failure.

HTTP Status Code: 500

InvalidExportPath

The path provided for data repository export isn't valid.

HTTP Status Code: 400

InvalidImportPath

The path provided for data repository import isn't valid.

HTTP Status Code: 400

InvalidNetworkSettings

One or more network settings specified in the request are invalid. InvalidVpcId means that the ID passed for the virtual private cloud (VPC) is invalid. InvalidSubnetIds returns the list of IDs for subnets that are either invalid or not part of the VPC specified. InvalidSecurityGroupIds returns the list of IDs for security groups that are either invalid or not part of the VPC specified.

HTTP Status Code: 400

InvalidPerUnitStorageThroughput

An invalid value for PerUnitStorageThroughput was provided. Please create your file system again, using a valid value.

HTTP Status Code: 400

MissingFileSystemConfiguration

A file system configuration is required for this operation.

HTTP Status Code: 400

ServiceLimitExceeded

An error indicating that a particular service limit was exceeded. You can increase some service limits by contacting AWS Support.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: