CloudBlobContainer.AcquireLeaseAsync CloudBlobContainer.AcquireLeaseAsync CloudBlobContainer.AcquireLeaseAsync CloudBlobContainer.AcquireLeaseAsync Method

Definition

Overloads

AcquireLeaseAsync(Nullable<TimeSpan>, String) AcquireLeaseAsync(Nullable<TimeSpan>, String) AcquireLeaseAsync(Nullable<TimeSpan>, String)

Initiates an asynchronous operation that acquires a lease on this container.

AcquireLeaseAsync(Nullable<TimeSpan>, String, CancellationToken) AcquireLeaseAsync(Nullable<TimeSpan>, String, CancellationToken) AcquireLeaseAsync(Nullable<TimeSpan>, String, CancellationToken)

Initiates an asynchronous operation that acquires a lease on this container.

AcquireLeaseAsync(Nullable<TimeSpan>, String, AccessCondition, BlobRequestOptions, OperationContext) AcquireLeaseAsync(Nullable<TimeSpan>, String, AccessCondition, BlobRequestOptions, OperationContext) AcquireLeaseAsync(Nullable<TimeSpan>, String, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation that acquires a lease on this container.

AcquireLeaseAsync(Nullable<TimeSpan>, String, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) AcquireLeaseAsync(Nullable<TimeSpan>, String, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) AcquireLeaseAsync(Nullable<TimeSpan>, String, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation that acquires a lease on this container.

AcquireLeaseAsync(Nullable<TimeSpan>, String) AcquireLeaseAsync(Nullable<TimeSpan>, String) AcquireLeaseAsync(Nullable<TimeSpan>, String)

Initiates an asynchronous operation that acquires a lease on this container.

[Microsoft.WindowsAzure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<string> AcquireLeaseAsync (Nullable<TimeSpan> leaseTime, string proposedLeaseId = null);
abstract member AcquireLeaseAsync : Nullable<TimeSpan> * string -> System.Threading.Tasks.Task<string>
override this.AcquireLeaseAsync : Nullable<TimeSpan> * string -> System.Threading.Tasks.Task<string>
Public Overridable Function AcquireLeaseAsync (leaseTime As Nullable(Of TimeSpan), Optional proposedLeaseId As String = null) As Task(Of String)
Parameters
leaseTime
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 15 to 60 seconds.

proposedLeaseId
String String String String

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

Returns

A Task<TResult> object that represents the asynchronous operation.

AcquireLeaseAsync(Nullable<TimeSpan>, String, CancellationToken) AcquireLeaseAsync(Nullable<TimeSpan>, String, CancellationToken) AcquireLeaseAsync(Nullable<TimeSpan>, String, CancellationToken)

Initiates an asynchronous operation that acquires a lease on this container.

public:
 virtual System::Threading::Tasks::Task<System::String ^> ^ AcquireLeaseAsync(Nullable<TimeSpan> leaseTime, System::String ^ proposedLeaseId, System::Threading::CancellationToken cancellationToken);
[Microsoft.WindowsAzure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<string> AcquireLeaseAsync (Nullable<TimeSpan> leaseTime, string proposedLeaseId, System.Threading.CancellationToken cancellationToken);
abstract member AcquireLeaseAsync : Nullable<TimeSpan> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
override this.AcquireLeaseAsync : Nullable<TimeSpan> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Parameters
leaseTime
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 15 to 60 seconds.

proposedLeaseId
String String String String

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

cancellationToken
CancellationToken CancellationToken CancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

A Task<TResult> object that represents the asynchronous operation.

AcquireLeaseAsync(Nullable<TimeSpan>, String, AccessCondition, BlobRequestOptions, OperationContext) AcquireLeaseAsync(Nullable<TimeSpan>, String, AccessCondition, BlobRequestOptions, OperationContext) AcquireLeaseAsync(Nullable<TimeSpan>, String, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation that acquires a lease on this container.

public:
 virtual System::Threading::Tasks::Task<System::String ^> ^ AcquireLeaseAsync(Nullable<TimeSpan> leaseTime, System::String ^ proposedLeaseId, Microsoft::WindowsAzure::Storage::AccessCondition ^ accessCondition, Microsoft::WindowsAzure::Storage::Blob::BlobRequestOptions ^ options, Microsoft::WindowsAzure::Storage::OperationContext ^ operationContext);
[Microsoft.WindowsAzure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<string> AcquireLeaseAsync (Nullable<TimeSpan> leaseTime, string proposedLeaseId, Microsoft.WindowsAzure.Storage.AccessCondition accessCondition, Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions options, Microsoft.WindowsAzure.Storage.OperationContext operationContext);
abstract member AcquireLeaseAsync : Nullable<TimeSpan> * string * Microsoft.WindowsAzure.Storage.AccessCondition * Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions * Microsoft.WindowsAzure.Storage.OperationContext -> System.Threading.Tasks.Task<string>
override this.AcquireLeaseAsync : Nullable<TimeSpan> * string * Microsoft.WindowsAzure.Storage.AccessCondition * Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions * Microsoft.WindowsAzure.Storage.OperationContext -> System.Threading.Tasks.Task<string>
Parameters
leaseTime
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 15 to 60 seconds.

proposedLeaseId
String String String String

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

accessCondition
AccessCondition AccessCondition AccessCondition 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.

options
BlobRequestOptions BlobRequestOptions BlobRequestOptions BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext
OperationContext OperationContext OperationContext OperationContext

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

Returns

A Task<TResult> object that represents the asynchronous operation.

AcquireLeaseAsync(Nullable<TimeSpan>, String, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) AcquireLeaseAsync(Nullable<TimeSpan>, String, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) AcquireLeaseAsync(Nullable<TimeSpan>, String, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation that acquires a lease on this container.

public:
 virtual System::Threading::Tasks::Task<System::String ^> ^ AcquireLeaseAsync(Nullable<TimeSpan> leaseTime, System::String ^ proposedLeaseId, Microsoft::WindowsAzure::Storage::AccessCondition ^ accessCondition, Microsoft::WindowsAzure::Storage::Blob::BlobRequestOptions ^ options, Microsoft::WindowsAzure::Storage::OperationContext ^ operationContext, System::Threading::CancellationToken cancellationToken);
[Microsoft.WindowsAzure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<string> AcquireLeaseAsync (Nullable<TimeSpan> leaseTime, string proposedLeaseId, Microsoft.WindowsAzure.Storage.AccessCondition accessCondition, Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions options, Microsoft.WindowsAzure.Storage.OperationContext operationContext, System.Threading.CancellationToken cancellationToken);
abstract member AcquireLeaseAsync : Nullable<TimeSpan> * string * Microsoft.WindowsAzure.Storage.AccessCondition * Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions * Microsoft.WindowsAzure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
override this.AcquireLeaseAsync : Nullable<TimeSpan> * string * Microsoft.WindowsAzure.Storage.AccessCondition * Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions * Microsoft.WindowsAzure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Parameters
leaseTime
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 15 to 60 seconds.

proposedLeaseId
String String String String

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

accessCondition
AccessCondition AccessCondition AccessCondition 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.

options
BlobRequestOptions BlobRequestOptions BlobRequestOptions BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext
OperationContext OperationContext OperationContext OperationContext

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

cancellationToken
CancellationToken CancellationToken CancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

A Task<TResult> object that represents the asynchronous operation.

Applies to