Add setobjectretention and setobjectlegalhold commands
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.
Any chance someone can review this ? It's quite straighforward but please let us know if we need to make some improvements
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 :-)
Thank you, I've created another pull request for this: https://github.com/s3tools/s3cmd/pull/1297
You can scrap this one
Closing as replaced by #1297 .