azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

az storage share delete --delete-snapshots include-leased not allowed

Open pixeye33 opened this issue 3 years ago • 7 comments

Describe the bug When using az storage share delete --name xxx --account-name xxx --account-key xxx --delete-snapshots include-leased we get

ERROR: az storage share delete: 'include-leased' is not a valid value for '--delete-snapshots'. Allowed values: include.

for blob x-ms-delete-snapshots can be {include, only} as seen in Docs blob commands allows it az storage blob delete [--delete-snapshots {include, only}]

for share x-ms-delete-snapshots can be {include, include-leased} as seen in Docs but share commands do not allow include-leased az storage share delete [--delete-snapshots {include}]

Expected behavior being able to use the "include-leased" value. az storage share delete [--delete-snapshots {include, include-leased}]

Environment summary we use the Docker container with version 2.32.0

Additional context this was attempted because when using az storage share delete --name xxx --account-name xxx --account-key xxx --delete-snapshots include we got

Unable to delete share because one or more share snapshots have active leases. Release the share snapshot leases or delete the share with the include-leased parameter for x-ms-delete-snapshots. ErrorCode: DeleteShareWhenSnapshotLeased
<?xml version="1.0" encoding="utf-8"?><Error><Code>DeleteShareWhenSnapshotLeased</Code><Message>Unable to delete share because one or more share snapshots have active leases. Release the share snapshot leases or delete the share with the include-leased parameter for x-ms-delete-snapshots.
RequestId:b5e6aa40-d01a-0027-625a-1709a1000000
Time:2022-02-01T10:57:06.2359390Z</Message></Error>

pixeye33 avatar Feb 04 '22 14:02 pixeye33