Renaming a Compartment

Edit or update a compartment's name in an IAM tenancy.

    1. Open the navigation menu and click Identity & Security. Under Identity, click Compartments.

      A list of the compartments that you have access to in the tenancy is displayed.

    2. For the compartment you want to rename, click click the Actions menu (Actions Menu), and then select Rename Compartment.
      Tip

      You can't change the name of the root compartment.
    3. Enter the new name. The name must be unique across all the compartments in the tenancy. The name can have a maximum of 100 characters, including letters, numbers, periods, hyphens, and underscores. Avoid entering confidential information.
    4. Click Rename Compartment.
  • Use the update command and required parameters to update a compartment's name:

    export compartment_id=compartment_ocid # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/iam/compartment/update.html#cmdoption-compartment-id
    oci iam compartment update --compartment-id compartment_ocid

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

  • Run the UpdateCompartment operation to edit a compartment's name.