v1

latestSwagger 2.02026-07-13125103.0 KB
File and Directory Operations

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/{filesystem}/{path}

Headers

x-ms-lease-action'acquire' | 'break' | 'change' | 'renew' | 'release' required

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-durationinteger

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-periodinteger

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-idstring

Required when "x-ms-lease-action" is "renew", "change" or "release". For the renew and release actions, this must match the current lease ID.

x-ms-proposed-lease-idstring

Required when "x-ms-lease-action" is "acquire" or "change". A lease will be acquired with this lease ID if the operation is successful.

If-Matchstring

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-Matchstring

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-Sincestring

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-Sincestring

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.

Response

The "renew", "change" or "release" action was successful.