gcp.sql.backup.create ​
Trigger an on-demand Cloud SQL backup run and return its operation and backup run id.
Trigger an on-demand backup run for a Cloud SQL instance.
Deliberately has NO wait_for_completion flag, unlike the sibling gcp.sql.backup.restore. Taking a backup runs as an ordinary FORWARD DAG layer, and forward layers with a data dependency execute sequentially, so a caller chains gcp.sql.operation.wait on operation_name normally. Only saga COMPENSATION blocks — which the engine starts in parallel against a single pre-run snapshot — cannot chain a waiter, and taking a backup is not a compensating action. Add the flag here only if a real caller needs to create a backup from inside a compensation block.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | Base-gcp |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | Yes | — | GCP CloudConnection UUID. |
project_id | string | No | — | GCP project override. |
region | string | No | — | Cloud SQL region used for credential scoping. |
instance_id | string | Yes | — | Cloud SQL instance id to back up. |
description | string | No | — | Free-text description stored on the backup run. |
location | string | No | — | Backup storage location override (defaults to the instance policy). |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | No | — | Echoed connection UUID. |
project_id | string | No | — | Effective project. |
region | string | No | — | Cloud SQL region used for credential scoping. |
instance_id | string | No | — | Cloud SQL instance id. |
description | string | No | — | Free-text description stored on the backup run. |
location | string | No | — | Backup storage location override. |
operation_name | string | No | — | Cloud SQL backup operation id; feed to gcp.sql.operation.wait. |
backup_run_id | string | No | — | Backup run id; feed to gcp.sql.backup.restore. |
status | string | No | — | Operation status at submit time. |
operation_type | string | No | — | Operation type (BACKUP_VOLUME). |
operation | json | No | — | Sanitized operation response. |
failure_reason | string | No | — | Human-readable failure reason. |
failed_step | string | No | — | Failed logical step. |
failed_layer | json | No | — | Engine failed layer. |
failed_at_state | string | No | — | State where failure occurred. |
error | string | No | — | Error message. |
error_type | string | No | — | Error class. |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
backing_up | No | No | — | complete | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | backing_up | — |
backing_up | complete | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "gcp.sql.backup.create",
"initial_data": {
"connection_uuid": "value",
"instance_id": "value"
}
}