Skip to main content

Delete

Delete a key from a vault.

Delete a key from its vault. A request that uses its reference after that fails.

osapi client secret delete [flags]

Examples​

osapi client secret delete --vault default --key registry-token

Result​

The command prints:

$ osapi client secret delete --vault default --key registry-token
✓ registry-token deleted

  trace 26e448c9dbe1c4a8d216a98c675079c9

With --json, the command prints:

{ "key": "registry-token", "result": "deleted" }

Permission​

It needs the secret:write permission. osapi controller role get --name <role> shows what a role grants.

Flags​

FlagDescriptionDefault
--keyThe name of the key, such as registry-token (required)
--vaultThe name of the vault, such as default (required)

Global flags​

FlagDescriptionDefault
-d, --debugEnable or disable debug mode
-j, --jsonEnable JSON output
-f, --osapi-filePath to config file; without one at the default path, osapi runs on the defaults/etc/osapi/osapi.yaml
--urlBase URL the CLI client connects to (controller.client.url)https://localhost:8080

Output tells how the result is printed, and what --json gives.