-
Notifications
You must be signed in to change notification settings - Fork 1k
feat(storage): add samples for soft delete (objects) #2085
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
base: main
Are you sure you want to change the base?
feat(storage): add samples for soft delete (objects) #2085
Conversation
Here is the summary of changes. You are about to add 6 region tags.
This comment is generated by snippet-bot.
|
$bucket = $storage->bucket($bucketName); | ||
$bucket->update([ | ||
'softDeletePolicy' => [ | ||
'retentionDurationSeconds' => 864000, |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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!
Added Storage Samples: