Condividi tramite


DataLakeFileSystemClient.SetAccessPolicyAsync Method

Definition

The SetAccessPolicyAsync(PublicAccessType, IEnumerable<DataLakeSignedIdentifier>, DataLakeRequestConditions, CancellationToken) operation sets the permissions for the specified file system. The permissions indicate whether the file system data may be accessed publicly.

For more information, see Set Container ACL.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.FileSystemInfo>> SetAccessPolicyAsync (Azure.Storage.Files.DataLake.Models.PublicAccessType accessType = Azure.Storage.Files.DataLake.Models.PublicAccessType.None, System.Collections.Generic.IEnumerable<Azure.Storage.Files.DataLake.Models.DataLakeSignedIdentifier> permissions = default, Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions conditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SetAccessPolicyAsync : Azure.Storage.Files.DataLake.Models.PublicAccessType * seq<Azure.Storage.Files.DataLake.Models.DataLakeSignedIdentifier> * Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.FileSystemInfo>>
override this.SetAccessPolicyAsync : Azure.Storage.Files.DataLake.Models.PublicAccessType * seq<Azure.Storage.Files.DataLake.Models.DataLakeSignedIdentifier> * Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.FileSystemInfo>>
Public Overridable Function SetAccessPolicyAsync (Optional accessType As PublicAccessType = Azure.Storage.Files.DataLake.Models.PublicAccessType.None, Optional permissions As IEnumerable(Of DataLakeSignedIdentifier) = Nothing, Optional conditions As DataLakeRequestConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of FileSystemInfo))

Parameters

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

permissions
IEnumerable<DataLakeSignedIdentifier>

Stored access policies that you can use to provide fine grained control over file system permissions.

conditions
DataLakeRequestConditions

Optional DataLakeRequestConditions to add conditions on setting this file system's access policy.

cancellationToken
CancellationToken

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

Returns

A Response<T> describing the updated file system.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to