Moving Key References

Move a key reference from one compartment to another compartment.

You can move key reference from the existing compartment to another compartment in the same region.

    1. Open the Oracle Cloud Console navigation menu and click Identity & Security. Under Key Management and Secret Management, click External Key Management
    2. In the External key Management home page, select a vault from the summary table.
    3. In the Vault Details page, select a key reference.
    4. In the Key Reference Details page, click Move Resource.
    5. Choose a compartment to which you want to move the resource.
    6. Click Move resource.

      The resource is moved to the new compartment.

  • Open a command prompt and run oci kms management key change-compartment to move key reference.

    ooci kms management key change-compartment --external-key-reference-id <target_key_id> --compartment-id <new_compartment_id>

    Avoid entering confidential information.

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

  • Run the ChangeKeyCompartment operation to change compartment of the key reference.


    Each region has a unique endpoint for create, update, and list operations for secrets. This endpoint is referred to as the control plane URL or secret management endpoint. Each region also has a unique endpoint for operations related to retrieving secret contents. This endpoint is known as the data plane URL or the secret retrieval endpoint. For regional endpoints, see the API Documentation.

    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.