Renaming a Compartment
Edit or update a compartment's name in an IAM tenancy.
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.