Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ShareLeaseClient

Package version

Hierarchy

  • ShareLeaseClient

Index

Constructors

constructor

  • Creates an instance of ShareLeaseClient.

    Parameters

    • client: ShareFileClient

      The client to make the lease operation requests.

    • Optional leaseId: undefined | string

      Initial proposed lease id.

    Returns ShareLeaseClient

Accessors

leaseId

  • get leaseId(): string

url

  • get url(): string

Methods

acquireLease

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

    Parameters

    • Default value 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.

    • Default value options: LeaseOperationOptions = {}

      Options for the lease management operation.

    Returns Promise<LeaseOperationResponse>

    Response data for acquire lease operation.

breakLease

changeLease

  • To change the ID of an existing lease.

    Parameters

    • proposedLeaseId: string

      the proposed new lease Id.

    • Default value options: LeaseOperationOptions = {}

      Options for the lease management operation.

    Returns Promise<LeaseOperationResponse>

    Response data for change lease operation.

releaseLease

  • To free the lease if it is no longer needed so that another client may immediately acquire a lease.

    Parameters

    Returns Promise<LeaseOperationResponse>

    Response data for release lease operation.

renewLease

  • 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.

Generated using TypeDoc