Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

shubhangi-google
Copy link
Contributor

Add support for restoring soft deleted bucket.

Operation Supported:

  • Get Bucket Generation
  • Get a Soft Deleted Bucket (Also soft-delete time and hard-delete time)
  • List Soft Deleted Buckets
  • Restore a Soft Deleted Bucket
@example
require "google/cloud/storage"
storage = Google::Cloud::Storage.new
bucket = storage.bucket "my-bucket"
bucket.delete
##fetch bucket generation
 generation= bucket.generation
## list soft_deleted buckets
deleted_buckets= storage.buckets soft_deleted: true
## restore bucket
bucket = storage.restore_bucket "my-bucket", generation

@bajajneha27 bajajneha27 added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label May 28, 2025
@bajajneha27 bajajneha27 changed the title Sample(storage): Soft deleted Bucket Restore sample(storage): Soft deleted Bucket Restore Jul 10, 2025
@shubhangi-google shubhangi-google force-pushed the soft_deleted_bucket_restore_with_sample branch from 63c02e0 to 1c501a5 Compare July 14, 2025 12:14
@shubhangi-google shubhangi-google marked this pull request as draft July 14, 2025 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Indicates a pull request not ready for merge, due to either quality or timing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants