MoveProject
Moves a project to another workspace of the same person, as one operation (OperationKind MOVE): it is stopped here, backed up into the destination's backups, restored and started there under the same project_id, then deleted here. Each database it is linked to (Project.dependencies) stays here, with its other apps, if any, running on: there the project uses one of the same engine instead, one the destination has or a new one, with the data of the database it signs in to copied, or none (DatabaseSwitch). A database project moves only when no app is linked to it. workspace is the source. Waits as DeployProject does (wait_seconds), then GetOperation, in either workspace, which once it ended answers the same move_message and the project. Answers, once it ended, with the project as it is in the destination, and move_message: what changed (hosts move to the destination's apps_domain, a domain of the person's own must point at its hostname, a new SSH command, which database it uses there instead of each, and with what data) and what stayed behind (operation history, logs, incidents, uptime, earlier snapshots, and what each database it left still holds). Until the restore succeeded, a failure undoes it: the source's services run again as they did, unless its failure says they did not start again; the move's snapshot stays in the destination's backups, as a deleted project's. After that it only goes forward: one that FAILED then moved the project, and its failure names what the source still holds. While it runs, a change to the project is UNAVAILABLE + ProjectBusy (kind MOVE) in either workspace, and so is a read where it is not then (before its restore, after its deletion from the source); afterwards, a call for it to the source is FAILED_PRECONDITION + ProjectMoved, until the source has a project of that id again. While it runs, a change to a database it leaves here, or to the one it uses instead there, is ProjectBusy too, as is a read of a new one before the move made it; GetOperation answers the move with any of their project_ids. INVALID_ARGUMENT = switch_databases names a database the project is not linked to, or twice, an env_prefix where the machine wrote the lines, none where it did not, one of no form a link takes or one two switches share, or an into the destination lacks or of another engine, or one two switches share, copies of more than 32 databases, or to_workspace is the source or none of the caller's; PERMISSION_DENIED + WorkspaceNotGranted = one this token may not reach. ALREADY_EXISTS = the destination has a project of the project's id, or of the id a new database takes, or operation_id is an operation of the project's or another move's already. FAILED_PRECONDITION = a database project with apps linked to it (the message names them: move each, or unlink it), a machine needs an update first (the message names it), the project has no deploy yet, or the destination's backups are off (its Machine.backups_enabled), which a move goes through.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "MoveProject"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | No | The workspace: its id or name (ListWorkspaces). Omit when the account has one. | |
| project_id | No | ||
| operation_id | No | As DeployProject's operation_id: the move's. | |
| to_workspace | No | The destination, as `workspace` takes one: its id or name. | |
| wait_seconds | No | As DeployProject's wait_seconds. | |
| switch_databases | No | What it uses in to_workspace instead of each database it is linked to (Project.dependencies), which stays here. One left out: the destination's database of its id and engine, if it has one, else a new one, with the data of its copy_database. |