DataLakeServiceClient.CreateFileSystemAsync(String, PublicAccessType, IDictionary<String,String>, CancellationToken) Method

Definition

The CreateFileSystemAsync(String, PublicAccessType, IDictionary<String,String>, CancellationToken) operation creates a new file system under the specified account. If the file system with the same name already exists, the operation fails.

For more information, see Create Container.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.DataLakeFileSystemClient>> CreateFileSystemAsync (string fileSystemName, Azure.Storage.Files.DataLake.Models.PublicAccessType publicAccessType = Azure.Storage.Files.DataLake.Models.PublicAccessType.None, System.Collections.Generic.IDictionary<string,string> metadata = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateFileSystemAsync : string * Azure.Storage.Files.DataLake.Models.PublicAccessType * System.Collections.Generic.IDictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.DataLakeFileSystemClient>>
override this.CreateFileSystemAsync : string * Azure.Storage.Files.DataLake.Models.PublicAccessType * System.Collections.Generic.IDictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.DataLakeFileSystemClient>>
Public Overridable Function CreateFileSystemAsync (fileSystemName As String, Optional publicAccessType As PublicAccessType = Azure.Storage.Files.DataLake.Models.PublicAccessType.None, Optional metadata As IDictionary(Of String, String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of DataLakeFileSystemClient))

Parameters

fileSystemName
String

The name of the file system to create.

publicAccessType
PublicAccessType

Optionally specifies whether data in the file system may be accessed publicly and the level of access. FileSystem specifies full public read access for file system and path data. Clients can enumerate paths within the file system via anonymous request, but cannot enumerate file systems within the storage account. Path specifies public read access for paths. Path data within this file system can be read via anonymous request, but file system data is not available. Clients cannot enumerate paths within the file system via anonymous request. None specifies that the file system data is private to the account owner.

metadata
IDictionary<String,String>

Optional custom metadata to set for this file system.

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

Task<Response<DataLakeFileSystemClient>>

A Response<T> referencing the newly created file system.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to