Bind a secret to a scope
attach_secretBind a secret to a scope so runs there see it as an env var. Server-wide when only server_id is given; project-scoped when project_id is also given. Pass value to set-and-bind in one call; omit it to bind an existing secret by key. A key has one value on the account, shared everywhere it is bound: passing value here changes it for every server and project that key is bound to. Give a project that needs its own value a key of its own.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Env var name of the secret to bind. With value, the secret is created or changed in the same call. | |
| value | No | Optional: set the value while binding. Write-only. | |
| server_id | Yes | The server's id, as returned by create_server or list_servers. | |
| project_id | No | Optional. Bind to just this project instead of server-wide. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Secret id. Pass it to delete_secret. | |
| key | Yes | Env var name. | |
| masked | No | A masked hint of the value. The value itself is never returned. | |
| created_at | No | ISO 8601 timestamp. | |
| server_ids | No | Servers it is bound to. | |
| updated_at | No | ISO 8601 timestamp. | |
| description | No | Note about what it is for. | |
| project_ids | No | Projects it is bound to. |