Azure Integrator V2 - Online Help
Azure Integrator V2
Questions / Feedback?

LeaseBlob Method

Lease a blob to establish an exclusive one minute lock on a blob. LeaseAction: Acquire(0): Requests a new lease. Renew(1): Renews the lease. Release(2): Release the lease. Break(3): Break the lease, if the blob has an active lease.

Syntax

[VB.NET]
Public Sub LeaseBlob(ByVal blobName As String, ByVal leaseAction As Integer)
[C#]
public void LeaseBlob(string blobName, int leaseAction);

Remarks

This method will lease a blob to establish an exclusive one minute lock on a blob, for all write operations. After a blob is leased, LeaseId will be populated with ID for the lease.

Renewing or releasing a lease requires that LeaseId be set. When a blob is actively leased, the following methods require LeaseId to be set:

Once a lease has expired or been released, the LeaseId is maintained by the Blob service, unless the blob is modified. A client may attempt to renew or release their lease using their previous LeaseId and know that if the operation is successful, the blob has not been updated since the lease ID was last valid.

If the client attempts to renew or release a lease with their previous LeaseId and the request fails, the client then knows that the blob was modified since their lease was last active. The client must then acquire a new lease on the blob.

If a lease expires rather than being explicitly released, a client may need to wait up to one minute before a new lease can be acquired for the blob. However, the client can renew the lease with their LeaseId if the blob has not been modified.

Note that a lease cannot be granted for a blob snapshot, since snapshots are read-only. Requesting a lease against a snapshot results in an error.

All container operations are permitted on a container that includes blobs with an active lease, including Delete Container. Therefore a container may be deleted even if blobs within it have active leases.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 2.0.6240.0