-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
See the concepts doc and the registering object changes doc.
Pull requests target the 3956-storage-notifications branch
Steps:
- Add a
BucketNotificationclass, mapping the notification resource. Note that aBucketNotificationmay point to a topic which belongs to a differentprojectthan the one which owns its bucket. (Add 'BucketNotification' class. #3957) - Add
Bucket.notificationfactory. returning newBucketNotification. (Add 'Bucket.notification' factory #3958) - Add
BucketNotification.createmethod, mapping notifications/insert. Update the bucket's properties from the response (e.g., to get its server-generated ID). Should we barf if the ID is already set? (Add 'BucketNotification.create' API wrapper. #3966) - Add
BucketNotification.deletemethod, mapping notifications/delete. Presumably barf if the ID is not set. (Add 'BucketNotification.delete' API wrapper. #3983) - Add
BucketNotification.existsmethod, mapping notifications/get onto boolean (False forNotFound). Presumably barf if the ID is not set. (Add 'BucketNotification.exists' API wrapper. #3984) - Add
BucketNotification.reloadmethod, mapping notifications/get, Presumably barf if the ID is not set. (Add 'BucketNotification.reload' API wrapper. #3986) - Add
Bucket.list_notificationsmethod, mapping notifications/list. Return an iterator ofBucketNotificationinstances. (Add 'Bucket.list_notifications' API wrapper. #3990) - Add a system test which exercises the new API wrapper methods. (Add system tests for bucket notifications. #4021)
Questions:
- Do we need to support de novo creation of
BucketNotficationinstances w/ a user-supplied ID? The spec says that the ID is generated duringnotifications/insert, which suggests not. - I assume that access to the new features does not depend on being able to import
google.cloud.pubsub.The counter-example would be thatThe docs say that a topic is created if it does not exist.BucketNotification.createmust verify the existence of its topic, and maybe create a new one. Or does the back-end do that? - There is no documented support for update / patch of existing notifications. Is that intentional?
- What are the intended semantics of passing {'payload_format`: 'NONE'}? I don't think subscribers will find message with an empty payload useful, so I must be misunderstanding something. Do the non-payload attributes provide enough information for the subscriber to do something useful?
/cc @lukesneeringer, perhaps to loop in the appropriate GCS back-end contact.
Metadata
Metadata
Assignees
Labels
api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.