GoogleCloudPlatform / GoogleCloudPlatform/gsutil

gsutil notification create won't throw an error for overlapped notifications

Open
#964 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
918
Forks
335
PR merge metrics
No merged PRs in 30d

Description

> You can create multiple notification configurations for a bucket, but their triggers cannot overlap such that a single event could send multiple notifications. Attempting to create a notification configuration that overlaps with an existing notification configuration results in an error.

When I use the same command to create the same notification twice, which will send multiple notifications created by a single event, it won't throw an error to prevent me from doing it.

```
gsutil notification create -t test-topic -e OBJECT_FINALIZE -p Uploading/prefix -f json gs://test-bucket
```

```
projects/_/buckets/test-bucket/notificationConfigs/26
Cloud Pub/Sub topic: projects/sample-project/topics/test-topic
Filters:
Event Types: OBJECT_FINALIZE
Object name prefix: 'Uploading/prefix'

projects/_/buckets/test-bucket/notificationConfigs/27
Cloud Pub/Sub topic: projects/sample-project/topics/test-topic
Filters:
Event Types: OBJECT_FINALIZE
Object name prefix: 'Uploading/prefix'
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.