ShareLeaseClient.Renew(CancellationToken) Method

Definition

The Renew(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 Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileLease> Renew (System.Threading.CancellationToken cancellationToken = default);
abstract member Renew : System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileLease>
override this.Renew : System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileLease>
Public Overridable Function Renew (Optional cancellationToken As CancellationToken = Nothing) As 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