delete-key

Delete a child database key.

Syntax

fauna delete-key KEYNAME [OPTIONS]

Description

The delete-key command deletes a key.

If command line options are omitted, Fauna uses the default configuration file options.

Arguments

Argument Description

KEYNAME

Name of the key to delete.

Options

Option Description

--domain=<domain>

(Optional) Fauna server domain, which is the Fauna hostname.
Default = db.fauna.com

--endpoint=<name>

(Optional) Endpoint name to use for the command.

--port=<number>

(Optional) Connection port.
Default = 8443

--scheme=<scheme>

(Optional) Connection scheme. Must be one of:
       https (default)
       http

--secret=<secret>

(Optional) Secret to use to connect to a database.

--timeout=<integer>

(Optional) connection timeout, in milliseconds. When the interval elapses, fauna-shell times out and displays an error.
Default = 0, wait indefinitely until a response is received.

--version

(Optional) Fauna Query Language version
       v10 = (default) FQL v10
       v4 = FQL v4

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!