Moving a Compartment
Move a compartment in an IAM tenancy.
manage all-resources
permissions on the lowest shared parent compartment of the current compartment and the destination compartment.Use the move command and required parameters to move a compartment:
export compartment_id=compartment_ocid # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/iam/compartment/move.html#cmdoption-compartment-id export target_compartment_id=target_compartment_ocid # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/iam/compartment/move.html#cmdoption-target-compartment-id oci iam compartment move --compartment-id compartment_ocid --target-compartment-id target_compartment_ocid
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Run the MoveCompartment operation to move a compartment.