Getting an Object Storage Retention Rule's Details
View a retention rule's details for an Object Storage bucket.
You can get the retention rule's ID by running the list command. See Listing Retention Rules.
- Open the navigation menu and click Storage. Under Object Storage & Archive Storage, click Buckets.
- Select the compartment from the list under List Scope. All buckets in that compartment are listed in tabular form. This is the compartment where the bucket you create is located.
- Click the bucket for which you're creating a retention rule. The bucket's Details page appears.
- Click Retention Rules under Resources. The Retention Rules list appears. All retention rules are listed in tabular form.
- Click the retention rule whose details you want to get. The retention rules Details page appears.
You can view the details for the retention rule, such as its retention duration lock state, scheduled lock time, and when it was last modified.
Use the oci os retention-rule list command and required parameters to get the details of a retention rule for a bucket:
oci os retention-rule get --bucket-name bucket_name --retention-rule-id retention_rule_id [OPTIONS]
For example:
oci os retention-rule get --bucket-name MyBucket --retention-rule-id b1a6c84c-57c4-416c-b006-f864b0904c9e { "data": { "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" }, "etag": "c05f02d3-d2b5-4378-9fcb-3a92ba0e018f" }
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Run the GetRetentionRule operation get the details of a retention rule for a bucket.