Skip to content
Proud to collaborate with Microsoft for Startups

spad.cloudflare.compensate_delete_r2 ​

Compensate R2 bucket creation (best-effort delete)

Rollback step: try to delete the R2 bucket created by spad.cloudflare.create_r2_bucket.

Overview ​

PropertyValue
Workflow typeLinear
LibraryApp-spad
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
cloud_connection_uuidstringYes—Cloudflare CloudConnection.id
r2_bucket_namestringNo—R2 bucket name to delete; no-op when absent
workflow_run_idstringNo—Parent workflow run ID stamped by the DAG engine
workflow_run_uuidstringNo—Parent workflow run ID stamped by the DAG engine (legacy alias)

Output Schema ​

FieldTypeRequiredDefaultDescription
r2_deletedbooleanYes—True when the R2 bucket was deleted or treated as not-found
completed_atstringNo—ISO8601 timestamp when compensation finished
failed_atstringNo—ISO8601 timestamp when compensation failed
cloud_connection_uuidstringNo—Cloudflare CloudConnection.id
r2_bucket_namestringNo—R2 bucket name to delete; no-op when absent
workflow_run_idstringNo—Parent workflow run ID stamped by the DAG engine
workflow_run_uuidstringNo—Parent workflow run ID stamped by the DAG engine (legacy alias)
errorstringNo—Engine-stamped failure metadata
error_typestringNo—Engine-stamped failure metadata
failed_at_statejsonNo—Engine-stamped failure metadata
failed_layerjsonNo—Engine-stamped failure metadata
failed_stepjsonNo—Engine-stamped failure metadata
failure_reasonstringNo—Engine-stamped failure metadata

States ​

StateInitialTerminalSuccessAuto-advanceDescription
initiatedYesNo—runCompensation accepted
runNoNo—completeDeleting R2 bucket (rollback)
completedNoYesYes—Compensation completed
failedNoYesNo—Compensation failed

State Diagram ​

Transitions ​

FromActionToDescription
initiatedrunrunStart compensation
runcompletecompletedMark compensation completed
* (any state)failfailedMark compensation failed

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "spad.cloudflare.compensate_delete_r2",
  "initial_data": {
    "cloud_connection_uuid": "value"
  }
}