ShareLeaseClient allows you to manipulate Azure Storage leases on shares and files.
#include <share_lease_client.hpp>
◆ ShareLeaseClient()
Azure::Storage::Files::Shares::ShareLeaseClient::ShareLeaseClient |
( |
ShareFileClient |
fileClient, |
|
|
std::string |
leaseId |
|
) |
| |
|
inlineexplicit |
- Parameters
-
fileClient | A ShareFileClient representing the file being leased. |
leaseId | A lease ID. This is not required for break operation. |
◆ Acquire()
- Parameters
-
duration | Specifies the duration of the lease, in seconds, or InfiniteLeaseDuration for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change. |
options | Optional parameters to execute this function. |
context | Context for cancelling long running operations. |
- Returns
- An AcquireLeaseResult describing the lease.
◆ Break()
- Parameters
-
options | Optional parameters to execute this function. |
context | Context for cancelling long running operations. |
- Returns
- A BreakLeaseResult describing the broken lease.
◆ Change()
- Parameters
-
proposedLeaseId | Proposed lease ID, in a GUID string format. |
options | Optional parameters to execute this function. |
context | Context for cancelling long running operations. |
- Returns
- A ChangeLeaseResult describing the updated lease.
◆ CreateUniqueLeaseId()
std::string Azure::Storage::Files::Shares::ShareLeaseClient::CreateUniqueLeaseId |
( |
| ) |
|
|
static |
- Returns
- A unique lease ID.
◆ GetLeaseId()
const std::string& Azure::Storage::Files::Shares::ShareLeaseClient::GetLeaseId |
( |
| ) |
|
|
inline |
- Returns
- Lease ID of this lease client.
◆ Release()
- Parameters
-
options | Optional parameters to execute this function. |
context | Context for cancelling long running operations. |
- Returns
- A ReleaseLeaseResult describing the updated share or file.
The documentation for this class was generated from the following files: