Configuring SMN-Enabled Event Notification

This topic describes how to configure an SMN-enabled event notification rule on OBS Console.

You can create SMN notification rules or replicate existing SMN notification rules from one bucket to another one in the same region.

Background Information

For details, see Event Notification.

Creating an SMN Notification Rule

  1. In the navigation pane on the left of OBS Console, choose Object Storage.
  2. In the bucket list, click a bucket name, and then the Overview page of the bucket is displayed.
  3. In the Basic Configurations area, click the Event Notification card. The Event Notification page is displayed.

    Alternatively, you can choose Basic Configurations > Event Notification in the navigation pane on the left.

  4. Click Create. The Create Event Notification dialog box is displayed. See Figure 1 for details.

    Figure 1 Creating an event notification rule

  5. Configure parameters. Table 1 describes the parameters.

    Table 1 Event notification parameters

    Parameter

    Description

    Name

    Name of the event. If the event name is left blank, the system will automatically generate a unique ID as the event name.

    Events

    Various types of events. Currently, OBS supports event notification for the following event types:

    • ObjectCreated: Indicates all kinds of object creation operations, including PUT, POST, and COPY of objects, as well as the merging of parts.
    • Put: Uploads an object using the PUT method.
    • Post: Uploads an object using the POST method.
    • Copy: Uploads an object using the COPY method.
    • CompleteMultipartUpload: Merges parts of multipart tasks.
    • ObjectRemoved: Deletes an object.
    • Delete: Deletes an object with a specified version ID.
    • DeleteMarkerCreated: Deletes an object without specifying a version ID.

    Multiple event types are applicable to the same object. For example, if you have selected Put, Copy, and Delete in an event notification rule, a notification message will be sent to you when the specified object is uploaded to, copied to, or deleted from the bucket. ObjectCreated contains Put, Post, Copy, and CompleteMultipartUpload. If you select ObjectCreated, the others are automatically selected and cannot be deselected. Similarly, if you select ObjectRemoved, Delete and DeleteMarkerCreated are automatically selected and cannot be deselected.

    Prefix

    Object name prefix. The event notification rule applies to objects that have the same name prefix.

    NOTE:

    If neither the Prefix nor the Suffix is configured, the event notification rule applies to all objects in the bucket.

    Suffix

    Object name suffix. The event notification rule applies to objects that have the same name suffix.

    NOTE:
    • A folder path ends with a slash (/). Therefore, if you want to configure the event notification for operations on folders and you need to filter folders by suffix, the suffix must also end with a slash (/).
    • If neither the Prefix nor the Suffix is configured, the event notification rule applies to all objects in the bucket.

    SMN Topic

    Project: The project that contains the SMN topic you want to select.

    Projects are used to manage and classify cloud resources, including SMN topics. Each project contains different SMN topics. Select a project first and then a topic.

    Topic: specifies the SMN topic that authorizes OBS to publish messages. You can create such topics on the SMN management console.
    NOTE:
    • Once SMN topics are selected for pushing OBS event notifications, do not delete them or cancel their authorizations to OBS.
    • If the topics are deleted or their authorizations to OBS are canceled, the following conditions may occur:

      a. The subscriber of the topic cannot receive messages.

      b. Event notifications associated with unavailable topics are automatically cleared.

    • For details, see sections "Creating a Topic", "Adding a Subscription to the Topic", and "Configuring a Topic Policy" in the Simple Message Notification User Guide.

  6. Click OK.

Replicating SMN Notification Rules

  1. In the navigation pane on the left of OBS Console, choose Object Storage.
  2. In the bucket list, click a bucket name, and then the Overview page of the bucket is displayed.
  3. In the Basic Configurations area, click the Event Notification card. The Event Notification page is displayed.

    Alternatively, you can choose Basic Configurations > Event Notification in the navigation pane on the left.

  4. Click Replicate.
  5. Select a replication source, that is, the source bucket for which the SMN notification rules were configured.

    • The notification rules replicated from a source bucket will not overwrite existing rules in the destination bucket, and any that conflict with the existing ones will not be replicated.
    • The version of both the source and destination buckets must be 3.0.
    • The source and destination buckets must be in the same region.
    • You can remove the rules that you do not want to replicate.
    Figure 2 Replicating SMN notification rules

  6. Click OK to replicate the rules to the destination bucket.

Related Operations

You can click Edit under the Operation column of an event notification rule, to edit the notification rule. Also you can click Delete to delete it.

If you want to delete more than one event notification rules at a time, select them and click Delete above the list.