Delen via


FileShareResource.Lease(LeaseShareContent, String, CancellationToken) 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 Azure.Response<Azure.ResourceManager.Storage.Models.LeaseShareResponse> Lease (Azure.ResourceManager.Storage.Models.LeaseShareContent content = default, string xMsSnapshot = default, System.Threading.CancellationToken cancellationToken = default);
abstract member Lease : Azure.ResourceManager.Storage.Models.LeaseShareContent * string * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Storage.Models.LeaseShareResponse>
override this.Lease : Azure.ResourceManager.Storage.Models.LeaseShareContent * string * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Storage.Models.LeaseShareResponse>
Public Overridable Function Lease (Optional content As LeaseShareContent = Nothing, Optional xMsSnapshot As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As 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