Listing Object Storage Data Retention Rules

View a list of the retention rules for an Object Storage bucket.

    1. On the Buckets list page, select the Object Storage bucket that you want to work with. If you need help finding the list page or the bucket, see Listing Buckets.
    2. On the details page, select Policies and find the Retention rules section.
      The Retention rules list opens. All data retention rules in the selected bucket are displayed in a table.
    3. To view the Object Storage data retention rules in a different compartment, use the Compartment filter to switch compartments.

      You must have permission to work in a compartment to see the resources in it. If you're not sure which compartment to use, contact an administrator. For more information, see Understanding Compartments.

    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:

    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.