Amazon FSx
API Reference

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": { "ExportPath": "string", "ImportedFileChunkSize": number, "ImportPath": "string", "WeeklyMaintenanceStartTime": "string" }, "SecurityGroupIds": [ "string" ], "StorageCapacity": number, "SubnetIds": [ "string" ], "Tags": [ { "Key": "string", "Value": "string" } ], "WindowsConfiguration": { "ActiveDirectoryId": "string", "AutomaticBackupRetentionDays": number, "CopyTagsToBackups": boolean, "DailyAutomaticBackupStartTime": "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

(Optional) 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 255.

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

Required: No

FileSystemType

The type of Amazon FSx file system to create.

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 an Amazon FSx for Windows File Server file system at rest. Amazon FSx for Lustre does not support KMS encryption. 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: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}|arn:aws[a-z-]{0,7}:kms:[a-z]{2}-[a-z-]{4,}-\d+:\d{12}:(key|alias)\/([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}|[a-zA-Z0-9:\/_-]+)|alias\/[a-zA-Z0-9:\/_-]+$

Required: No

LustreConfiguration

The Lustre configuration for the file system being created. This value is required if FileSystemType is set to LUSTRE.

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

The storage capacity of the file system being created.

For Windows file systems, the storage capacity has a minimum of 300 GiB, and a maximum of 65,536 GiB.

For Lustre file systems, the storage capacity has a minimum of 3,600 GiB. Storage capacity is provisioned in increments of 3,600 GiB.

Type: Integer

Valid Range: Minimum value of 1.

Required: Yes

SubnetIds

The IDs of the subnets that the file system will be accessible from. File systems support only one subnet. The file server is also 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. This value is required if FileSystemType is set to WINDOWS.

Type: CreateFileSystemWindowsConfiguration object

Required: No

Response Syntax

{ "FileSystem": { "CreationTime": number, "DNSName": "string", "FailureDetails": { "Message": "string" }, "FileSystemId": "string", "FileSystemType": "string", "KmsKeyId": "string", "Lifecycle": "string", "LustreConfiguration": { "DataRepositoryConfiguration": { "ExportPath": "string", "ImportedFileChunkSize": number, "ImportPath": "string" }, "WeeklyMaintenanceStartTime": "string" }, "NetworkInterfaceIds": [ "string" ], "OwnerId": "string", "ResourceARN": "string", "StorageCapacity": number, "SubnetIds": [ "string" ], "Tags": [ { "Key": "string", "Value": "string" } ], "VpcId": "string", "WindowsConfiguration": { "ActiveDirectoryId": "string", "AutomaticBackupRetentionDays": number, "CopyTagsToBackups": boolean, "DailyAutomaticBackupStartTime": "string", "MaintenanceOperationsInProgress": [ "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

MissingFileSystemConfiguration

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: