This topic describes how to configure event notification in the OSS console.
OSS uses the event notification feature to send notifications about operations performed on OSS resources in a timely manner. Examples:
- New data is uploaded from image sharing platforms or audio and video platforms to OSS.
- Relevant content in OSS is updated.
- Important objects in OSS are deleted.
- Synchronization for data in OSS is completed.
- Notifications are not sent for the TS and M3U8 files that are generated by using RTMP ingest.
- The event notification feature is available in all regions except China (Heyuan).
For more information about event notification, see Event notification.
- Log on to the OSS console.
- Click Buckets, and then click the name of the target bucket.
- ChooseConfigure.. Click
- Click Create Rule. In the Create Rule dialog box that appears, configure an event notification rule.
The following table describes the parameters.
Parameter Description Rule Name Specify the name of the event notification rule. Events Select one or more events that require message notifications. The same event cannot be configured on the same resource multiple times. Event types correspond to different operations on OSS resources. For more information about event types and their descriptions, see Event types. Resource Description Set the information of the object that you want to follow. The resource description can be a full name, a prefix, a suffix, or a combination of a prefix and a suffix. Different resource descriptions cannot overlap. After this parameter is specified, this event notification rule only sends message notifications when the specified operation is performed on the corresponding object.
Note You can click Add to specify a maximum of five Resource Description entries.
- Full Name: Set the complete path of an object to receive notifications about the object. Example: test/myphoto/photo1.jpg.
- Prefix and Suffix: Set the prefix and suffix to receive notifications about all or multiple objects
in a bucket. For example, for a bucket named
- To receive notifications about all objects, do not set Prefix or Suffix.
- To receive notifications about objects in the movie directory, set Prefix to movie/ and leave Suffix unspecified.
- To receive notifications about all .jpg images, set Suffix to .jpg and leave Prefix unspecified.
- To receive notifications about videos in the MP3 format in the movie directory, set Prefix to movie/ and Suffix to .mp3.
Endpoint Add one or more endpoints. Event notifications can be sent to one or more HTTP endpoints or queues.Note
- When a notification rule is triggered by an operation, the OSS event notification feature generates a message and publishes the message to an MNS topic. MNS sends the message to the subscribed queue.
- MNS is a paid service. For more information, see Alibaba Cloud Message Service (MNS) pricing.
- Click OK.