Dela via


DataLakeLeaseClient.ReleaseAsync(RequestConditions, CancellationToken) Method

Definition

The ReleaseAsync(RequestConditions, CancellationToken) operation releases the file system or path's previously-acquired lease.

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

For more information, see Lease Container.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.ReleasedObjectInfo>> ReleaseAsync (Azure.RequestConditions conditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ReleaseAsync : Azure.RequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.ReleasedObjectInfo>>
override this.ReleaseAsync : Azure.RequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.ReleasedObjectInfo>>
Public Overridable Function ReleaseAsync (Optional conditions As RequestConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ReleasedObjectInfo))

Parameters

conditions
RequestConditions

Optional RequestConditions to add conditions on acquiring a lease.

cancellationToken
CancellationToken

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

Returns

A Response<T> describing the updated path or file system.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to