Skip to main content

event_notifications

Creates, updates, deletes, gets or lists an event_notifications resource.

Overview

Nameevent_notifications
TypeResource
Idcloudflare.r2.event_notifications

Fields

The following fields are returned by SELECT queries:

Read Configuration response.

NameDatatypeDescription
queueIdstringQueue ID. (example: 11111aa1-11aa-111a-a1a1-a1a111a11a11)
queueNamestringName of the queue. (example: first-queue)
rulesarray

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectqueue_id, bucket_name, account_idcf-r2-jurisdictionGet a single event notification rule.
listselectbucket_name, account_idcf-r2-jurisdictionList all event notification rules for a bucket.
updatereplacequeue_id, bucket_name, account_id, rulescf-r2-jurisdictionCreate event notification rule.
deletedeletequeue_id, bucket_name, account_idcf-r2-jurisdictionDelete an event notification rule. If no body is provided, all rules for specified queue will be deleted.

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.
bucket_namestringThe R2 bucket name.
queue_idstringThe Cloudflare Queue ID.
cf-r2-jurisdictionstring

SELECT examples

Get a single event notification rule.

SELECT
queueId,
queueName,
rules
FROM cloudflare.r2.event_notifications
WHERE queue_id = '{{ queue_id }}' -- required
AND bucket_name = '{{ bucket_name }}' -- required
AND account_id = '{{ account_id }}' -- required
AND cf-r2-jurisdiction = '{{ cf-r2-jurisdiction }}'
;

REPLACE examples

Create event notification rule.

REPLACE cloudflare.r2.event_notifications
SET
rules = '{{ rules }}'
WHERE
queue_id = '{{ queue_id }}' --required
AND bucket_name = '{{ bucket_name }}' --required
AND account_id = '{{ account_id }}' --required
AND rules = '{{ rules }}' --required
AND cf-r2-jurisdiction = '{{ cf-r2-jurisdiction}}'
RETURNING
errors,
messages,
result,
success;

DELETE examples

Delete an event notification rule. If no body is provided, all rules for specified queue will be deleted.

DELETE FROM cloudflare.r2.event_notifications
WHERE queue_id = '{{ queue_id }}' --required
AND bucket_name = '{{ bucket_name }}' --required
AND account_id = '{{ account_id }}' --required
AND cf-r2-jurisdiction = '{{ cf-r2-jurisdiction }}'
;