Set event notification

Products

Object Storage Service

2022-02-18 08:33:07

Set event notification

OSS supports the event notification function. You can make the callback notification in time while specifying relevant operation of some resources. The event notification is performed asynchronously, so that OSS operations will not be affected. The event notification is often seen in the following application scenarios, for example:

New data are uploaded to OSS from image sharing platforms and audio and video platforms.

Relevant contents in OSS are updated.

Important files in OSS are deleted.

You may enable the event notification function form the bucket such that a notification message will be sent to the target in case of each event. This part specifies the method of enabling event notification with the OSS Console. For information about informing event to REST API, please refer to Event Notification-API.

Type supported by event notification: OSS can send notification for the following event types

Targets supported by event notification: Targets Reachable by Event Notification Message

Event notification setting in the Console: Event Notification Setting in the Console

Type and Target Supported by Event Notification

When you configure event notification for the bucket, please be sure to specify which event types are to be notified and the notification receiving targets.

OSS can send notifications for the following event types

Event type Description
s3:ObjectCreated:* Create Object behavior, including Put Object, Post Object, Copy Object and Complete Multipart Upload
s3:ObjectCreated:Put Use Put Object to upload files
s3:ObjectCreated:Post Use Post Object to upload files
s3:ObjectCreated:Copy Use Put Object-Copy to copy files
s3:ObjectCreated:CompleteMultipartUpload Complete multipart upload
s3:ObjectRemoved:* Delete Object behaviors, including Delete Object
s3:ObjectRemoved:Delete Delete file

Reachable targets of event notification message:

  • HTTP(S): According to the callback URL configured by you, where there is any event notification triggered in Bucket, OSS will send notification contents in specified format to the callback URL and notification method supports HTTP(S).

Event Notification Setting in the Console

  1. Log into JD Cloud Console, select Object Storage -> Space Management -> Advanced Setting, and select Event Notification.

  2. Click [Creation Rules] to open the rule creation page.

Event Notification

  1. Please enter the rule name in the Name box.

Description

  • At most 100 rules can be created for your bucket.
  • The name shall be restricted to 256 bytes, consisting of the letter, the number, the underline (_) and the line-through (-).
  1. Select one or more events for message notification from the Event Type drop-down list.

Description

  • The event type corresponds to different operations of OSS resources. For specific types and meanings, please refer to the following OSS can send notifications for the following event types.
  • You are allowed to select several events intended to trigger a notification.
  • The same event cannot be configured on the same resource for several times (overlapped prefixes and suffixes).
  • The same event can be sent to different targets by configuration.
  • It is important to note that for each bucket, a single event shall not be configured with prefixes or suffixes that are overlapped; the event notification service shall be matched in turn; and the message notification will be sent and the match is terminated once the match is successfully done.
  • The execution sequence shall be subject to the server rules and may be inconsistent with the Console exhibition sequence.
  1. Add prefixes and suffixes in the Resource Description to complete resource description and screen files.

Description

  • Resource description: It can be a prefix, a suffix or both a prefix and a suffix. Please note that different resource descriptions shall not have any intersection.
  • Prefix and suffix: Some Object targets in the bucket can be exclusively concerned by setting prefixes and suffixes of Object. For example:
    • If all files in the bucket are concerned, both the prefix and suffix shall not be written.
    • To concern all files under the directory jdcloudoss in the bucket, the prefix shall be completed as jdcloudoss/ and suffix shall not be completed.
    • To concern all .jpg images in the bucket, the prefix shall not be completed while the suffix shall be completed as .jpg.
    • To concern all films in the .mp3 under the directory jdcloudoss in the bucket, the prefix shall be completed as jdcloudoss/ and suffix shall be completed as .mp3.
  1. Select [http(s)] in the Send to drop-down box to complete the setting of receiving terminal.

Description

*[http(s)]: OSS will release message to this address and you can enter 5 callback addresses at most. The address must be the complete URL and the http protocol shall be specified. For more details, please refer to Callback Notification.

  1. Click [Save].

Description

8.You may edit or delete event notification rules via the Console.

Feedback

开始与售前顾问沟通

可直接拨打电话 400-098-8505转1

我们的产品专家为您找到最合适的产品/解决⽅案

在线咨询 5*8⼩时

1v1线上咨询获取售前专业咨询

点击咨询
企微服务助手

专业产品顾问,随时随地沟通