Get the secret ID.
The ID captured when this wrapper was constructed, or undefined. Fetching does not refresh it.
Get the secret name.
The literal account-scoped secret name
Get the complete secret data from the API. This retrieves the full SecretView including id, name, create_time_ms, and update_time_ms.
Note: The secret value is never returned for security reasons.
Optionaloptions: RequestOptions<unknown>Request options
The secret data (value is not included)
Update the value of the greatest-ID row matching this name at lookup. This wrapper remains name-bound and its captured ID is unchanged.
Parameters for updating the secret
Optionaloptions: RequestOptions<unknown>Request options
The updated Secret instance
Object-oriented interface for working with Secrets.
Remarks
Overview
The
Secretclass provides a high-level, object-oriented API for managing secrets. Secrets are encrypted key-value pairs that can be securely stored and used in Devboxes as environment variables. This wrapper always operates by its account-scoped name, even when it contains an ID from an earlier response. Reads and updates select the greatest ID at lookup; deletion removes every selected match nonatomically. Usesdk.secret.fromId(id)for exact row operations.Quickstart