Skip to content

Conversation

@thiyaguk09
Copy link
Contributor

Added Storage Samples:

  • List Soft Deleted Objects
  • List Versions of Soft Deleted Objects
  • Restore Deleted Objects
  • Disable Soft Delete Policy
  • Get Soft Delete Policy
  • Set Soft Delete Policy

@product-auto-label product-auto-label bot added api: storage Issues related to the Cloud Storage API. samples Issues that are directly related to samples. labels May 16, 2025
@thiyaguk09 thiyaguk09 marked this pull request as ready for review May 19, 2025 12:39
@thiyaguk09 thiyaguk09 requested review from a team as code owners May 19, 2025 12:39
@snippet-bot
Copy link

snippet-bot bot commented May 19, 2025

Here is the summary of changes.

You are about to add 6 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

$bucket = $storage->bucket($bucketName);
$bucket->update([
'softDeletePolicy' => [
'retentionDurationSeconds' => 864000,
Copy link

@TimothyLiuAtGoogle TimothyLiuAtGoogle May 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference between the value 864000 and 604800s (with a s suffix as below)? Also, IIUC, the type of 864000 is integer, the type of 604800s is string. Thanks :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're absolutely right — the value 864000 is an integer, while 604800s (with the s suffix) is a string. My bad on that — we’re using integers only here. I've updated it accordingly. Thanks for pointing it out!

@bshaffer bshaffer merged commit 0248eae into GoogleCloudPlatform:main Jun 10, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants