s3cmd icon indicating copy to clipboard operation
s3cmd copied to clipboard

Add setobjectretention and setobjectlegalhold commands

Open withings-sas opened this issue 3 years ago • 2 comments

These commands enable s3cmd to activate the 'retention' and 'legal hold' on an object.

I tried to keep it very simple and flexible, so the xml file containing the arguments has to be written outside and given as an argument.

withings-sas avatar Mar 25 '22 16:03 withings-sas

Any chance someone can review this ? It's quite straighforward but please let us know if we need to make some improvements

withings-sas avatar May 30 '22 14:05 withings-sas

Thank you for your contribution and sorry to give you a feedback so late. These are interesting new commands to add to s3cmd.

Regarding the fact that they take only a very limited input, (a single "ON/OFF" parameter for setobjectlogalhold for example), would you be ok to rework your patch to just do the requested action directly, without taking a xml file as input?

In my mind, it is different of a policy for example, that could be quite complex.

Also, it would be interesting to have the "get" command going with the "set" I think :-)

fviard avatar Aug 27 '22 23:08 fviard

Thank you, I've created another pull request for this: https://github.com/s3tools/s3cmd/pull/1297

You can scrap this one

withings-sas avatar Dec 12 '22 17:12 withings-sas

Closing as replaced by #1297 .

fviard avatar Oct 20 '23 21:10 fviard