user1655072
user1655072

Reputation: 672

After a acquire a lease for a azure blob where do I find the release ID so I can release it?

Following azure CLI using the document from Azure CLI doc, I can acquire the lease for my azure blob file. However, to release the blob I need a release ID for my leased blob. Where can I get this ID from CLI?

Upvotes: 1

Views: 2775

Answers (1)

Gaurav Mantri
Gaurav Mantri

Reputation: 136336

Where can I get this ID from CLI?

Unfortunately you can't get the lease id after the fact. The lease id is not stored anywhere in the system. It is the responsibility of the lease acquirer to store the lease id.

Considering you don't have the lease id, thus you won't be able to release the lease. However what you can do is break the lease which is same as releasing the lease and it does not require lease id.

az storage blob lease break --blob-name
                            --container-name
                            [--account-key]
                            [--account-name]
                            [--auth-mode {key, login}]
                            [--connection-string]
                            [--if-match]
                            [--if-modified-since]
                            [--if-none-match]
                            [--if-unmodified-since]
                            [--lease-break-period]
                            [--only-show-errors]
                            [--sas-token]
                            [--subscription]
                            [--timeout]

Upvotes: 2

Related Questions