Storage: add support for deleting specific blob generations #5781
Labels
api: storage
Issues related to the Cloud Storage API.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
OS: Debian Stretch
Python 3.6.6
google-cloud-storage 1.10.0
In the following scenario, the API will return versioned blobs. However, it is unable to delete a specific version, as the
Blob.delete
method does not take ageneration
parameter nor doesBucket.delete_blob
.blobs
will iterate over all versions, but calling.delete()
on any of them will always delete the current version as the delete code does not supply?generation=<generation>
in the request.This leads to unintentional data loss when trusting
blob.delete()
to delete that specific blob.Ideally,
blob.delete()
would delete the generation corresponding to that blob's.generation
property (this would mimicboto
's behavior).The text was updated successfully, but these errors were encountered: