bm event add
Syntax
The bm event add command adds event notification triggers to a bucket.
Buckit automatically sends triggered events to the configured notification target.
The following command creates a new event notification trigger for
all PUT and DELETE operations for the mydata bucket on the
mybuckit Buckit deployment:
bm event add --event "put,delete" mybuckit/mydata arn:aws:sqs::primary:target
The specified ARN corresponds to a configured
bucket notification target on the
mybuckit deployment.
The command has the following syntax:
bm [GLOBALFLAGS] event add \
[--event "string"] \
[--ignore-existing] \
[--prefix "string"] \
[--suffix "string"] \
ALIAS \
ARN
Brackets
[]indicate optional parameters.Parameters sharing a line are mutually dependent.
Parameters separated using the pipe
|operator are mutually exclusive.
Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.
Parameters
- ALIAS
- Required
The Buckit alias and bucket to which the command adds the new event notification. For example:
bm event add play/mybucket
- ARN
- Required
The Amazon Resource Name (ARN) of the notification target.
The Buckit server outputs an ARN for each configured notification target at server startup. See Bucket Notifications for more information.
- --event
- Optional
The event(s) for which Buckit generates bucket notifications.
Supports the following values:
putgetdelete
Specify multiple value using a comma
,delimiter. Do not add any whitespace between values.If not specified, defaults to
put,delete,get.See Supported Bucket Events for a detailed list of S3 events associated to each of the supported values.
- ignore-existing, p
- Optional
Directs Buckit to ignore the specified event triggers if a matching trigger already exists.
- --prefix
- Optional
The bucket prefix in which the specified
--eventcan trigger a bucket notification.For example, given a
ALIASofplay/mybucketand a--prefixofphotos, only events inplay/mybucket/photostrigger bucket notifications.Omit to trigger the event for all prefixes and objects in the bucket.
Global Flags
This command supports any of the global flags.
Examples
Add an Event Notification to a Bucket
The following command adds a new event notification trigger for all
S3 PUT, GET, and DELETE operations on a bucket. The command
assumes the Buckit deployment has at least one configured
bucket notification target:
bm event add mybuckit/mydata arn:minio:sqs::primary:webhook
Behavior
Supported Bucket Events
The following table lists the supported bm event add values and their
corresponding S3 events:
Supported Value |
Corresponding S3 Events |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
For more complete documentation on the listed S3 events, see S3 Supported Event Types.
S3 Compatibility
The bm commandline tool is built for compatibility with the AWS S3 API and is tested with Buckit and AWS S3 for expected functionality and behavior.
Buckit provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While bm commands may work as documented, any such usage is at your own risk.