AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Creates a new, empty Amazon FSx file system. You can create the following supported
Amazon FSx file systems using the CreateFileSystem API operation:
Amazon FSx for Lustre
Amazon FSx for NetApp ONTAP
Amazon FSx for OpenZFS
Amazon FSx for Windows File Server
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.
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 with the 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 in JSON format.
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.
For .NET Core this operation is only available in asynchronous form. Please refer to CreateFileSystemAsync.
Namespace: Amazon.FSx
Assembly: AWSSDK.FSx.dll
Version: 3.x.y.z
public abstract CreateFileSystemResponse CreateFileSystem( CreateFileSystemRequest request )
Container for the necessary parameters to execute the CreateFileSystem service method.
| Exception | Condition |
|---|---|
| ActiveDirectoryErrorException | An Active Directory error. |
| BadRequestException | A generic error indicating a failure with a client request. |
| IncompatibleParameterErrorException | 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. |
| InternalServerErrorException | A generic error indicating a server-side failure. |
| InvalidExportPathException | The path provided for data repository export isn't valid. |
| InvalidImportPathException | The path provided for data repository import isn't valid. |
| InvalidNetworkSettingsException | One or more network settings specified in the request are invalid. |
| InvalidPerUnitStorageThroughputException | An invalid value for PerUnitStorageThroughput was provided. Please create your file system again, using a valid value. |
| MissingFileSystemConfigurationException | A file system configuration is required for this operation. |
| ServiceLimitExceededException | An error indicating that a particular service limit was exceeded. You can increase some service limits by contacting Amazon Web Services Support. |
This operation creates a new Amazon FSx for Windows File Server file system.
var client = new AmazonFSxClient();
var response = client.CreateFileSystem(new CreateFileSystemRequest
{
ClientRequestToken = "a8ca07e4-61ec-4399-99f4-19853801bcd5",
FileSystemType = "WINDOWS",
KmsKeyId = "arn:aws:kms:us-east-1:012345678912:key/1111abcd-2222-3333-4444-55556666eeff",
SecurityGroupIds = new List<string> {
"sg-edcd9784"
},
StorageCapacity = 3200,
StorageType = "HDD",
SubnetIds = new List<string> {
"subnet-1234abcd"
},
Tags = new List<Tag> {
new Tag {
Key = "Name",
Value = "MyFileSystem"
}
},
WindowsConfiguration = new CreateFileSystemWindowsConfiguration {
ActiveDirectoryId = "d-1234abcd12",
Aliases = new List<string> {
"accounting.corp.example.com"
},
AutomaticBackupRetentionDays = 30,
DailyAutomaticBackupStartTime = "05:00",
ThroughputCapacity = 32,
WeeklyMaintenanceStartTime = "1:05:00"
}
});
FileSystem fileSystem = response.FileSystem;
.NET Framework:
Supported in: 4.7.2 and newer