Skip to content

Confused delete_snapshots in delete_blob() #15891

@Juliehzl

Description

@Juliehzl

I am confused by the delete_snapshots parameter. In function parameter list, it is in boolean and in description, it is string.
What is the right one?

def delete_blob(self, delete_snapshots=False, **kwargs):
# type: (str, **Any) -> None
"""Marks the specified blob for deletion.
The blob is later deleted during garbage collection.
Note that in order to delete a blob, you must delete all of its
snapshots. You can delete both at the same time with the delete_blob()
operation.
If a delete retention policy is enabled for the service, then this operation soft deletes the blob
and retains the blob for a specified number of days.
After the specified number of days, the blob's data is removed from the service during garbage collection.
Soft deleted blob is accessible through :func:`~ContainerClient.list_blobs()` specifying `include=['deleted']`
option. Soft-deleted blob can be restored using :func:`undelete` operation.
:param str delete_snapshots:
Required if the blob has associated snapshots. Values include:
- "only": Deletes only the blobs snapshots.
- "include": Deletes the blob along with all snapshots.

Metadata

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.StorageStorage Service (Queues, Blobs, Files)bugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions