RunProjectAction
One project action: start, stop or restart services, recreate one, back up, restore, cancel an operation, change the source, delete an undeclared volume or the project. Recreate, back up, restore, delete and set_source's deploy run as operations, waited for (wait_seconds), as is the end of a cancelled one; the others are done on return. Answers with the project as it then is. restore_snapshot takes the project's own snapshots only. A database's snapshot as a new database is the person's to make, in the panel (the database's Backups tab, Restore as a new database): no tool makes one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| back_up | No | Backs up the directory and volumes now, live. An operation. FAILED_PRECONDITION = backups off (Machine.backups_enabled). | |
| project_id | No | ||
| set_source | No | Changes the source. To files: keeps the current files. To github: only the fields set change, e.g. {github: {auto_deploy: true}} follows pushes again; from files, repository is required. Deploys the newest commit if auto_deploy is on and the files are not at it. FAILED_PRECONDITION = as CreateProject. Where the files come from (THE PROJECT IS ITS DIRECTORY). At most one of files, github. | |
| operation_id | No | As DeployProject's, for the actions that run as operations. | |
| wait_seconds | No | As DeployProject's, for the actions that run as operations. | |
| delete_volume | No | A volume compose.yaml no longer declares (Volume.declared false). Its data then lives only in snapshots. FAILED_PRECONDITION = declared or in use. | |
| stop_services | No | Stops services, each with its grace period. A machine restart may start them, per restart policy. | |
| delete_project | No | An operation: a final backup while backups are on, then containers, volumes, files, hosts, logs. Snapshots stay (GetMachine.deleted_projects), and restoring one brings the project back, source included; with backups off there is none, and it is gone for good. | |
| start_services | No | Starts stopped services and reruns jobs, not their dependencies. FAILED_PRECONDITION = no container yet (deploy or recreate_service), or a published machine port is taken. | |
| cancel_operation | No | Stops a running or starting operation: it ends CANCELLED, leaving what a failure would; one only starting answers CANCELLED from its own call. FAILED_PRECONDITION = a delete past its final backup. | |
| recreate_service | No | A new container: a fresh filesystem outside volumes. An operation. | |
| restart_services | No | Restarts processes in the same containers. Codes as start_services. | |
| restore_snapshot | No | From a snapshot of this project. An operation. |