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?;| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The 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-serializedvault.set_secret(name, "sk_live_abc123").await?;| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The secret name. |
value | string | object | Yes | Max 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.