Connect to Storage
connect_storageGet an SSH command and one-time password to connect to a storage volume when the user asks; preview connection state first, then confirm after agreement.
Instructions
Get an SSH login to a storage volume's files, like the console's Connect, only when the user asks to connect: the command to run and a one-time password that expires in a few minutes (expires_at).
storage is the pv_name from the storages tool. Encrypted storage is unlocked and an access pod is started for it; it locks again by itself after auto_lock_minutes (remaining_seconds left). Other storage is reached through the access pod that already runs for it.
With confirm=false (default) it only returns the storage's connection state and changes nothing; call again with confirm=true after the user agreed. It needs a read & write key.
The confirmed call waits up to wait seconds (0-90, default 60) for the storage to be ready; if it isn't yet, the result has no password and says to call again.
Give the command and password to the user and nobody else: never run the command yourself or put the password in files, commits or other tools. Each confirmed call issues a new password, and it isn't kept as an operation record.
Every write requires operation_id. Reuse the ID returned by the preview, or generate a UUID before the first call. Keep it for confirmation and all retries; a new ID means a new operation. After a timeout, check operation_status and resource state before retrying.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | ||
| confirm | No | ||
| storage | Yes | ||
| workspace | No | ||
| operation_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||