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 ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-spad |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
cloud_connection_uuid | string | Yes | — | Cloudflare CloudConnection.id |
r2_bucket_name | string | No | — | R2 bucket name to delete; no-op when absent |
workflow_run_id | string | No | — | Parent workflow run ID stamped by the DAG engine |
workflow_run_uuid | string | No | — | Parent workflow run ID stamped by the DAG engine (legacy alias) |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
r2_deleted | boolean | Yes | — | True when the R2 bucket was deleted or treated as not-found |
completed_at | string | No | — | ISO8601 timestamp when compensation finished |
failed_at | string | No | — | ISO8601 timestamp when compensation failed |
cloud_connection_uuid | string | No | — | Cloudflare CloudConnection.id |
r2_bucket_name | string | No | — | R2 bucket name to delete; no-op when absent |
workflow_run_id | string | No | — | Parent workflow run ID stamped by the DAG engine |
workflow_run_uuid | string | No | — | Parent workflow run ID stamped by the DAG engine (legacy alias) |
error | string | No | — | Engine-stamped failure metadata |
error_type | string | No | — | Engine-stamped failure metadata |
failed_at_state | json | No | — | Engine-stamped failure metadata |
failed_layer | json | No | — | Engine-stamped failure metadata |
failed_step | json | No | — | Engine-stamped failure metadata |
failure_reason | string | No | — | Engine-stamped failure metadata |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | run | Compensation accepted |
run | No | No | — | complete | Deleting R2 bucket (rollback) |
completed | No | Yes | Yes | — | Compensation completed |
failed | No | Yes | No | — | Compensation failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | run | run | Start compensation |
run | complete | completed | Mark compensation completed |
* (any state) | fail | failed | Mark 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"
}
}