Skip to content
Proud to collaborate with Microsoft for Startups

cloudflare.r2.delete ​

Delete a Cloudflare R2 bucket (with optional drain)

Overview ​

PropertyValue
Workflow typeLinear
LibraryApp-cloudflare
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
cloudflare_r2_bucket_uuiduuidYes——
drain_objectsbooleanNo—If True, list and delete all objects before bucket delete
actorstringNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
cloudflare_r2_bucket_uuiduuidYes——
drain_objectsbooleanNo—If True, list and delete all objects before bucket delete
actorstringNo——
bucket_namestringNo——
verified_atstringNo——
deleted_atstringNo——
persisted_atstringNo——
completed_atstringNo——
failed_atstringNo——
failure_reasonstringNo—Engine-stamped human-readable failure reason
failed_at_statestringNo—Engine-stamped state when the workflow failed
failed_stepstringNo—Engine-stamped step name (DAG path)
failed_layerintegerNo—Engine-stamped layer index (DAG path)
errorstringNo—Engine-stamped exception message
error_typestringNo—Engine-stamped exception class name
failure_typestringNo—Engine-stamped failure category (atomic path)
failed_actionstringNo—Engine-stamped action method that raised (atomic path)

States ​

StateInitialTerminalSuccessAuto-advanceDescription
initiatedYesNo—verifyInputs accepted
deletingNoNo—persistDeleting bucket on Cloudflare
persistingNoNo—completeSoft-deleting CloudflareR2Bucket row
verifyingNoNo—deleteVerifying bucket emptiness / draining if requested
completedNoYesYes—Deleted
failedNoYesNo—Delete failed

State Diagram ​

Transitions ​

FromActionToDescription
initiatedverifyverifying—
verifyingdeletedeleting—
deletingpersistpersisting—
persistingcompletecompleted—
* (any state)failfailed—

Business Errors ​

CodeMessage Template
R2_BUCKET_NOT_EMPTYBucket is not empty and drain_objects=False

API Usage ​

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

{
  "workflow_type": "cloudflare.r2.delete",
  "initial_data": {
    "organization_uuid": "value",
    "cloudflare_r2_bucket_uuid": "value"
  }
}