1
0
mirror of https://github.com/minio/docs.git synced 2025-04-21 08:05:59 +03:00
docs/source/reference/minio-mc/mc-event-remove.rst
Daryl White 8f9a1ff466
Updates mc event rm for mismatched event error (#1344)
- Cleans up `mc event` command flags with optional/required labels. 
- Drive by fix for an `mc idp` command with an `end-before` include
error.

Closes #1263
2024-10-08 13:07:04 -04:00

5.5 KiB

mc event rm

minio

Table of Contents

mc event remove

mc event rm

Syntax

The mc event rm command removes an event notification trigger from a bucket.

The mc event remove command has equivalent functionality to mc event rm.

EXAMPLE

The following command removes a configured event notifications for the specified bucket notification target <minio-bucket-notifications> for the mydata bucket on the myminio MinIO deployment:

mc event rm myminio/mydata arn:aws:sqs::primary:target

SYNTAX

The command has the following syntax:

mc [GLOBALFLAGS] event remove        \
                 ALIAS               \
                 [ARN]               \
                 [--event "string"]  \
                 [--force]           \
                 [--prefix "string"] \
                 [--suffix "string"]
mc [GLOBALFLAGS] event remove [FLAGS] ALIAS ARN

Parameters

ALIAS

The S3 service alias <alias> and bucket from which the command removes the event notification. For example:

mc event add play/mybucket

ARN

The Amazon Resource Name (ARN) <IAM/latest/UserGuide/reference-arns> of the notification target.

The MinIO server outputs an ARN at startup for each configured notification target. See minio-bucket-notifications for more information.

Retrieve the ARN by running mc event ls on the bucket.

--event

The event type(s) specified when the event was added. The entries must match the values used when adding the event. If no event matches the list of event types, the command returns a no notification configuration matched error.

Specify multiple events using a comma , delimiter. See mc-event-supported-events for supported event types.

Defaults to removing an event that triggers for all event types on the ~mc event rm ALIAS bucket with the ~mc event rm ARN notification target.

Retrieve the event types used by running mc event ls on the bucket. Use the following table to convert event types in the command's output to the entry required for the mc event rm command:

Output of mv event ls Event type to use
s3:objectAccessed get
s3:objectCreated put
s3:objectRemoved delete

For example, if the mc event ls returns the following:

arn:minio:sqs::mytest:webhook   s3:ObjectAccessed:*,s3:ObjectCreated:*   Filter: 

Use the following command to remove the event:

mc event rm alias/bucket arn:minio:sqs::mytest:webhook --event get,put

The order of event types does not matter, only that you include the same ones that exist for the event.

--force

Removes all events on the ~mc event rm ALIAS bucket with the ~mc event rm ARN notification target.

--prefix

The bucket prefix in which the command removes bucket notifications.

For example, given a ~mc event rm ALIAS of play/mybucket and a ~mc event rm --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 ~mc event rm ALIAS of play/mybucket and a ~mc event rm --suffix of .jpg, the command only removes bucket notifications in play/mybucket/*.jpg.

Global Flags

Examples

Remove Event Notifications from a Bucket

Example

The following command removes all event notification triggers on a bucket. The command assumes the MinIO deployment has at least one configured bucket notification target <minio-bucket-notifications>:

mc event rm myminio/mydata arn:minio:sqs::primary:webhook

Syntax

mc event rm ALIAS ARN
  • Replace ALIAS with the alias <alias> of the MinIO deployment on which to add the bucket notification event. For example:

    myminio/mydata

  • Replace ARN with the notification target ARN <mc event add ARN>.

Behavior

S3 Compatibility