Cause. The object does not exist, or it is not visible to the caller. Kyvernon gives the same answer for both, so that a caller without access cannot find out whether an object exists. The object may have been removed, or the identifier is wrong.
Remedy.
Refresh the inventory in the console, or list the objects again: kyvernon inventory search <name>.
Check the identifier you used. Identifiers have the form <kind>-<number>.
When the object should exist, ask an administrator whether your role grants access to it: kyvernon privileges check <entity> <privilege>.
error.already_exists
Text in the console
An object with that name or id already exists. Choose another name.
Cause. The object changed between the moment you read it and the moment you saved it. Every change names the version it is based on (expectedVersion in the API, If-Match for the firewall), and that version is no longer current.
Remedy.
Reload the object in the console, or read it again: kyvernon inventory get <id>.
Apply your change again to the version that you read. With the CLI, pass the new version: kyvernon inventory update <id> --expected-version <version> --body-file <file>.
Cause. The user, or the token, holds a role without the privilege that the operation needs on that object. The privilege is named in the argument privilege of the API response.
Remedy.
Check the privilege in the response, then check what your role holds: kyvernon privileges check <entity> <privilege>.
Ask an administrator for a role that includes the privilege on that object. The administrator grants it with kyvernon permissions set <entity> <principal> --role <role>.
Pass on the message id, the name of the privilege and the time.
Cause. A request tried to delete an audit record. Audit records are append-only, and no role can delete them.
Remedy.
Do not delete audit records. Remove the request from the script or tool that sends it.
To limit how long audit records are kept, an administrator sets audit_age in the [retention] section of the controller configuration. Kyvernon removes records that are older than that itself.