This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
A client that manages leases for aContainerClient or aBlobClient.
| Blob | Creates an instance of BlobLeaseClient. |
Creates an instance of BlobLeaseClient.
new BlobLeaseClient(client: BlobClient | ContainerClient, leaseId?: string)The client to make the lease operation requests.
string
Initial proposed lease id.
Gets the lease Id.
string leaseIdstring
Gets the url.
string urlstring
Establishes and manages a lock on a container for delete operations, or on a blobfor write and delete operations.The lock duration can be 15 to 60 seconds, or can be infinite.
Seehttps://learn.microsoft.com/rest/api/storageservices/lease-containerandSeehttps://learn.microsoft.com/rest/api/storageservices/lease-blob
function acquireLease(duration: number, options?: LeaseOperationOptions): Promise<LeaseOperationResponse>number
Must be between 15 to 60 seconds, or infinite (-1)
option to configure lease management operations.
Promise<LeaseOperationResponse>
Response data for acquire lease operation.
To end the lease but ensure that another client cannot acquire a new leaseuntil the current lease period has expired.
Seehttps://learn.microsoft.com/rest/api/storageservices/lease-containerandSeehttps://learn.microsoft.com/rest/api/storageservices/lease-blob
function breakLease(breakPeriod: number, options?: LeaseOperationOptions): Promise<LeaseOperationResponse>number
Break period
Optional options to configure lease management operations.
Promise<LeaseOperationResponse>
Response data for break lease operation.
To change the ID of the lease.
Seehttps://learn.microsoft.com/rest/api/storageservices/lease-containerandSeehttps://learn.microsoft.com/rest/api/storageservices/lease-blob
function changeLease(proposedLeaseId: string, options?: LeaseOperationOptions): Promise<LeaseOperationResponse>string
the proposed new lease Id.
option to configure lease management operations.
Promise<LeaseOperationResponse>
Response data for change lease operation.
To free the lease if it is no longer needed so that another client mayimmediately acquire a lease against the container or the blob.
Seehttps://learn.microsoft.com/rest/api/storageservices/lease-containerandSeehttps://learn.microsoft.com/rest/api/storageservices/lease-blob
function releaseLease(options?: LeaseOperationOptions): Promise<LeaseOperationResponse>option to configure lease management operations.
Promise<LeaseOperationResponse>
Response data for release lease operation.
To renew the lease.
Seehttps://learn.microsoft.com/rest/api/storageservices/lease-containerandSeehttps://learn.microsoft.com/rest/api/storageservices/lease-blob
function renewLease(options?: LeaseOperationOptions): Promise<Lease>Optional option to configure lease management operations.
Promise<Lease>
Response data for renew lease operation.