Moving Key References

Learn how to move a key reference from one compartment to another compartment in OCI External Key Management.

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

    1. Open the navigation menu , select Identity & Security, and then select External Key Management.
    2. On the External key Management home page, select a vault from the list.
    3. On the Vault Details page, select a key reference.
    4. On the Key Reference Details page, select Move Resource.
    5. Select a compartment to which you want to move the resource.
    6. Select 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.

  • Use the ChangeKeyCompartment API with the Management Endpoint to change compartment of the key reference.

    Note

    The Management Endpoint is used for management operations including Create, Update, List, Get, and Delete. The Management Endpoint is also called the control plane URL or the KMSMANAGMENT endpoint.

    The Cryptographic Endpoint is used for cryptographic operations including Encrypt, Decrypt, Generate Data Encryption Key, Sign, and Verify. The Cryptographic Endpoint is also called the data plane URL or the KMSCRYPTO endpoint.

    You can find the management and cryptographic endpoints in a vault's details metadata. See Getting a Vault's Details for instructions.

    For regional endpoints for the Key Management, Secret Management, and Secret Retrieval APIs, see API Reference and Endpoints.

    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.