Please help with error PermanentDeleteNotSupportedOnRootBlob
I generated SAStoken for BLOB with all permissions including Delete & Permanent Delete
While making API call using below blog https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob
request url: "https://[SAS URL]&deletetype=permanent"
Getting 409 error as "PermanentDeleteNotSupportedOnRootBlob"
x-ms-delete-snapshots in the header is "include"
Storage Account - 'Permanent Delete soft deleted blobs' option is enabled
Google does not return anything for PermanentDeleteNotSupportedOnRootBlob
Also tried with both Signing method as Account key & User delegation key and got same error
I tried to reproduce the same in my environment.
To permanently delete blob, their snapshot must also be soft deleted
For that Make sure to enable versioning for blobs while creating.
If already created, you can enable version from data protection configuration.
With
https://xxxx.blob.core.windows.net/container/blob?sp=r&st=2023-01-27T12:43:35Z&se=2023-01-27T20:43:35Z&spr=https&sv=2021-06-08&sr=b&sig=xxxx%3D&deletetype=permanent
The blob can be deleted successfully
Note :
- Make sure the versionId is given correctly.
- For already existing blob, disable soft delete, undelete the blobs then enable all the above mentioned properties and delete again.
Otherwise one may come across 409 error.
Reference : Delete Blob (REST API) -permanent-delete Azure Storage | Microsoft Learn
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.