Welcome to the upcoming version of the MinIO Documentation! The content on this page is under active development and may change at any time. If you can't find what you're looking for, check our legacy documentation. Thank you for your patience.

mc event

Examples

Add New Event Notification to a Bucket

Use mc event add to add a notification event to a bucket:

mc event add ALIAS/PATH ARN --event EVENTS

Remove an Event Notification from a Bucket

Use mc event remove to remove a notification event from a bucket:

mc event remove ALIAS/PATH ARN --event EVENTS

List Bucket Notification Events

Use mc event list to list all configured notification events on a bucket:

mc event list ALIAS/PATH ARN

Syntax

mc event add

Adds a new bucket event notification. For supported event types, see Supported Bucket Events. The command has the following syntax:

mc event add TARGET ARN [FLAGS]
TARGET

Required The S3 service alias and bucket to which the command adds the new event notification. Specify the alias of a configured S3 service as the prefix to the TARGET path. For example:

mc event add play/mybucket
ARN

Required The Amazon Resource Name (ARN) of the notification target.

The MinIO server outputs an ARN for each configured notification target at server startup. See Bucket Notifications for more information.

--event

The event(s) for which MinIO generates bucket notifications. Specify multiple events using a comma , delimiter. See Supported Bucket Events for supported events.

Defaults to put,delete, get.

--prefix

The bucket prefix in which the specified --event can trigger a bucket notification.

For example, given a TARGET of play/mybucket and a --prefix of photos, only events in play/mybucket/photos trigger bucket notifications.

--suffix

The bucket suffix in which the specified --event can trigger a bucket notification.

For example, given a TARGET of play/mybucket and a --suffix of .jpg, only events in play/mybucket/*.jpg trigger bucket notifications.

mc event remove

Removes an existing bucket event notification. The command has the following syntax:

mc event remove TARGET ARN [FLAGS]
TARGET

Required The S3 service alias and bucket from which the command removes the event notification. Specify the alias of a configured S3 service as the prefix to the TARGET path. For example:

mc event add play/mybucket
ARN

Required The Amazon Resource Name (ARN) of the notification target.

The MinIO server outputs an ARN for each configured notification target at server startup. See Bucket Notifications for more information.

--force

Removes all events on the TARGET bucket with the --ARN notification target.

--event

The event(s) to remove. Specify multiple events using a comma , delimiter. See Supported Bucket Events for supported events.

Defaults to removing all events on the TARGET bucket with the --ARN notification target.

--prefix

The bucket prefix in which the command removes bucket notifications.

For example, given a TARGET of play/mybucket and a --prefix of photos, the command only removes bucket notifications in play/mybucket/photos.

--suffix

The bucket suffix in which the command removes bucket notifications.

For example, given a TARGET of play/mybucket and a --suffix of .jpg, the command only removes bucket notifications in play/mybucket/*.jpg.

mc event list

Lists bucket event notifications.

The command has the following syntax:

mc event add TARGET ARN [FLAGS]

list supports the following arguments

TARGET

Required The S3 service alias and bucket to which the command lists event notification. Specify the alias of a configured S3 service as the prefix to the TARGET path. For example:

mc event add play/mybucket
ARN

Required The Amazon Resource Name (ARN) of the bucket resource.

The MinIO server outputs an ARN for each configured notification target at server startup. See Bucket Notifications for more information.