get

Usage

vars [global options] get [options] <KEY>

Arguments

<KEY>
The Vars key name to fetch.

Options

Global options are detailed here.

Note: The following are all optional arguments/flags.

-c | --consistent
Do a consistent read of the value.
--output
Output encoding. Available encodings are json, xml, and plain (plain).
-r | --refresh
Refresh the value from the Conductor.
--version
Displays an old version; this does not cache the result.
-h | --help
Show help message.
--decrypt
Decrypt the value if encrypted (default: true).

Definition

The get command retrieves the value of a key from the local Vars cache. If the specified value is not found locally, Vars requests the value from the Fugue Conductor.

Examples

Retrieving a value from Vars

To retrieve the value of a key from Vars, use vars get <KEY>:

vars get mykey

You’ll see the value echoed to the screen when the operation is complete:

myvalue

Retrieving a value from Vars without decrypting it

When a key’s value is encrypted, vars get returns the decrypted value by default. To retrieve the value in its encrypted state, use the --decrypt=false option:

vars get mykey --decrypt=false

You’ll see the encrypted value echoed to the screen:

8VDNkRgItu9bACuW5hdPiyGYIl5L2I4=