diff --git a/bucket-notification.go b/bucket-notification.go index 4f60f1c8b..5ac52e5f7 100644 --- a/bucket-notification.go +++ b/bucket-notification.go @@ -28,10 +28,13 @@ type NotificationEventType string // http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html#notification-how-to-event-types-and-destinations const ( ObjectCreatedAll NotificationEventType = "s3:ObjectCreated:*" - ObjectCreatePut = "s3:ObjectCreated:Put" + ObjectCreatedPut = "s3:ObjectCreated:Put" ObjectCreatedPost = "s3:ObjectCreated:Post" ObjectCreatedCopy = "s3:ObjectCreated:Copy" - ObjectCreatedCompleteMultipartUpload = "sh:ObjectCreated:CompleteMultipartUpload" + ObjectCreatedCompleteMultipartUpload = "s3:ObjectCreated:CompleteMultipartUpload" + ObjectAccessedGet = "s3:ObjectAccessed:Get" + ObjectAccessedHead = "s3:ObjectAccessed:Head" + ObjectAccessedAll = "s3:ObjectAccessed:*" ObjectRemovedAll = "s3:ObjectRemoved:*" ObjectRemovedDelete = "s3:ObjectRemoved:Delete" ObjectRemovedDeleteMarkerCreated = "s3:ObjectRemoved:DeleteMarkerCreated" diff --git a/docs/API.md b/docs/API.md index f3e8b8077..30ba5cf5f 100644 --- a/docs/API.md +++ b/docs/API.md @@ -1229,6 +1229,7 @@ defer close(doneCh) // Listen for bucket notifications on "mybucket" filtered by prefix, suffix and events. for notificationInfo := range minioClient.ListenBucketNotification("YOUR-BUCKET", "PREFIX", "SUFFIX", []string{ "s3:ObjectCreated:*", + "s3:ObjectAccessed:*", "s3:ObjectRemoved:*", }, doneCh) { if notificationInfo.Err != nil { diff --git a/examples/minio/listenbucketnotification.go b/examples/minio/listenbucketnotification.go index b682dcb42..037e2251c 100644 --- a/examples/minio/listenbucketnotification.go +++ b/examples/minio/listenbucketnotification.go @@ -49,6 +49,7 @@ func main() { // Listen for bucket notifications on "mybucket" filtered by prefix, suffix and events. for notificationInfo := range minioClient.ListenBucketNotification("YOUR-BUCKET", "PREFIX", "SUFFIX", []string{ "s3:ObjectCreated:*", + "s3:ObjectAccessed:*", "s3:ObjectRemoved:*", }, doneCh) { if notificationInfo.Err != nil {