Modifying a Retention Rule
On Compute Cloud@Customer, you can modify Object Storage retention rules.
This task isn't available in the Console.
Use the oci os retention-rule update command and required parameters to update a retention rule.
Syntax:
oci os retention-rule update --namespace-name <object_storage_namespace> --bucket-name <bucket_name> --retention-rule-id <retention_rule_id>
Followed by the retention rule item that you plan to change:
--time-amount <time_integer> --time-unit <days|years>
Example:
oci os retention-rule update \ --namespace-name examplenamespace \ --bucket-name MyBucket \ --retention-rule-id 344a9c205187408699b51c7769dc1bb4 \ --time-amount 60 \ --time-unit days { "data": { "display-name": "TempHold", "duration": { "time-amount": 60, "time-unit": "DAYS" }, "etag": "344a9c205187408699b51c7769dc1bb4", "id": "344a9c205187408699b51c7769dc1bb4", "time-created": "2021-06-10T22:17:50+00:00", "time-modified": "2021-06-10T22:45:16+00:00", "time-rule-locked": null } }
For a complete list of CLI commands, flags, and options, see the Command Line Reference.
Use the UpdateRetentionRule operation to update a retention rule.
For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.