Listing Object Storage Retention Rules

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

    1. Open the navigation menu and click Storage. Under Object Storage & Archive Storage, click Buckets.
    2. 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.
    3. Click the bucket whose retention rules you want to list. The bucket's Details page appears.
    4. Click Retention Rules under Resources. The Retention Rules list appears.

    All retention rules are listed in tabular form.

  • 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.