R2
Event Notifications
Event Notifications endpoint reference.
List
Read the event notification configuration for a bucket, listing rules for all configured queues.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account Identifier. | |
bucketName | string | Yes | Bucket Name. | |
jurisdiction | string|null | No | Jurisdiction where objects in this bucket are guaranteed to be stored. |
php
$response = $client->r2()->eventNotifications()->list('ACCOUNT_ID', 'BUCKET_NAME', 'JURISDICTION');
Get
Get the event notification configuration for a bucket and a specific queue.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account Identifier. | |
bucketName | string | Yes | Bucket Name. | |
queueId | string | Yes | Queue Identifier. | |
jurisdiction | string|null | No | Jurisdiction where objects in this bucket are guaranteed to be stored. |
php
$response = $client->r2()->eventNotifications()->get('ACCOUNT_ID', 'BUCKET_NAME', 'QUEUE_ID', 'JURISDICTION');
Update
Create or update the event notification configuration for a bucket and a specific queue.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account Identifier. | |
bucketName | string | Yes | Bucket Name. | |
queueId | string | Yes | Queue Identifier. | |
values | array | Yes | Values to set, e.g. `rules`. | |
jurisdiction | string|null | No | Jurisdiction where objects in this bucket are guaranteed to be stored. |
php
$response = $client->r2()->eventNotifications()->update('ACCOUNT_ID', 'BUCKET_NAME', 'QUEUE_ID', [], 'JURISDICTION');
Delete
Delete the event notification configuration for a bucket and a specific queue.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account Identifier. | |
bucketName | string | Yes | Bucket Name. | |
queueId | string | Yes | Queue Identifier. | |
jurisdiction | string|null | No | Jurisdiction where objects in this bucket are guaranteed to be stored. |
php
$response = $client->r2()->eventNotifications()->delete('ACCOUNT_ID', 'BUCKET_NAME', 'QUEUE_ID', 'JURISDICTION');

