B2_Command_Line_Tool icon indicating copy to clipboard operation
B2_Command_Line_Tool copied to clipboard

`b2 help update-bucket` should show examples of valid syntax

Open clunkclunk opened this issue 6 years ago • 2 comments

b2 help update-bucket and b2 update-bucket does not include examples of correct json syntax which can be a little finicky for a user to guess at without an example.

Here's an example of the equivalent to "Keep only the last version of the file" from the GUI of the B2 website: b2 update-bucket --lifecycleRules '[{"daysFromHidingToDeleting": 1, "daysFromUploadingToHiding": null, "fileNamePrefix": ""}]' BucketName allPrivate

Perhaps an example of corsRules and bucketInfo may be useful as well.

Thanks!

clunkclunk avatar Feb 22 '19 21:02 clunkclunk

That's a good point actually!

Would you like to do the honors and add the example to the help syntax?

ppolewicz avatar Feb 23 '19 14:02 ppolewicz

Thanks @clunkclunk, it took me finding your example here to finally get the correct syntax. +1

luboslives avatar Mar 31 '20 17:03 luboslives