Skip to main content

jobs

Creates, updates, deletes, gets or lists a jobs resource.

Overview

Namejobs
TypeResource
Idcloudflare.r2.jobs

Fields

The following fields are returned by SELECT queries:

Job details

NameDatatypeDescription
idstring
createdAtstring
finishedAtstring
overwriteboolean
sourceobject (title: S3SourceResponseSchema)
statusstring (running, paused, aborted, completed)
targetobject (title: R2TargetResponseSchema)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_id, job_idRetrieves detailed status and configuration for a specific R2 Super Slurper migration job.
createinsertaccount_idCreates a new R2 Super Slurper migration job to transfer objects from a source bucket (e.g. S3, GCS, R2) to R2.
abort_allreplaceaccount_idCancels all running R2 Super Slurper migration jobs for the account. Any objects in the middle of a transfer will finish, but no new objects will start transferring.
slurper_delete_jobdeleteaccount_id, job_idDeletes a completed, aborted, or errored R2 Super Slurper migration job. Active jobs cannot be deleted.
abortexecaccount_id, job_idCancels a specific R2 Super Slurper migration job. Any objects in the middle of a transfer will finish, but no new objects will start transferring.
pauseexecaccount_id, job_idPauses a running R2 Super Slurper migration job. The job can be resumed later to continue transferring.
resumeexecaccount_id, job_idResumes a paused R2 Super Slurper migration job, continuing the transfer from where it stopped.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
job_idstringThe job ID.

SELECT examples

Retrieves detailed status and configuration for a specific R2 Super Slurper migration job.

SELECT
id,
createdAt,
finishedAt,
overwrite,
source,
status,
target
FROM cloudflare.r2.jobs
WHERE account_id = '{{ account_id }}' -- required
AND job_id = '{{ job_id }}' -- required
;

INSERT examples

Creates a new R2 Super Slurper migration job to transfer objects from a source bucket (e.g. S3, GCS, R2) to R2.

INSERT INTO cloudflare.r2.jobs (
overwrite,
source,
target,
account_id
)
SELECT
{{ overwrite }},
'{{ source }}',
'{{ target }}',
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;

REPLACE examples

Cancels all running R2 Super Slurper migration jobs for the account. Any objects in the middle of a transfer will finish, but no new objects will start transferring.

REPLACE cloudflare.r2.jobs
SET
-- No updatable properties
WHERE
account_id = '{{ account_id }}' --required
RETURNING
errors,
messages,
result,
success;

DELETE examples

Deletes a completed, aborted, or errored R2 Super Slurper migration job. Active jobs cannot be deleted.

DELETE FROM cloudflare.r2.jobs
WHERE account_id = '{{ account_id }}' --required
AND job_id = '{{ job_id }}' --required
;

Lifecycle Methods

Cancels a specific R2 Super Slurper migration job. Any objects in the middle of a transfer will finish, but no new objects will start transferring.

EXEC cloudflare.r2.jobs.abort
@account_id='{{ account_id }}' --required,
@job_id='{{ job_id }}' --required
;