spad.cloudflare.site-deletion-delete-r2 ​
Delete Cloudflare R2 bucket for a SPAD site (DAG step)
Delete the R2 bucket and clear R2 fields on the site.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-spad |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | string | Yes | — | ID of the SPAD site |
organization_uuid | string | No | — | Organization ID |
cloud_connection_uuid | string | Yes | — | Cloudflare CloudConnection.id |
r2_bucket_name | string | No | — | R2 bucket name; no-op when absent |
workflow_run_id | string | No | — | Injected by the parent DAG; propagated through state_data |
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 | No | — | True when the R2 bucket was deleted or treated as not-found |
failure_reason | string | No | — | Reason recorded on the failure path |
workflow_run_id | string | No | — | Injected by the parent DAG; propagated through state_data |
site_uuid | string | No | — | ID of the SPAD site |
organization_uuid | string | No | — | Organization ID |
cloud_connection_uuid | string | No | — | Cloudflare CloudConnection.id |
r2_bucket_name | string | No | — | R2 bucket name; no-op when absent |
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 |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | run | R2 deletion accepted |
run | No | No | — | complete | Deleting R2 bucket |
completed | No | Yes | Yes | — | R2 deletion completed |
failed | No | Yes | No | — | R2 deletion failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | run | run | Start R2 deletion |
run | complete | completed | Mark R2 deletion completed |
* (any state) | fail | failed | Mark R2 deletion failed |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "spad.cloudflare.site-deletion-delete-r2",
"initial_data": {
"site_uuid": "value",
"cloud_connection_uuid": "value"
}
}