Moving an Artifact Registry Repository to a Different Compartment
Move an Artifact Registry repository from one compartment to another.
After you move a repository a new compartment, the policies that govern the new compartment apply immediately and affect access to that repository. For more information, see Managing Compartments.
- Open the navigation menu and click Developer Services. Under Containers & Artifacts, click Artifact Registry.
- Under List scope, choose the compartment that contains the repositories.
- Click the name of the repository that you want to move.
- Click Move Resource.
- Choose the destination compartment.
- Click Move Resource.
To move a repository into another compartment, use the
artifacts repository
resource, referenced in Artifact Registry CLI.Get all the commands for
artifacts repository
:oci artifacts repository -h
Get help for the
change-compartment
command:oci artifacts repository change-compartment -h
Find the options to provide for the
change-compartment
command:--repository-id
--compartment-id
Change the compartment of a repository:
oci artifacts repository change-compartment --repository-id <repository-OCID> --compartment-id <destination-compartment-OCID>
Example:
oci artifacts repository change-compartment --repository-id ocid1.artifactrepository.oc1..xxx... --compartment-id ocid1.compartment.oc1..xxx...
Use the ChangeRepositoryCompartment operation to move a repository to another compartment.