ShareClient.SetAccessPolicyAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The SetAccessPolicyAsync(IEnumerable<ShareSignedIdentifier>, ShareFileRequestConditions, CancellationToken) operation sets the permissions for the specified share. The permissions indicate whether share data may be accessed publicly.
For more information, see Set Share ACL.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareInfo>> SetAccessPolicyAsync (System.Collections.Generic.IEnumerable<Azure.Storage.Files.Shares.Models.ShareSignedIdentifier> permissions, Azure.Storage.Files.Shares.Models.ShareFileRequestConditions conditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SetAccessPolicyAsync : seq<Azure.Storage.Files.Shares.Models.ShareSignedIdentifier> * Azure.Storage.Files.Shares.Models.ShareFileRequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareInfo>>
override this.SetAccessPolicyAsync : seq<Azure.Storage.Files.Shares.Models.ShareSignedIdentifier> * Azure.Storage.Files.Shares.Models.ShareFileRequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareInfo>>
Public Overridable Function SetAccessPolicyAsync (permissions As IEnumerable(Of ShareSignedIdentifier), Optional conditions As ShareFileRequestConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ShareInfo))
Parameters
- permissions
- IEnumerable<ShareSignedIdentifier>
Stored access policies that you can use to provide fine grained control over share permissions.
- conditions
- ShareFileRequestConditions
Optional ShareFileRequestConditions to add conditions on setting the access policy.
- cancellationToken
- CancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled.
Returns
A Response<T> describing the updated share.
Remarks
A RequestFailedException will be thrown if a failure occurs.
Applies to
Azure SDK for .NET