-
Notifications
You must be signed in to change notification settings - Fork 545
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
samples(storage): add samples for object retention #26158
Conversation
Here is the summary of changes. You are about to add 2 region tags.
This comment is generated by snippet-bot.
|
# bucket_name = "your-unique-bucket-name" | ||
|
||
# The content to upload to the file | ||
# content = "these are my content" |
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.
Nit: "this is my content" is grammatically less awkward.
|
||
# To modify an existing policy on an unlocked file object, pass in the override parameter. | ||
new_retention_date = DateTime.now + 9 # 9 days | ||
new_retention_params = { mode: "Unlocked", retain_until_time: new_retention_date, override_unlocked_retention: true } |
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.
Best to limit to 80 columns for samples, to reduce horizontal scrolling when it appears on web-based documentation pages.
closes: #24866