AWS SDK Version 4 for .NET
API Reference

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:

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:

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.

Note:

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

Syntax

C#
public abstract CreateFileSystemResponse CreateFileSystem(
         CreateFileSystemRequest request
)

Parameters

request
Type: Amazon.FSx.Model.CreateFileSystemRequest

Container for the necessary parameters to execute the CreateFileSystem service method.

Return Value


The response from the CreateFileSystem service method, as returned by FSx.

Exceptions

ExceptionCondition
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.

Examples

This operation creates a new Amazon FSx for Windows File Server file system.

To create a new 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;

            

Version Information

.NET Framework:
Supported in: 4.7.2 and newer

See Also