Tagging an Object Storage Bucket at Creation

Add metadata to an Object Storage bucket when you first create it. This metadata enables you to define keys and values and associate them with resources.

For more information, see Overview of Tagging.

    1. Begin the steps for creating a bucket using the Oracle Cloud Infrastructure Console as described in Creating an Object Storage Bucket.
    2. Find the Tags section of the Create Bucket dialog box.
    3. Complete the following. See Overview of Tagging for descriptions of these fields.
      • Tag namespace

      • Tag key

      • Value

    4. Click Add tag to add another tag. Click X to remove the associated tag.
    5. Click Create.
  • Use the --defined-tags or --freeform-tags options when running the oci os bucket create command to tag a bucket at the time of its creation:

    oci os bucket create --compartment-id compartment_ocid --defined-tags JSON_formatted_defined_tag --freeform-tags JSON_formatted_free-form_tag [OPTIONS]

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the CreateBucket operation to create a bucket. Include the definedTags and freeformTags attributes and their values.

    When accessing the Object Storage API, the bucket name is used with the Object Storage namespace name to form the request URL:

    n/object_storage_namespace/b/bucket