简体   繁体   English

通过 rest 永久删除软删除 blob 时出错 API

[英]Error while permanent deleting soft deleted blob through rest API

Please help with error PermanentDeleteNotSupportedOnRootBlob请帮助解决错误 PermanentDeleteNotSupportedOnRootBlob

I generated SAStoken for BLOB with all permissions including Delete & Permanent Delete我为 BLOB 生成了 SAStoken,具有所有权限,包括删除和永久删除

While making API call using below blog https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob使用以下博客 API 进行调用时 https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob

request url: "https://[SAS URL]&deletetype=permanent"请求 url:“https://[SAS URL]&deletetype=permanent”

Getting 409 error as "PermanentDeleteNotSupportedOnRootBlob"获取 409 错误作为“PermanentDeleteNotSupportedOnRootBlob” 响应错误

x-ms-delete-snapshots in the header is "include" header 中的 x-ms-delete-snapshots 是“include”

Storage Account - 'Permanent Delete soft deleted blobs' option is enabled存储帐户 - 启用“永久删除软删除 blob”选项在此处输入图像描述

Google does not return anything for PermanentDeleteNotSupportedOnRootBlob Google 不会为 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.要永久删除 blob, their snapshot must also be soft deleted为此确保在创建时为 blob 启用版本控制。

在此处输入图像描述

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可以成功删除blob

Note :注意

  1. Make sure the versionId is given correctly.确保正确给出了 versionId。
  2. For already existing blob, disable soft delete, undelete the blobs then enable all the above mentioned properties and delete again.对于已经存在的 blob,禁用软删除,取消删除 blob,然后启用所有上述属性并再次删除。

Otherwise one may come across 409 error.否则可能会遇到 409 错误。

在此处输入图像描述

Reference : Delete Blob (REST API) -permanent-delete Azure Storage |参考删除 Blob (REST API) -permanent-delete Azure 存储 | Microsoft Learn 微软学习

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure - C# - 使用 Rest 上传图像时出错 API - Azure - C# - Error while uploading image using Rest API 设置带括号的 Azure Blob 索引标签 - 在浏览器中有效,但在 REST 中无效 API - Setting Azure Blob Index tags with parenthesis - works in Browser but not in REST API 通过 rest API 使用 --files 启动数据处理作业 - Launch a dataproc job with --files through the rest API Twilio REST API 错误 - “认证” - Twilio REST API error - "Authenticate" 通过 REST 上传大文件到 Azure blob 存储 API Put Block Blob - Upload large file to Azure blob storage via REST API Put Block Blob 调用 spring 启动时出错 api 通过 Cloud build 部署在 google App Engine 中 - Error while calling spring boot api which is deployed in google App Engine through Cloud build 尝试使用 python 下载 azure blob 时出现 ConditionNotMet 错误 - ConditionNotMet error while trying to download azure blob using python 使用简单的 rest api 调用时,在 aws lambda 中找不到处理程序错误 - Handler not found error in aws lambda while using a simple rest api call 调用 REST API 到 SQL 存储过程 - Invoking REST API through SQL Stored Proc 如何使用 Terraform 清除软删除的 APIM? - How Do I Purge A Soft-Deleted APIM With Terraform?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM