Hello, I was wondering if it's possible to list out all buckets that have been deleted within a 24h time window. I would like to do this in a cloud function. So I was wondering which API to use and which method would work best. Thank you!
Hi @IsaacShoong,
Welcome to Google Cloud Community!
To list recently deleted buckets in Google Cloud, you can use the Cloud Logging API's locations.buckets.undelete method. This method allows you to restore deleted buckets within a seven-day grace period.
The steps involved are:
Note: this method only works within the seven-day grace period after deletion.
This only works for restoring logging buckets, not cloud storage buckets. For that you would need to contact GCP support.