Sdílet prostřednictvím


ShareLeaseClient.RenewAsync(CancellationToken) Method

Definition

The RenewAsync(CancellationToken) operation renews the shares's previously-acquired lease. This API does not support files.

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

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

Parameters

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