Package version:

A client that manages leases for a ShareFileClient or ShareClient.

Constructors

Accessors

Methods

  • Establishes and manages a lock on a file, share or share snapshot for write and delete operations.

    Parameters

    • duration: number = -1

      Specifies the duration of lease in seconds. For file, the only allowed value is -1 for a lease that never expires. For share, must be -1 or between 15 to 60.

    • options: LeaseOperationOptions = {}

      Options for the lease management operation.

    Returns Promise<LeaseOperationResponse>

    Response data for acquire lease operation.

  • To renew the lease. Only available for lease on share or share snapshot. Note that the lease may be renewed even if it has expired as long as the share has not been leased again since the expiration of that lease. When you renew a lease, the lease duration clock resets.

    Parameters

    Returns Promise<LeaseOperationResponse>

    Response data for renew lease operation.