Listing Object Storage Data Retention Rules
View a list of the retention rules for an Object Storage bucket.
Actions
In the list table, select the name of a data retention rule to open its details page, where you can view its status and perform other tasks.
To perform an action on a data retention rule directly from the list table, select an available option from the Actions menu in the row for that data retention rule:
- View rule details: Open the details page for the data retention rule.
- Edit rule: Edit the settings of the data retention rule.
- Delete rule: Delete the data retention rule.
To create a data retention rule, select Create rule.
Use the oci os retention-rule list command and required parameters to list the retention rules for a bucket:
oci os retention-rule list --bucket-name bucket_name [OPTIONS]For example:
oci os retention-rule list --bucket-name MyBucket { "data": { "items": [ { "display-name": "RegulatoryCompliance", "duration": { "time-amount": 5, "time-unit": "YEARS" }, "etag": "c05f02d3-d2b5-4378-9fcb-3a92ba0e018f", "id": "b1a6c84c-57c4-416c-b006-f864b0904c9e", "time-created": "2020-03-25T15:11:44.423000+00:00", "time-modified": "2020-03-25T15:11:44.423000+00:00", "time-rule-locked": "2020-04-28T00:00:00+00:00" }, { "display-name": "DataGovernance", "duration": { "time-amount": 5, "time-unit": "DAYS" }, "etag": "efb9178f-4213-49f7-878d-7bbe57decc0b", "id": "89f4ca0c-4ad9-4fa5-8005-95e7741c531c", "time-created": "2020-03-25T15:08:01.601000+00:00", "time-modified": "2020-03-25T15:08:01.601000+00:00", "time-rule-locked": null }, { "display-name": "LegalHold", "duration": null, "etag": "7f51ef6c-3fca-48f7-9060-c129911c1a50", "id": "5772c87f-6723-4ecc-b44c-bef86643be92", "time-created": "2020-03-25T14:53:20.792000+00:00", "time-modified": "2020-03-25T14:53:20.792000+00:00", "time-rule-locked": null } ] } }For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Run the ListRetentionRules operation to list the retention rules for a bucket.