Option to allow delete_blob for blob versions
Hi,
Recently Blob versions is enabled for GA , Hence we need option to enable lifecycle policies for Blob versions and python client delete_blob to allow versions only .
https://docs.microsoft.com/en-us/python/api/azure-storage-blob/azure.storage.blob.containerclient?view=azure-python#delete-blobs--blobs----kwargs-
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.
Hi @kgopi05
Thanks for reaching out. For blob_client.delete_blob, you can specify version_id parameter https://azuresdkdocs.blob.core.windows.net/$web/python/azure-storage-blob/12.4.0/azure.storage.blob.html#azure.storage.blob.ContainerClient.delete_blob
for delete_blobs it seems currently you cannot batch delete blob versions, we will double check and see if we are missing adding that to delete_blobs.
Hi @scbedd can you help take a look at the doc https://docs.microsoft.com/en-us/python/api/azure-storage-blob/azure.storage.blob.blobclient?view=azure-python#delete-blob-delete-snapshots-false----kwargs- it's missing some kwargs, here's how the api should look like https://azuresdkdocs.blob.core.windows.net/$web/python/azure-storage-blob/12.4.0/azure.storage.blob.html#azure.storage.blob.ContainerClient.delete_blob
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!
Hi @kgopi05
Thanks for reaching out. For blob_client.delete_blob, you can specify version_id parameter https://azuresdkdocs.blob.core.windows.net/$web/python/azure-storage-blob/12.4.0/azure.storage.blob.html#azure.storage.blob.ContainerClient.delete_blob
i'm unable to see the version_id in the blob parameters list , can you refer the right documentation link please ?
for delete_blobs it seems currently you cannot batch delete blob versions, we will double check and see if we are missing adding that to delete_blobs.
Hi @scbedd can you help take a look at the doc https://docs.microsoft.com/en-us/python/api/azure-storage-blob/azure.storage.blob.blobclient?view=azure-python#delete-blob-delete-snapshots-false----kwargs- it's missing some kwargs, here's how the api should look like https://azuresdkdocs.blob.core.windows.net/$web/python/azure-storage-blob/12.4.0/azure.storage.blob.html#azure.storage.blob.ContainerClient.delete_blob
Hi @kgopi05
Sorry I was looking at BlobClient.delete_blob() which is this https://azuresdkdocs.blob.core.windows.net/$web/python/azure-storage-blob/12.4.0/azure.storage.blob.html#azure.storage.blob.BlobClient.delete_blob
Please use this as reference, the doc for ContainerClient.delete_blob() is not accurate enough! Thanks for helping catch this, we will post a pr in a bit
Hey @kgopi05 I have just put up a PR to fix the docstrings for ContainerClient :)