AWS SDK Version 3 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.

Container for the parameters to the CreateFileSystem operation. Creates a new, empty file system. The operation requires a creation token in the request that Amazon EFS uses to ensure idempotent creation (calling the operation with same creation token has no effect). If a file system does not currently exist that is owned by the caller's AWS account with the specified creation token, this operation does the following:

Otherwise, this operation returns a FileSystemAlreadyExists error with the ID of the existing file system.

For basic use cases, you can use a randomly generated UUID for the creation token.

The idempotent operation allows you to retry a CreateFileSystem call without risk of creating an extra file system. This can happen when an initial call fails in a way that leaves it uncertain whether or not a file system was actually created. An example might be that a transport level timeout occurred or your connection was reset. As long as you use the same creation token, if the initial call had succeeded in creating a file system, the client can learn of its existence from the FileSystemAlreadyExists error.

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 among other things returns the file system state.

This operation also takes an optional PerformanceMode parameter that you choose for your file system. We recommend generalPurpose performance mode for most file systems. File systems using the maxIO performance mode can scale to higher levels of aggregate throughput and operations per second with a tradeoff of slightly higher latencies for most file operations. The performance mode can't be changed after the file system has been created. For more information, see Amazon EFS: Performance Modes.

After the file system is fully created, Amazon EFS sets its lifecycle state to available, at which point you can create one or more mount targets for the file system in your VPC. For more information, see CreateMountTarget. You mount your Amazon EFS file system on an EC2 instances in your VPC via the mount target. For more information, see Amazon EFS: How it Works.

This operation requires permissions for the elasticfilesystem:CreateFileSystem action.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.ElasticFileSystem.AmazonElasticFileSystemRequest
      Amazon.ElasticFileSystem.Model.CreateFileSystemRequest

Namespace: Amazon.ElasticFileSystem.Model
Assembly: AWSSDK.ElasticFileSystem.dll
Version: 3.x.y.z

Syntax

C#
public class CreateFileSystemRequest : AmazonElasticFileSystemRequest
         IAmazonWebServiceRequest

The CreateFileSystemRequest type exposes the following members

Constructors

NameDescription
Public Method CreateFileSystemRequest()

Empty constructor used to set properties independently even when a simple constructor is available

Public Method CreateFileSystemRequest(string)

Instantiates CreateFileSystemRequest with the parameterized properties

Properties

NameTypeDescription
Public Property CreationToken System.String

Gets and sets the property CreationToken.

String of up to 64 ASCII characters. Amazon EFS uses this to ensure idempotent creation.

Public Property Encrypted System.Boolean

Gets and sets the property Encrypted.

A boolean value that, if true, creates an encrypted file system. When creating an encrypted file system, you have the option of specifying a CreateFileSystemRequest$KmsKeyId for an existing AWS Key Management Service (AWS KMS) customer master key (CMK). If you don't specify a CMK, then the default CMK for Amazon EFS, /aws/elasticfilesystem, is used to protect the encrypted file system.

Public Property KmsKeyId System.String

Gets and sets the property KmsKeyId.

The id of the AWS KMS CMK that will be used to protect the encrypted file system. This parameter is only required if you want to use a non-default CMK. If this parameter is not specified, the default CMK for Amazon EFS is used. This id can be in one of the following formats:

  • Key ID - A unique identifier of the key. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.

  • ARN - An Amazon Resource Name for the key. For example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.

  • Key alias - A previously created display name for a key. For example, alias/projectKey1.

  • Key alias ARN - An Amazon Resource Name for a key alias. For example, arn:aws:kms:us-west-2:444455556666:alias/projectKey1.

Note that if the KmsKeyId is specified, the CreateFileSystemRequest$Encrypted parameter must be set to true.

Public Property PerformanceMode Amazon.ElasticFileSystem.PerformanceMode

Gets and sets the property PerformanceMode.

The PerformanceMode of the file system. We recommend generalPurpose performance mode for most file systems. File systems using the maxIO performance mode can scale to higher levels of aggregate throughput and operations per second with a tradeoff of slightly higher latencies for most file operations. This can't be changed after the file system has been created.

Examples

This operation creates a new file system with the default generalpurpose performance mode.

To create a new file system


var response = client.CreateFileSystem(new CreateFileSystemRequest 
{
    CreationToken = "tokenstring",
    PerformanceMode = "generalPurpose"
});

DateTime creationTime = response.CreationTime;
string creationToken = response.CreationToken;
string fileSystemId = response.FileSystemId;
string lifeCycleState = response.LifeCycleState;
integer numberOfMountTargets = response.NumberOfMountTargets;
string ownerId = response.OwnerId;
string performanceMode = response.PerformanceMode;
FileSystemSize sizeInBytes = response.SizeInBytes;

            

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms