Acquires a lease on this blob.
Namespace: Microsoft.WindowsAzure.Storage.Blob
Assembly: Microsoft.WindowsAzure.Storage (in Microsoft.WindowsAzure.Storage.dll)
Usage
Visual Basic |
---|
Dim instance As ICloudBlob
Dim leaseTime As Nullable(Of TimeSpan)
Dim proposedLeaseId As String
Dim returnValue As IAsyncOperation(Of String)
returnValue = instance.AcquireLeaseAsync(leaseTime, proposedLeaseId) |
Syntax
Visual Basic |
---|
Function AcquireLeaseAsync ( _
leaseTime As Nullable(Of TimeSpan), _
proposedLeaseId As String _
) As IAsyncOperation(Of String) |
C# |
---|
IAsyncOperation<string> AcquireLeaseAsync (
Nullable<TimeSpan> leaseTime,
string proposedLeaseId
) |
C++ |
---|
IAsyncOperation<String^>^ AcquireLeaseAsync (
Nullable<TimeSpan> leaseTime,
String^ proposedLeaseId
) |
J# |
---|
IAsyncOperation<String> AcquireLeaseAsync (
Nullable<TimeSpan> leaseTime,
String proposedLeaseId
) |
JScript |
---|
function AcquireLeaseAsync (
leaseTime : Nullable<TimeSpan>,
proposedLeaseId : String
) : IAsyncOperation<String> |
Parameters
- leaseTime
A TimeSpan representing the span of time for which to acquire the lease, which will be rounded down to seconds.
- proposedLeaseId
A string representing the proposed lease ID for the new lease.
Return Value
The ID of the acquired lease.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
See Also