Docs

API Reference

Complete API reference for Alien Vault bindings.

get

Retrieves a secret by name. Throws if the secret does not exist.

const value: string = await vault.get(name)
const config: T = await vault.getJson<T>(name)
let value: String = vault.get_secret(name).await?;
ParameterTypeRequiredDescription
namestringYesThe secret name.

set

Creates or updates a secret (upsert).

await vault.set(name, "sk_live_abc123")
await vault.set(name, { retryCount: 3 })  // objects are JSON-serialized
vault.set_secret(name, "sk_live_abc123").await?;
ParameterTypeRequiredDescription
namestringYesThe secret name.
valuestring | objectYesMax 25 KB.

delete

Deletes a secret.

await vault.delete(name)
vault.delete_secret(name).await?;

exists (TypeScript only)

const found: boolean = await vault.exists(name)

Not available in the Rust trait — call get_secret and handle the error.

On this page