Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Blob Storage Acquire Lease throws an error when time lease time more than 1 minute

I have am trying to acquire lease on a blog but it gives me a 400 Bad Request. If the time span is more than 1 minute.

Is this expected? I am not able to find any documentation on it.

like image 475
Ovais Avatar asked Oct 02 '22 09:10

Ovais


1 Answers

Originally, blob leases were simply 60 seconds. Starting with the 2012-02-12 version, blob lease durations can be between 15-60 seconds, or infinite. You can read this blog post for more details around all the updates in the 2012-02-12 update.

If you want to see the actual REST API details behind the SDK, it's documented here. In this page, you'll see that an infinite lease duration is specified as -1 (which is slightly different from, say, the .net SDK call, which uses null to signify infinite lease).

like image 200
David Makogon Avatar answered Oct 05 '22 12:10

David Makogon