Share via


BlobContainerResource.Lease(LeaseContainerContent, CancellationToken) Method

Definition

The Lease Container operation establishes and manages a lock on a container 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}/blobServices/default/containers/{containerName}/lease
  • Operation Id: BlobContainers_Lease
  • Default Api Version: 2023-05-01
  • Resource: BlobContainerResource
public virtual Azure.Response<Azure.ResourceManager.Storage.Models.LeaseContainerResponse> Lease (Azure.ResourceManager.Storage.Models.LeaseContainerContent content = default, System.Threading.CancellationToken cancellationToken = default);
abstract member Lease : Azure.ResourceManager.Storage.Models.LeaseContainerContent * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Storage.Models.LeaseContainerResponse>
override this.Lease : Azure.ResourceManager.Storage.Models.LeaseContainerContent * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Storage.Models.LeaseContainerResponse>
Public Overridable Function Lease (Optional content As LeaseContainerContent = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of LeaseContainerResponse)

Parameters

content
LeaseContainerContent

Lease Container request body.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Applies to