Azure / azure-cli

Azure Command-Line Interface
MIT License
4.02k stars 2.99k forks source link

How to remove ScopeLock before deletition #20232

Open szabgab opened 3 years ago

szabgab commented 3 years ago

I created a file-share using the CLI and then tried to delete it using

az storage share-rm delete --resource-group GROUP --storage-account ACCOUNT --name NAME --yes

I got an error:

(ScopeLocked) The scope '...' cannot perform delete operation because following scope(s) are locked: '...'. Please remove the lock and try again.
Code: ScopeLocked

IMHO The documentation of share-rm should mention this and maybe other potential error messages and how to handle them.

At least there should be a way to find the meaning of ScopeLocked but the search returns nothing.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

yonzhan commented 3 years ago

storage