Moving a Vault to a Different Compartment
Learn how to move an OCI vault to a different compartment.
- Open the navigation menu , select Identity & Security, and then select Vault.
- Under List scope, select a compartment that contains the vault.
- On the Vaults page, select the name of the vault to open its details page.
- Select Move Resource.
- Select the destination compartment and then select Move Resource.
Open a command prompt and run
oci kms management vault change-compartment
to move a vault from one compartment to another within the same tenancy:oci kms management vault change-compartment --vault-id <target_vault_id> --compartment-id <new_compartment_id>
For example:
oci kms management vault change-compartment --vault-id ocid1.vault.region1.sea.exampleaaacu2.examplesrcvbtqe5wgrxn2jua3olmeausn5fauxseubwu5my5tf3w3 --compartment-id ocid1.compartment.oc1..example1example25qrlpo4agcmothkbgqgmuz2zzum45ibplooqtabwk3zz
For a complete list of parameters and values for CLI commands, see KMS CLI Command Reference.
Use the ChangeVaultCompartment API to move a vault to another compartment in OCI.
For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.