Editing an Object Storage Data Retention Rule
Update a retention rule for an Object Storage bucket.
You can get the retention rule's ID by running the list command. See Listing Object Storage Data Retention Rules.
Use the oci os retention-rule update command and required parameters to edit a retention rule for a bucket:
oci os retention-rule update --bucket-name bucket_name --retention-rule-id retention_rule_id [OPTIONS]For example:
oci os retention-rule update --bucket-name MyBucket --retention-rule-id b1a6c84c-57c4-416c-b006-f864b0904c9e --time-amount 6 --time-unit years --time-rule-locked "2020-04-30 00:00" { "data": { "display-name": "RegulatoryCompliance", "duration": { "time-amount": 6, "time-unit": "YEARS" }, "etag": "700ada5c-6a2a-4c6c-acb6-4ebb173e0f8f", "id": "b1a6c84c-57c4-416c-b006-f864b0904c9e", "time-created": "2020-03-25T15:11:44.423000+00:00", "time-modified": "2020-03-25T15:46:28.724000+00:00", "time-rule-locked": "2020-04-30T00:00:00+00:00" }, "etag": "700ada5c-6a2a-4c6c-acb6-4ebb173e0f8f" }In this example, the retention rule has been updated to include values for
time-amount,time-unit, andtime-rule-locked.For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Run the UpdateRetentionRule operation to edit a retention rule for a bucket.