다음을 통해 공유


DataLakeFileSystemClient.SetAccessPolicy Method

Definition

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

For more information, see Set Container ACL.

public virtual Azure.Response<Azure.Storage.Files.DataLake.Models.FileSystemInfo> SetAccessPolicy (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 SetAccessPolicy : Azure.Storage.Files.DataLake.Models.PublicAccessType * seq<Azure.Storage.Files.DataLake.Models.DataLakeSignedIdentifier> * Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.DataLake.Models.FileSystemInfo>
override this.SetAccessPolicy : Azure.Storage.Files.DataLake.Models.PublicAccessType * seq<Azure.Storage.Files.DataLake.Models.DataLakeSignedIdentifier> * Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.DataLake.Models.FileSystemInfo>
Public Overridable Function SetAccessPolicy (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 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 systems'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