Path - Lease
Lease Path
Create and manage a lease to restrict write and delete access to the path. This operation supports conditional HTTP requests. For more information, see Specifying Conditional Headers for Blob Service Operations.
POST https://{accountName}.{dnsSuffix}/{filesystem}/{path}
POST https://{accountName}.{dnsSuffix}/{filesystem}/{path}?timeout={timeout}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
account
|
path | True |
string |
The Azure Storage account name. |
dns
|
path | True |
string |
The DNS suffix for the Azure Data Lake Storage endpoint. |
filesystem
|
path | True |
string |
The filesystem identifier. Regex pattern: |
path
|
path | True |
string |
The file or directory path. |
timeout
|
query |
integer int32 |
An optional operation timeout value in seconds. The period begins when the request is received by the service. If the timeout value elapses before the operation completes, the operation fails. |
Request Header
Name | Required | Type | Description |
---|---|---|---|
x-ms-lease-action | True |
There are five lease actions: "acquire", "break", "change", "renew", and "release". Use "acquire" and specify the "x-ms-proposed-lease-id" and "x-ms-lease-duration" to acquire a new lease. Use "break" to break an existing lease. When a lease is broken, the lease break period is allowed to elapse, during which time no lease operation except break and release can be performed on the file. When a lease is successfully broken, the response indicates the interval in seconds until a new lease can be acquired. Use "change" and specify the current lease ID in "x-ms-lease-id" and the new lease ID in "x-ms-proposed-lease-id" to change the lease ID of an active lease. Use "renew" and specify the "x-ms-lease-id" to renew an existing lease. Use "release" and specify the "x-ms-lease-id" to release a lease. |
|
x-ms-lease-duration |
integer int32 |
The lease duration is required to acquire a lease, and specifies the duration of the lease in seconds. The lease duration must be between 15 and 60 seconds or -1 for infinite lease. |
|
x-ms-lease-break-period |
integer int32 |
The lease break period duration is optional to break a lease, and specifies the break period of the lease in seconds. The lease break duration must be between 0 and 60 seconds. |
|
x-ms-lease-id |
string |
Required when "x-ms-lease-action" is "renew", "change" or "release". For the renew and release actions, this must match the current lease ID. Regex pattern: |
|
x-ms-proposed-lease-id |
string |
Required when "x-ms-lease-action" is "acquire" or "change". A lease will be acquired with this lease ID if the operation is successful. Regex pattern: |
|
If-Match |
string |
Optional. An ETag value. Specify this header to perform the operation only if the resource's ETag matches the value specified. The ETag must be specified in quotes. |
|
If-None-Match |
string |
Optional. An ETag value or the special wildcard ("*") value. Specify this header to perform the operation only if the resource's ETag does not match the value specified. The ETag must be specified in quotes. |
|
If-Modified-Since |
string |
Optional. A date and time value. Specify this header to perform the operation only if the resource has been modified since the specified date and time. |
|
If-Unmodified-Since |
string |
Optional. A date and time value. Specify this header to perform the operation only if the resource has not been modified since the specified date and time. |
|
x-ms-client-request-id |
string |
A UUID recorded in the analytics logs for troubleshooting and correlation. Regex pattern: |
|
x-ms-date |
string |
Specifies the Coordinated Universal Time (UTC) for the request. This is required when using shared key authorization. |
|
x-ms-version |
string |
Specifies the version of the REST protocol used for processing the request. This is required when using shared key authorization. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The "renew", "change" or "release" action was successful. Headers
|
|
201 Created |
A new lease has been created. The "acquire" action was successful. Headers
|
|
202 Accepted |
The "break" lease action was successful. Headers
|
|
Other Status Codes |
An error occurred. The possible HTTP status, code, and message strings are listed below:
Headers
|
Definitions
Name | Description |
---|---|
Data |
|
Error |
The service error response object. |
Path |
There are five lease actions: "acquire", "break", "change", "renew", and "release". Use "acquire" and specify the "x-ms-proposed-lease-id" and "x-ms-lease-duration" to acquire a new lease. Use "break" to break an existing lease. When a lease is broken, the lease break period is allowed to elapse, during which time no lease operation except break and release can be performed on the file. When a lease is successfully broken, the response indicates the interval in seconds until a new lease can be acquired. Use "change" and specify the current lease ID in "x-ms-lease-id" and the new lease ID in "x-ms-proposed-lease-id" to change the lease ID of an active lease. Use "renew" and specify the "x-ms-lease-id" to renew an existing lease. Use "release" and specify the "x-ms-lease-id" to release a lease. |
DataLakeStorageError
Name | Type | Description |
---|---|---|
error |
The service error response object. |
Error
The service error response object.
Name | Type | Description |
---|---|---|
code |
string |
The service error code. |
message |
string |
The service error message. |
PathLeaseAction
There are five lease actions: "acquire", "break", "change", "renew", and "release". Use "acquire" and specify the "x-ms-proposed-lease-id" and "x-ms-lease-duration" to acquire a new lease. Use "break" to break an existing lease. When a lease is broken, the lease break period is allowed to elapse, during which time no lease operation except break and release can be performed on the file. When a lease is successfully broken, the response indicates the interval in seconds until a new lease can be acquired. Use "change" and specify the current lease ID in "x-ms-lease-id" and the new lease ID in "x-ms-proposed-lease-id" to change the lease ID of an active lease. Use "renew" and specify the "x-ms-lease-id" to renew an existing lease. Use "release" and specify the "x-ms-lease-id" to release a lease.
Name | Type | Description |
---|---|---|
acquire |
string |
|
break |
string |
|
change |
string |
|
release |
string |
|
renew |
string |