vhsm kv

Learn to use kv command for interacting with vHSM's key/value secrets engine.

The kv command groups subcommands for interacting with vHSM's key/value (K/V) secrets engine, supporting both K/V Version 1 and K/V Version 2.

Syntax

  • Option flags for a given subcommand are provided after the subcommand but before the arguments.

  • The path where the secrets engine is mounted can be specified using the -mount flag. For example, vhsm kv get -mount=secret creds.

Subcommands

Command
Description

Marks versions as deleted in K/V v2.

Permanently removes one or more versions in K/V v2.

Enables versioning for K/V v1.

Retrieves data from the K/V store.

Lists stored data or secrets.

Interacts with K/V metadata.

Updates data without overwriting existing data.

Creates or updates data in the K/V store.

Rolls back to a previous version.

Restores deleted versions.

Command Details

kv put

Stores or updates a key-value pair in K/V v2.

Example

Output

kv get

Retrieves data from the K/V secrets engine.

Example

Option
Description

-mount

Specifies the path where K/V is mounted.

-version

Specifies the version to retrieve (default: latest).

-field

Returns only the specified field's value.

Output

kv delete

Marks data as deleted (K/V v2 only).

Example

Option
Description

-mount

Specifies the mount path.

-versions

Specifies versions to delete (K/V v2 only).

Output

kv destroy

Permanently removes specified versions (K/V v2 only).

Example

Option
Description

-mount

Specifies the mount path.

-versions

Specifies versions to permanently delete.

Output

kv enable-versioning

Enables versioning for a non-versioned K/V secrets engine (K/V v1).

Example

Output

kv list

Lists key names at the specified path.

Example

Output

kv metadata

Interacts with metadata for versioned secrets.

kv metadata get

Retrieves metadata of a key.

Example

Option
Description

-mount

Specifies the mount path.

Output

kv metadata delete

Deletes all versions and metadata for a key.

Example

kv metadata put

Creates or updates key settings in K/V v2.

Example

Option
Description

-cas-required

Requires check-and-set for updates.

-max-versions

Limits the number of versions to retain.

-delete-version-after

Sets expiration time for key versions.

Output

kv patch

Updates data without overwriting existing values (K/V v2 only).

Example

Output

kv rollback

Restores a previous version of a key (K/V v2 only).

Example

Output

kv undelete

Restores deleted versions of a key (K/V v2 only).

Example

Output

Last updated

Was this helpful?