delete-key

Delete a database key.

Syntax

fauna delete-key KEYNAME [--url <value>] [--timeout <value>] [--secret <value>] [--endpoint <value>] [--environment <value>]

Description

The delete-key command deletes a key.

Arguments

Argument Description

KEYNAME

Name of the key to delete.

Options

Option Description

--endpoint

Connection endpoint from ~/.fauna-shell.

--environment

Environment to use, from a Fauna project.

--help

Help for create-database command.

--secret

Secret key. Overrides the secret in ~/.fauna-shell.

--timeout

Connection timeout (milliseconds).

--url

Database URL. Overrides the URL in ~/.fauna-shell.

Example

There are already four keys for this example:

fauna list-keys

The response includes each key’s ID, database, and role. It doesn’t include the key’s secret:

Key ID               Database             Role
259718958404338186   prod                 server
259719743570706945   prod                 client
265528117038154259   childDB              admin
265437820880945683   childDB              admin

Now, delete the first key in the list:

fauna delete-key 259718958404338186

List the keys again:

fauna list-keys

The key you deleted is now gone:

Key ID               Database             Role
259719743570706945   prod                 client
265528117038154259   childDB              admin
265437820880945683   childDB              admin

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!