FQL v4 will be decommissioned on June 30, 2025. Ensure that you complete your migration from FQL v4 to FQL v10 by that date.

For more details, review the migration guide. Contact support@fauna.com with any questions.

delete-key

Delete a key.

Syntax

fauna delete-key KEYNAME [OPTIONS]

Description

The delete-key command deletes a key.

If you don’t pass any options at the command line, Fauna uses the default options in the fauna-shell configuration file.

Arguments

Argument Description

KEYNAME

The name of the key to delete.

Options

Option Description

--domain=<domain>

Optional Fauna server domain, that is, the hostname where Fauna is running. Defaults to db.fauna.com.

--endpoint=<name>

Optional name of the endpoint to use for the command.

--port=<number>

Optional connection port. Defaults to 8443.

--scheme=<scheme>

Optional connection scheme. Must be one of https or http. Defaults to https.

--secret=<secret>

Optional secret to use. A secret authenticates your connection to Fauna, and connects you to a database.

--timeout=<integer>

Optional connection timeout, an integer number of milliseconds. When the interval has elapsed, fauna-shell stops waiting for a response and displays an error.

The default is zero, which means that fauna-shell waits until a response is received.

Example

There are already four keys for this example:

$ fauna list-keys
listing keys
Key ID               Database             Role
259718958404338186   app1                 server
259719743570706945   app1                 client
265528117038154259   my-test-db           admin
265437820880945683   my-test-db           admin

Now, delete the first key in the list:

$ fauna delete-key 259718958404338186
deleting key 259718958404338186
key 259718958404338186 deleted

When you list the keys again, you see that the key you deleted is now gone:

$ fauna list-keys
listing keys
Key ID               Database             Role
259719743570706945   app1                 client
265528117038154259   my-test-db           admin
265437820880945683   my-test-db           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!