1
0
mirror of https://github.com/minio/docs.git synced 2025-07-30 07:03:26 +03:00

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
This commit is contained in:
Daryl White
2024-10-08 13:07:04 -04:00
committed by GitHub
parent 8da7c7d94c
commit 8f9a1ff466
4 changed files with 90 additions and 66 deletions

View File

@ -65,28 +65,27 @@ Parameters
~~~~~~~~~~
.. mc-cmd:: ALIAS
:required:
*Required* The MinIO :ref:`alias <alias>` and bucket to
which the command adds the new event notification. For example:
The MinIO :ref:`alias <alias>` and bucket to which the command adds the new event notification.
For example:
.. code-block:: shell
mc event add play/mybucket
.. mc-cmd:: ARN
:required:
*Required* The :aws-docs:`Amazon Resource Name (ARN)
<IAM/latest/UserGuide/reference-arns>` of the notification target.
The :aws-docs:`Amazon Resource Name (ARN) <IAM/latest/UserGuide/reference-arns>` of the notification target.
The MinIO server outputs an ARN for each configured
notification target at server startup. See
:ref:`Bucket Notifications <minio-bucket-notifications>` for more
information.
The MinIO server outputs an ARN for each configured notification target at server startup.
See :ref:`Bucket Notifications <minio-bucket-notifications>` for more information.
.. mc-cmd:: --event
:optional:
*Optional* The event(s) for which MinIO generates bucket notifications.
The event(s) for which MinIO generates bucket notifications.
Supports the following values:
@ -95,39 +94,32 @@ Parameters
- ``delete``
Specify multiple value using a comma ``,`` delimiter.
Do not add any whitespace between values.
Defaults to ``put,delete,get``.
If not specified, defaults to ``put,delete,get``.
See :ref:`mc-event-supported-events` for a detailed list of S3 events
associated to each of the supported values.
See :ref:`mc-event-supported-events` for a detailed list of S3 events associated to each of the supported values.
.. mc-cmd:: ignore-existing, p
:optional:
*Optional* Directs MinIO to ignore applying the specified event
triggers if an existing matching trigger exists.
Directs MinIO to ignore the specified event triggers if a matching trigger already exists.
.. mc-cmd:: --prefix
:optional:
The bucket prefix in which the specified :mc-cmd:`~mc event add --event` can trigger a bucket notification.
*Optional* The bucket prefix in which the specified
:mc-cmd:`~mc event add --event` can trigger a bucket notification.
For example, given a :mc-cmd:`~mc event add ALIAS` of ``play/mybucket``
and a :mc-cmd:`~mc event add --prefix` of ``photos``, only events in
``play/mybucket/photos`` trigger bucket notifications.
For example, given a :mc-cmd:`~mc event add ALIAS` of ``play/mybucket`` and a :mc-cmd:`~mc event add --prefix` of ``photos``, only events in ``play/mybucket/photos`` trigger bucket notifications.
Omit to trigger the event for all prefixes and objects in the bucket.
.. mc-cmd:: --suffix
:optional:
The bucket suffix in which the specified :mc-cmd:`~mc event add --event` can trigger a bucket notification.
*Optional* The bucket suffix in which the specified
:mc-cmd:`~mc event add --event` can trigger a bucket notification.
For example, given a :mc-cmd:`~mc event add ALIAS` of ``play/mybucket``
and a :mc-cmd:`~mc event add --suffix` of ``.jpg``, only events in
``play/mybucket/*.jpg`` trigger bucket notifications.
For example, given a :mc-cmd:`~mc event add ALIAS` of ``play/mybucket`` and a :mc-cmd:`~mc event add --suffix` of ``.jpg``, only events in ``play/mybucket/*.jpg`` trigger bucket notifications.
Omit to trigger the event for all objects regardless of suffix.

View File

@ -60,25 +60,22 @@ Parameters
~~~~~~~~~~
.. mc-cmd:: ALIAS
:required:
*Required* The S3 service :ref:`alias <alias>` and bucket to
which the command lists event notification. For example:
The S3 service :ref:`alias <alias>` and bucket to which the command lists event notification.
For example:
.. code-block:: shell
mc event add play/mybucket
mc event ls play/mybucket ARN...
.. mc-cmd:: ARN
:required:
*Required* The :aws-docs:`Amazon Resource Name (ARN)
<IAM/latest/UserGuide/reference-arns>` of the bucket resource.
The MinIO server outputs an ARN for each configured notification target at
server startup. See
:ref:`Bucket Notifications <minio-bucket-notifications>` for more
information.
The :aws-docs:`Amazon Resource Name (ARN) <IAM/latest/UserGuide/reference-arns>` of the bucket resource.
The MinIO server outputs an ARN at startup for each configured notification target.
See :ref:`Bucket Notifications <minio-bucket-notifications>` for more information.
Global Flags

View File

@ -18,8 +18,7 @@ Syntax
.. start-mc-event-remove-desc
The :mc:`mc event rm` command removes event notification triggers on a
bucket.
The :mc:`mc event rm` command removes an event notification trigger from a bucket.
.. end-mc-event-remove-desc
@ -46,12 +45,12 @@ The :mc:`mc event remove` command has equivalent functionality to :mc:`mc event
:class: copyable
mc [GLOBALFLAGS] event remove \
ALIAS \
[ARN] \
[--event "string"] \
[--force] \
[--prefix "string"] \
[--suffix "string"] \
ALIAS \
[ARN]
[--suffix "string"]
.. include:: /includes/common-minio-mc.rst
:start-after: start-minio-syntax
@ -66,44 +65,81 @@ Parameters
~~~~~~~~~~
.. mc-cmd:: ALIAS
:required:
*Required* The S3 service :ref:`alias <alias>` and bucket from
which the command removes the event notification. For example:
The S3 service :ref:`alias <alias>` and bucket from which the command removes the event notification.
For example:
.. code-block:: shell
mc event add play/mybucket
.. mc-cmd:: ARN
:required:
*Required* The :aws-docs:`Amazon Resource Name (ARN)
<IAM/latest/UserGuide/reference-arns>` of the notification target.
The :aws-docs:`Amazon Resource Name (ARN) <IAM/latest/UserGuide/reference-arns>` of the notification target.
The MinIO server outputs an ARN for each configured
notification target at server startup. See
:ref:`minio-bucket-notifications` for more
information.
The MinIO server outputs an ARN at startup for each configured notification target.
See :ref:`minio-bucket-notifications` for more information.
Retrieve the ARN by running :mc:`mc event ls` on the bucket.
.. mc-cmd:: --event
:optional:
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.
*Optional* The event(s) to remove. Specify multiple events using a comma
``,`` delimiter. See :ref:`mc-event-supported-events` for supported events.
Specify multiple events using a comma ``,`` delimiter.
See :ref:`mc-event-supported-events` for supported event types.
Defaults to removing an event that triggers for all event types on the :mc-cmd:`~mc event rm ALIAS` bucket with the :mc-cmd:`~mc event rm ARN` notification target.
Retrieve the event types used by running :mc:`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:`mc event rm` command:
.. list-table::
:header-rows: 1
:widths: 50 50
:width: 100%
* - 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:
.. code-block:: shell
arn:minio:sqs::mytest:webhook s3:ObjectAccessed:*,s3:ObjectCreated:* Filter:
Use the following command to remove the event:
.. code-block:: shell
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.
Defaults to removing all events on the :mc-cmd:`~mc event rm ALIAS`
bucket with the :mc-cmd:`~mc event rm ARN` notification target.
.. mc-cmd:: --force
:optional:
*Optional* Removes all events on the :mc-cmd:`~mc event rm ALIAS` bucket
with the :mc-cmd:`~mc event rm ARN` notification target.
Removes all events on the :mc-cmd:`~mc event rm ALIAS` bucket with the :mc-cmd:`~mc event rm ARN` notification target.
.. mc-cmd:: --prefix
:optional:
*Optional* The bucket prefix in which the command removes bucket
notifications.
The bucket prefix in which the command removes bucket notifications.
For example, given a :mc-cmd:`~mc event rm ALIAS` of
``play/mybucket`` and a :mc-cmd:`~mc event rm --prefix` of
@ -111,10 +147,9 @@ Parameters
``play/mybucket/photos``.
.. mc-cmd:: --suffix
:optional:
*Optional* The bucket suffix in which the command removes bucket
notifications.
The bucket suffix in which the command removes bucket notifications.
For example, given a :mc-cmd:`~mc event rm ALIAS` of
``play/mybucket`` and a :mc-cmd:`~mc event rm --suffix` of

View File

@ -21,7 +21,7 @@ Description
:mc:`mc idp ldap accesskey edit` modifies the specified :ref:`access key <minio-id-access-keys>` on the local server.
.. end-mc-idp-ldap-accesskey-rm-desc
.. end-mc-idp-ldap-accesskey-edit-desc
.. tab-set::