OSS uses the event notification feature to provide real-time notifications about operations performed on OSS resources. This topic describes how to configure event notification in the OSS console.
- 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.
- Data synchronization in OSS is completed.
- Notifications are not sent for the TS and M3U8 objects that are generated by using RTMP ingest.
- The event notification feature is available in all regions except the China (Heyuan), China (Guangzhou), China (Hohhot), China (Ulanqab), UAE (Dubai), and Malaysia (Kuala Lumpur) regions.
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.
- In the left-side navigation pane, choose Configure.. In the Event Notification section, click
- Click Create Rule. In the Create Rule panel, 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. An event can be selected only once for a resource. 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 sends message notifications only when the corresponding object changes.
Note You can click Add to specify a maximum of five resource descriptions for Resource Description.
- 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 folder, 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 folder, 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, OSS event notification generates a message and publishes the message to an MNS topic. MNS sends the message to the subscribed endpoint.
- MNS is a paid service. For more information, see Pricing.
- For more information about error messages, see Error codes.
- Click OK.