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.

      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 #
    oci iam compartment update --compartment-id compartment_ocid

    For a complete list of flags and variable options for CLI commands, see the Command Line Reference.

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