Condividi tramite


BlobLeaseClient.RenewAsync(RequestConditions, CancellationToken) Method

Definition

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

The lease can be renewed if the leaseId matches that associated with the blob or container. Note that the] lease may be renewed even if it has expired as long as the blob or container has not been leased again since the expiration of that lease. When you renew a lease, the lease duration clock resets.

For more information, see Lease Container.

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

Parameters

conditions
RequestConditions

Optional BlobLeaseRequestConditions to add conditions on renewing a lease.

cancellationToken
CancellationToken

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

Returns

A Response<T> describing the lease.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to