BlobContainerResource.Lease(LeaseContainerContent, CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Azure SDK for .NET