Skip to content

Commit

Permalink
add --lifecycle-rule example to CLI docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mjurbanski-reef committed Jun 13, 2024
1 parent 100a848 commit 2ea6ec5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions b2/_internal/console_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,8 +835,9 @@ class LifecycleRulesMixin(Described):
"""
Use `--lifecycle-rule` to set lifecycle rule for the bucket.
Multiple rules can be specified by repeating the option.
`--lifecycle-rules` option is deprecated and cannot be used together with --lifecycle-rule.
All bucket lifecycle rules are set at once, so if you want to add a new rule,
you need to provide all existing rules.
Example: :code:`--lifecycle-rule '{{"daysFromHidingToDeleting": 1, "daysFromUploadingToHiding": null, "fileNamePrefix": "documents/"}}' --lifecycle-rule '{{"daysFromHidingToDeleting": 1, "daysFromUploadingToHiding": 7, "fileNamePrefix": "temporary/"}}'`
"""

@classmethod
Expand Down
1 change: 1 addition & 0 deletions changelog.d/432.doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add `--lifecycle-rule` example to CLI `--help` and documentation.

0 comments on commit 2ea6ec5

Please sign in to comment.