Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample(storage): Soft deleted Bucket Restore #28760

Draft
wants to merge 67 commits into
base: main
Choose a base branch
from

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

@shubhangi-google shubhangi-google force-pushed the soft_deleted_bucket_restore_with_sample branch 2 times, most recently from 0085055 to 4bdeb8b Compare January 28, 2025 11:59
@shubhangi-google
Copy link
Contributor Author

shubhangi-google commented Jan 28, 2025

Please ignore ci issues in this PR for now, This Pr is for tracking sample failures
we will update the PR when feature Pr is merged (#28138)

@bajajneha27 bajajneha27 added the kokoro:run Add this label to force Kokoro to re-run the tests. label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kokoro:run Add this label to force Kokoro to re-run the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants