Updating an API Key

Update the name and description of an API key in OCI Generative AI.

When you edit an API key, you can also update its tags. For instructions, see Updating a Tag for a Single Resource. For more information about tagging, see Resource Tags.

Note

To regenerate, activate, deactivate, and revoke an API key, see Managing API Keys.

The only way to change the expiration date of a key is to regenerate it, which creates a new key value and a new expiration date. If you do this, you need to update your applications to use the new key value.

    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. Select Actions and then Edit.
    3. Update the name and description.
    4. Select Update.
  • Use the api-key update command and required parameters to update an API key:

    oci generative-ai api-key update [OPTIONS]

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

  • Run the UpdateApiKey operation to update an API key.