Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis 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 try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
A client that manages leases for a ContainerClient or a BlobClient.
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 leaseId
string
Gets the url.
string url
string
Establishes and manages a lock on a container for delete operations, or on a blob for write and delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.
See https://learn.microsoft.com/rest/api/storageservices/lease-container and See https://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 lease until the current lease period has expired.
See https://learn.microsoft.com/rest/api/storageservices/lease-container and See https://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.
See https://learn.microsoft.com/rest/api/storageservices/lease-container and See https://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 may immediately acquire a lease against the container or the blob.
See https://learn.microsoft.com/rest/api/storageservices/lease-container and See https://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.
See https://learn.microsoft.com/rest/api/storageservices/lease-container and See https://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.
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in