Skip to content
Start here

Event Notifications

List Event Notification Rules
r2.buckets.event_notifications.list(strbucket_name, EventNotificationListParams**kwargs) -> EventNotificationListResponse
GET/accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration
Get Event Notification Rule
r2.buckets.event_notifications.get(strqueue_id, EventNotificationGetParams**kwargs) -> EventNotificationGetResponse
GET/accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration/queues/{queue_id}
Create Event Notification Rule
r2.buckets.event_notifications.update(strqueue_id, EventNotificationUpdateParams**kwargs) -> object
PUT/accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration/queues/{queue_id}
Delete Event Notification Rules
r2.buckets.event_notifications.delete(strqueue_id, EventNotificationDeleteParams**kwargs) -> object
DELETE/accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration/queues/{queue_id}
ModelsExpand Collapse
class EventNotificationListResponse:
bucket_name: Optional[str]

Name of the bucket.

queues: Optional[List[Queue]]

List of queues associated with the bucket.

queue_id: Optional[str]

Queue ID.

queue_name: Optional[str]

Name of the queue.

rules: Optional[List[QueueRule]]
actions: List[Literal["PutObject", "CopyObject", "DeleteObject", 2 more]]

Array of R2 object actions that will trigger notifications.

One of the following:
"PutObject"
"CopyObject"
"DeleteObject"
"CompleteMultipartUpload"
"LifecycleDeletion"
created_at: Optional[str]

Timestamp when the rule was created.

description: Optional[str]

A description that can be used to identify the event notification rule after creation.

prefix: Optional[str]

Notifications will be sent only for objects with this prefix.

rule_id: Optional[str]

Rule ID.

suffix: Optional[str]

Notifications will be sent only for objects with this suffix.

class EventNotificationGetResponse:
queue_id: Optional[str]

Queue ID.

queue_name: Optional[str]

Name of the queue.

rules: Optional[List[Rule]]
actions: List[Literal["PutObject", "CopyObject", "DeleteObject", 2 more]]

Array of R2 object actions that will trigger notifications.

One of the following:
"PutObject"
"CopyObject"
"DeleteObject"
"CompleteMultipartUpload"
"LifecycleDeletion"
created_at: Optional[str]

Timestamp when the rule was created.

description: Optional[str]

A description that can be used to identify the event notification rule after creation.

prefix: Optional[str]

Notifications will be sent only for objects with this prefix.

rule_id: Optional[str]

Rule ID.

suffix: Optional[str]

Notifications will be sent only for objects with this suffix.