Moving a Log Group Between Compartments

Move a log group to a different compartment.

  • When you move a log group to a new compartment, all the logs in the log group move with the log group to the new compartment. After you move the log group to the new compartment, the policies in the new compartment apply immediately, and they affect access to the log group and any logs the log group contains.

    For more information, see Moving Resources to a Different Compartment.

    Note

    You can't move, edit, or delete the default log group.
    1. On the Log groups list page, find the log group that you want to work with. If you need help finding the list page or the log group, see Listing Log Groups.
    2. To view the log groups in a different compartment, use the Compartment filter to switch compartments.

      You must have permission to work in a compartment to see the resources in it. If you're not sure which compartment to use, contact an administrator. For more information, see Understanding Compartments.

    3. From the Actions menu (three dots) for the log group, select Move resource.
      The Move resource panel opens.
    4. In the Move resource panel, select the destination compartment from the list.
    5. Select Move resource.
  • Use the oci logging log-group change-compartment command and required parameters to move a log group between compartments:

    oci logging log-group change-compartment --log-group-id log_group_ocid [OPTIONS]

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

  • Run the ChangeLogGroupCompartment operation to move a log group between compartments.