FileShareResource.LeaseAsync Method

Definition

The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}/lease
  • Operation Id: FileShares_Lease
  • Default Api Version: 2023-05-01
  • Resource: FileShareResource
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Storage.Models.LeaseShareResponse>> LeaseAsync (Azure.ResourceManager.Storage.Models.LeaseShareContent content = default, string xMsSnapshot = default, System.Threading.CancellationToken cancellationToken = default);
abstract member LeaseAsync : Azure.ResourceManager.Storage.Models.LeaseShareContent * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Storage.Models.LeaseShareResponse>>
override this.LeaseAsync : Azure.ResourceManager.Storage.Models.LeaseShareContent * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Storage.Models.LeaseShareResponse>>
Public Overridable Function LeaseAsync (Optional content As LeaseShareContent = Nothing, Optional xMsSnapshot As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of LeaseShareResponse))

Parameters

content
LeaseShareContent

Lease Share request body.

xMsSnapshot
String

Optional. Specify the snapshot time to lease a snapshot.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Applies to