Share via


ShareLeaseClient.ChangeAsync(String, CancellationToken) Method

Definition

The ChangeAsync(String, CancellationToken) operation changes the lease of an active lease. A change must include the current LeaseId and a new proposedId.

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

Parameters

proposedId
String

An optional proposed lease ID, in a GUID string format. A RequestFailedException will be thrown if the proposed lease ID is not in the correct format.

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