Secrets
Manage tenant secrets and runtime secret-injection stubs.
SecretManager declaration
Section titled “SecretManager declaration”class SecretManagerSecretManager access
Section titled “SecretManager access”This type is created by the SDK; do not construct it directly.
const manager = client.secrets;SecretManager methods
Section titled “SecretManager methods”delete()
Section titled “delete()”Delete a tenant secret by UUID or display name.
SecretManager.delete(name: string): Promise<void>Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
name | string | Required | Resource display name. |
Returns
Section titled “Returns”Promise<void>
deleteDefaultSecretStub()
Section titled “deleteDefaultSecretStub()”Delete a tenant-default secret-injection stub by UUID.
SecretManager.deleteDefaultSecretStub(id: string): Promise<void>Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
id | string | Required | Resource UUID or display name. |
Returns
Section titled “Returns”Promise<void>
deleteSecretStub()
Section titled “deleteSecretStub()”Delete a secret-injection stub by UUID.
SecretManager.deleteSecretStub(id: string): Promise<void>Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
id | string | Required | Resource UUID or display name. |
Returns
Section titled “Returns”Promise<void>
Resolve a tenant secret by UUID or display name.
SecretManager.get(name: string): Promise<SecretInfo>Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
name | string | Required | Resource display name. |
Returns
Section titled “Returns”Promise<SecretInfo>
list()
Section titled “list()”List tenant secrets.
SecretManager.list(): Promise<SecretInfo[]>Returns
Section titled “Returns”Promise<SecretInfo[]>
listDefaultSecretStubs()
Section titled “listDefaultSecretStubs()”List tenant-default secret-injection stubs.
SecretManager.listDefaultSecretStubs(): Promise<DefaultSecretStubInfo[]>Returns
Section titled “Returns”Promise<DefaultSecretStubInfo[]>
listSecretStubs()
Section titled “listSecretStubs()”List secret-injection stubs across the tenant.
SecretManager.listSecretStubs(): Promise<SecretStubInfo[]>Returns
Section titled “Returns”Promise<SecretStubInfo[]>
Create or replace a tenant secret.
SecretManager.set( name: string, value: string, options: { cacheTtlSecs?: number } = {},): Promise<SecretInfo>Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
name | string | Required | Secret display name. |
value | string | Required | Secret value. |
options | { cacheTtlSecs?: number } | {} | Optional cache lifetime settings. |
Returns
Section titled “Returns”Promise<SecretInfo>— Metadata for the stored secret.
Examples
Section titled “Examples”const secret = await client.secrets.set("github-token", process.env.GITHUB_TOKEN!);setDefaultSecretStub()
Section titled “setDefaultSecretStub()”Create or replace a tenant-default secret-injection stub.
SecretManager.setDefaultSecretStub( url: string, pathOrOptions?: string | { config?: SecretStubConfig | Record<string, string> | null; path?: string | null } | null, configArg?: SecretStubConfig | Record<string, string> | null,): Promise<DefaultSecretStubInfo>Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
url | string | Required | URL whose credentials should be injected. |
pathOrOptions? | string | { config?: SecretStubConfig | Record<string, string> | null; path?: string | null } | null | Optional | Secret-stub path or structured options. |
configArg? | SecretStubConfig | Record<string, string> | null | Optional | Legacy secret-stub configuration argument. |
Returns
Section titled “Returns”Promise<DefaultSecretStubInfo>
RuntimeSecretManager
Section titled “RuntimeSecretManager”Configures and inspects secret-injection stubs for one runtime.
RuntimeSecretManager declaration
Section titled “RuntimeSecretManager declaration”class RuntimeSecretManagerRuntimeSecretManager access
Section titled “RuntimeSecretManager access”This type is created by the SDK; do not construct it directly.
const manager = runtime.secrets;RuntimeSecretManager methods
Section titled “RuntimeSecretManager methods”deleteSecretStub()
Section titled “deleteSecretStub()”Delete a runtime secret-injection stub by UUID.
RuntimeSecretManager.deleteSecretStub(id: string): Promise<void>Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
id | string | Required | Resource UUID or display name. |
Returns
Section titled “Returns”Promise<void>
getSecretStub()
Section titled “getSecretStub()”Resolve a runtime secret-injection stub by UUID.
RuntimeSecretManager.getSecretStub(id: string): Promise<SecretStubInfo>Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
id | string | Required | Resource UUID or display name. |
Returns
Section titled “Returns”Promise<SecretStubInfo>
listSecretStubs()
Section titled “listSecretStubs()”List secret-injection stubs for this runtime.
RuntimeSecretManager.listSecretStubs(): Promise<SecretStubInfo[]>Returns
Section titled “Returns”Promise<SecretStubInfo[]>
setSecretStub()
Section titled “setSecretStub()”Create or replace a secret-injection stub for this runtime.
RuntimeSecretManager.setSecretStub( url: string, pathOrOptions?: string | { config?: SecretStubConfig | Record<string, string> | null; path?: string | null } | null, configArg?: SecretStubConfig | Record<string, string> | null,): Promise<SecretStubInfo>Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
url | string | Required | URL whose credentials should be injected. |
pathOrOptions? | string | { config?: SecretStubConfig | Record<string, string> | null; path?: string | null } | null | Optional | Secret-stub path or structured options. |
configArg? | SecretStubConfig | Record<string, string> | null | Optional | Legacy secret-stub configuration argument. |
Returns
Section titled “Returns”Promise<SecretStubInfo>