-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Type of issue
Other (describe below)
Reference command name
az storage share-rm delete
Feedback
Hello team,
I'm not sure if this is a documentation issue or an unexpected behavior related to command az storage share-rm delete when used to delete snapshots.
Example:
| Resource type | Name |
|---|---|
| Storage account | saname |
| File share | fsname |
| Snapshot | 2026-01-30T11:06:35.0000000Z |
If you run this command and the snapshot does not exist, you get an error:
az storage share-rm delete --include snapshots -g "rg" --storage-account "saname" --name "fsname" --snapshot "2026-01-30T11:06:35.0000000Z"
(ShareSnapshotNotFound) The specified share snapshot was not found.
RequestId: xxx
Time:2026-02-02T10:14:13.0557654Z
Code: ShareSnapshotNotFound
Which is expected as the snapshot no longer exist.
Now, if we pass an incorrect file share name (testfswrongname), the operation finish successfully without showing any error or output:
az storage share-rm delete --include snapshots -g "rg" --storage-account "satestcasesnapshot" --name "testfswrongname" --snapshot "2026-01-30T11:06:35.0000000Z"
This can be reproduced at will
This last behavior is consistent to what it is explained in the documentation for a different command (az storage share delete), which states this:
If the share does not exist, the operation fails on the service. By default, the exception is swallowed by the client. To expose the exception, specify True for fail_not_exist.
This is not mentioned in the documentation of az storage share-rm delete and the command does not have the parameter --fail-not-exist:
Is it possible to update the documentation of az storage share-rm delete to mention this behavior? (or in the future, adding a similar feature like --fail-not-exist)
Thanks!
Page URL
Content source URL
No response
Author
No response
Document Id
No response