Updated on 2022-06-08 GMT+08:00

Configuring DIS-Enabled Event Notification

This topic describes how to configure a DIS-enabled event notification rule on OBS Console.

Background Information

For details, see DIS-Enabled Event Notification.

Limitations and Constraints

  • A maximum of 10 DIS-enabled event notification rules can be configured for a bucket.
  • Configurations of any two DIS-enabled event notification rules for a bucket cannot overlap. In other words, any object cannot match two or more event notification rules in any event circumstances. Therefore, when creating an event notification rule, if the setting overlaps with an existing one, the rule fails to be created.

    For an event, if a rule has been configured without specifying the object name prefix or suffix, no more rules can be configured for the same event. Because the rule without specifying the object name prefix or suffix applies to all objects in the bucket.

    Taking the Put event for an example, if rule A has been configured for the Put event, with the object name prefix set to abcd and the suffix set to .txt, you need to be cautious about the setting of Prefix and Suffix when creating another rule B for the Put event. Table 1 lists some settings and results for your reference.

    Table 1 Prefix and suffix settings of rule B and its creation results

    Prefix and Suffix Settings of Rule A

    Prefix and Suffix Settings of Rule B

    Rule B Creation Result

    Reason

    Prefix: abcd

    Suffix: .txt

    Prefix: abcd

    Suffix: .txt

    Failed

    Rule B's prefix and suffix setting completely overlaps with that of rule A.

    Prefix: abcd

    Suffix: left blank

    Failed

    Rule B's prefix setting is the same as that of rule A, and an empty suffix actually covers all suffix settings.

    Prefix: ab

    Suffix: xt

    Failed

    According to rule B's prefix and suffix setting, the objects specified by rule B may contain the objects specified by rule A.

    Prefix: abef

    Suffix: .txt

    Successful

    Though the suffixes of rule A and rule B are the same, but their prefixes are different.

    Prefix: abcd

    Suffix: .mp4

    Successful

    Though the prefixes of rule A and rule B are the same, but their suffixes are different.

Prerequisites

  • A DIS stream has been created.
  • An IAM agency has been created, which grants OBS the DIS Administrator or DIS User permission required to access the project where the DIS stream is located. For details about how to create an IAM agency, see Cloud Service Delegation.

Procedure

  1. In the bucket list, click the bucket to be operated. The Overview page of the bucket is displayed.
  2. In the right Basic Configurations area, click Event Notification. The Event Notification page is displayed.

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

  3. Select the DIS tab.
  4. Click Create. The Create DIS Notification dialog box is displayed. See Figure 1 for details.

    Figure 1 Creating a DIS-enabled notification

  5. Configure parameters. Table 2 describes the parameters.

    Table 2 Parameters for configuring a DIS-enabled notification

    Parameter

    Description

    DIS Notification Name

    Name of the event notification rule to be created.

    The name can contain a maximum of 256 characters, including uppercase and lowercase letters, digits, underscores (_), and hyphens (-).

    Events

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

    • ObjectCreated: Indicates all kinds of object creation operations, including PUT, POST, and COPY of objects, as well as the merging of parts.
    • Put: Use the PUT method to upload an object.
    • Post: Use the POST method to upload an object.
    • Copy: Use the COPY method to copy an object.
    • CompleteMultipartUpload: Merge parts of multipart tasks.
    • ObjectRemoved: Indicates all kinds of object deletion operations.
    • Delete: Delete an object with a specified version ID.
    • DeleteMarkerCreated: Delete 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.
    • The prefix can be empty or can contain a maximum of 1024 characters. In addition, the total length of the prefix and suffix in a rule cannot exceed 1024 characters.
    • Configurations of any two DIS-enabled event notification rules for a bucket cannot overlap. For details, see Limitations and Constraints.

    Suffix

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

    NOTE:
    • If neither the Prefix nor the Suffix is configured, the event notification rule applies to all objects in the bucket.
    • The suffix can be empty and can contain a maximum of 1024 characters. In addition, the total length of the prefix and suffix in a rule cannot exceed 1024 characters.
    • A folder path ends with a slash (/). Therefore, if you want to configure event notification rules for operations on folders and you need to filter folders by suffix, the suffix must also end with a slash (/).
    • Configurations of any two DIS-enabled event notification rules for a bucket cannot overlap. For details, see Limitations and Constraints.

    DIS Stream

    Project: The project that contains the DIS stream you want to select.

    Projects are used to manage and classify cloud resources, including DIS streams. When a DIS stream is created, the project to which the DIS stream belongs must be specified. Each project contains different DIS streams. Select a project first and then a DIS stream.

    Stream: Select the DIS stream to which the event notification message is sent. DIS streams can be created on the DIS console.

    IAM Agency

    OBS can send notification messages to DIS only after OBS is authorized with the required DIS access permissions.

    Select a cloud service agency, which authorizes OBS with the DIS Administrator or DIS User permissions to access the project where the selected DIS stream is located.

    For details about how to create an IAM agency, see Cloud Service Delegation.

  6. Click OK.

Related Operations

You can click Edit next to the DIS notification rule to modify the DIS notification rule. You can also click Delete to delete the DIS notification rule.

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