huaweicloud_sandbox_exec_one_shot
Execute a command on a workspace terminal with a fresh connection per call (no session state carries over). Each invocation opens a new WebSocket connection, executes one command, then disconnects. Use for long-running build/deploy/install commands (>30s) that do not need shell state persistence between calls. More stable than session-based execution for heavy workloads.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | The shell command to execute on the remote workspace | |
| username | No | Login username for the remote terminal (default: root) | |
| timeout_ms | No | Execution timeout in milliseconds (default: 120000) | |
| workspace_id | No | Workspace ID from huaweicloud_sandbox_connect return value. Required - must be passed explicitly when HW_WORKSPACE_ID is not set. |