ShareLeaseClient.Release(CancellationToken) Method

Definition

The Release(CancellationToken) operation releases the files's previously-acquired lease.

The lease may be released if the LeaseId matches that associated with the file. Releasing the lease allows another client to immediately acquire the lease for the file as soon as the release is complete.

public virtual Azure.Response<Azure.Storage.Files.Shares.Models.FileLeaseReleaseInfo> Release (System.Threading.CancellationToken cancellationToken = default);
abstract member Release : System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.Shares.Models.FileLeaseReleaseInfo>
override this.Release : System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.Shares.Models.FileLeaseReleaseInfo>
Public Overridable Function Release (Optional cancellationToken As CancellationToken = Nothing) As Response(Of FileLeaseReleaseInfo)

Parameters

cancellationToken
CancellationToken

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

Returns

A Response<T> describing the updated blob or container.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to