SALES: 1-800-867-1380
Collapse the table of content
Expand the table of content
Expand Minimize

CloudBlobContainer.AcquireLease Method (Nullable<TimeSpan>, String, AccessCondition, BlobRequestOptions, OperationContext)


Acquires a lease on this container.

Namespace:   Microsoft.WindowsAzure.Storage.Blob
Assembly:  Microsoft.WindowsAzure.Storage (in Microsoft.WindowsAzure.Storage.dll)

public string AcquireLease(
	Nullable<TimeSpan> leaseTime,
	string proposedLeaseId,
	AccessCondition accessCondition = null,
	BlobRequestOptions options = null,
	OperationContext operationContext = null


Type: System.Nullable<TimeSpan>

A TimeSpan representing the span of time for which to acquire the lease, which will be rounded down to seconds. If null, an infinite lease will be acquired. If not null, this must be greater than zero.

Type: System.String

A string representing the proposed lease ID for the new lease, or null if no lease ID is proposed.

Type: Microsoft.WindowsAzure.Storage.AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

Type: Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

Type: Microsoft.WindowsAzure.Storage.OperationContext

An OperationContext object that represents the context for the current operation.

Return Value

Type: System.String

The ID of the acquired lease.

Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft