Skip to content
Proud to collaborate with Microsoft for Startups

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 ​

PropertyValue
Workflow typeLinear
LibraryBase-gcp
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidYes—GCP CloudConnection UUID.
project_idstringNo—GCP project override.
regionstringNo—Cloud SQL region used for credential scoping.
instance_idstringYes—Cloud SQL instance id to back up.
descriptionstringNo—Free-text description stored on the backup run.
locationstringNo—Backup storage location override (defaults to the instance policy).

Output Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidNo—Echoed connection UUID.
project_idstringNo—Effective project.
regionstringNo—Cloud SQL region used for credential scoping.
instance_idstringNo—Cloud SQL instance id.
descriptionstringNo—Free-text description stored on the backup run.
locationstringNo—Backup storage location override.
operation_namestringNo—Cloud SQL backup operation id; feed to gcp.sql.operation.wait.
backup_run_idstringNo—Backup run id; feed to gcp.sql.backup.restore.
statusstringNo—Operation status at submit time.
operation_typestringNo—Operation type (BACKUP_VOLUME).
operationjsonNo—Sanitized operation response.
failure_reasonstringNo—Human-readable failure reason.
failed_stepstringNo—Failed logical step.
failed_layerjsonNo—Engine failed layer.
failed_at_statestringNo—State where failure occurred.
errorstringNo—Error message.
error_typestringNo—Error class.

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
backing_upNoNo—complete—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutebacking_up—
backing_upcompletecompleted—
* (any state)failfailed—

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"
  }
}