Create a new secret.
Parameters for creating the secret.
Optionaloptions: RequestOptions<unknown>Request options.
The created Secret instance.
Get a Secret instance by name without making an API call. Use getInfo() on the returned Secret to fetch the actual data.
The globally unique name of the secret.
A Secret instance.
Update an existing secret's value.
The secret to update (Secret object or name string).
Parameters for updating the secret.
Optionaloptions: RequestOptions<unknown>Request options.
The updated Secret instance.
const runloop = new RunloopSDK();
// Using a secret name string
const updated = await runloop.secret.update('DATABASE_PASSWORD', {
value: 'my-new-password',
});
// Or using a Secret object
const secret = runloop.secret.fromName('DATABASE_PASSWORD');
const updated2 = await runloop.secret.update(secret, {
value: 'another-new-password',
});
List all secrets.
Optionalparams: SecretListParamsOptional filter parameters.
Optionaloptions: RequestOptions<unknown>Request options.
An array of Secret instances.
Delete a secret.
The secret to delete (Secret object or name string).
Optionaloptions: RequestOptions<unknown>Request options.
The deleted secret metadata.
Secret SDK interface for managing secrets.
Remarks
Overview
The
SecretOpsclass provides methods for managing secrets, which are encrypted key-value pairs that can be injected into devboxes as environment variables. Secrets are identified by their globally unique name.Usage
This interface is accessed via RunloopSDK.secret. You should construct a RunloopSDK instance and use it from there:
Example