你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

BlobLeaseClient.Release(RequestConditions, CancellationToken) Method

Definition

The Release(RequestConditions, CancellationToken) operation releases the container or blob's previously-acquired lease.

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

For more information, see Lease Container.

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

Parameters

conditions
RequestConditions

Optional BlobLeaseRequestConditions to add conditions on releasing a lease.

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. If multiple failures occur, an AggregateException will be thrown, containing each failure instance.

Applies to