Moving an API Key

Move an API key in OCI Generative AI from its current compartment into a different compartment.

    1. On the API keys list page, select the API key that you want to work with. If you need help finding the list page for API keys, see Listing API keys.
    2. To view the API keys 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 API key that you want to move, select Move resource.
    4. In the Move resource panel, select the destination compartment from the list.
    5. Select Move resource.
  • Use the api-key change-compartment command and required parameters to change an API key's compartment:

    oci generative-ai api-key change-compartment
                            [OPTIONS]

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

  • Run the ChangeApiKeyCompartment operation to change an API key's compartment.