@@ -87,6 +87,10 @@ service Storage {
8787 rpc CreateBucket (CreateBucketRequest ) returns (Bucket ) {
8888 option (google.api.routing ) = {
8989 routing_parameters { field : "parent" path_template : "{project=**}" }
90+ routing_parameters {
91+ field : "bucket.project"
92+ path_template : "{project=**}"
93+ }
9094 };
9195 option (google.api.method_signature ) = "parent,bucket,bucket_id" ;
9296 }
@@ -165,8 +169,8 @@ service Storage {
165169 option (google.api.method_signature ) = "bucket,update_mask" ;
166170 }
167171
168- // Permanently deletes a notification subscription .
169- rpc DeleteNotification ( DeleteNotificationRequest )
172+ // Permanently deletes a NotificationConfig .
173+ rpc DeleteNotificationConfig ( DeleteNotificationConfigRequest )
170174 returns (google.protobuf.Empty ) {
171175 option (google.api.routing ) = {
172176 routing_parameters {
@@ -177,8 +181,9 @@ service Storage {
177181 option (google.api.method_signature ) = "name" ;
178182 }
179183
180- // View a notification config.
181- rpc GetNotification (GetNotificationRequest ) returns (Notification ) {
184+ // View a NotificationConfig.
185+ rpc GetNotificationConfig (GetNotificationConfigRequest )
186+ returns (NotificationConfig ) {
182187 option (google.api.routing ) = {
183188 routing_parameters {
184189 field : "name"
@@ -188,20 +193,21 @@ service Storage {
188193 option (google.api.method_signature ) = "name" ;
189194 }
190195
191- // Creates a notification subscription for a given bucket.
192- // These notifications, when triggered, publish messages to the specified
193- // Pub/Sub topics.
194- // See https://cloud.google.com/storage/docs/pubsub-notifications.
195- rpc CreateNotification (CreateNotificationRequest ) returns (Notification ) {
196+ // Creates a NotificationConfig for a given bucket.
197+ // These NotificationConfigs, when triggered, publish messages to the
198+ // specified Pub/Sub topics. See
199+ // https://cloud.google.com/storage/docs/pubsub-notifications.
200+ rpc CreateNotificationConfig (CreateNotificationConfigRequest )
201+ returns (NotificationConfig ) {
196202 option (google.api.routing ) = {
197203 routing_parameters { field : "parent" path_template : "{bucket=**}" }
198204 };
199- option (google.api.method_signature ) = "parent,notification " ;
205+ option (google.api.method_signature ) = "parent,notification_config " ;
200206 }
201207
202- // Retrieves a list of notification subscriptions for a given bucket.
203- rpc ListNotifications ( ListNotificationsRequest )
204- returns (ListNotificationsResponse ) {
208+ // Retrieves a list of NotificationConfigs for a given bucket.
209+ rpc ListNotificationConfigs ( ListNotificationConfigsRequest )
210+ returns (ListNotificationConfigsResponse ) {
205211 option (google.api.routing ) = {
206212 routing_parameters { field : "parent" path_template : "{bucket=**}" }
207213 };
@@ -307,8 +313,9 @@ service Storage {
307313 // returned `persisted_size`; in this case, the service will skip data at
308314 // offsets that were already persisted (without checking that it matches
309315 // the previously written data), and write only the data starting from the
310- // persisted offset. This behavior can make client-side handling simpler
311- // in some cases.
316+ // persisted offset. Even though the data isn't written, it may still
317+ // incur a performance cost over resuming at the correct write offset.
318+ // This behavior can make client-side handling simpler in some cases.
312319 //
313320 // The service will not view the object as complete until the client has
314321 // sent a `WriteObjectRequest` with `finish_write` set to `true`. Sending any
@@ -592,44 +599,45 @@ message UpdateBucketRequest {
592599 [(google.api.field_behavior ) = REQUIRED ];
593600}
594601
595- // Request message for DeleteNotification .
596- message DeleteNotificationRequest {
597- // Required. The parent bucket of the notification .
602+ // Request message for DeleteNotificationConfig .
603+ message DeleteNotificationConfigRequest {
604+ // Required. The parent bucket of the NotificationConfig .
598605 string name = 1 [
599606 (google.api.field_behavior ) = REQUIRED ,
600607 (google.api.resource_reference ) = {
601- type : "storage.googleapis.com/Notification "
608+ type : "storage.googleapis.com/NotificationConfig "
602609 }
603610 ];
604611}
605612
606- // Request message for GetNotification .
607- message GetNotificationRequest {
608- // Required. The parent bucket of the notification .
613+ // Request message for GetNotificationConfig .
614+ message GetNotificationConfigRequest {
615+ // Required. The parent bucket of the NotificationConfig .
609616 // Format:
610- // `projects/{project}/buckets/{bucket}/notificationConfigs/{notification }`
617+ // `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig }`
611618 string name = 1 [
612619 (google.api.field_behavior ) = REQUIRED ,
613620 (google.api.resource_reference ) = { type : "storage.googleapis.com/Bucket" }
614621 ];
615622}
616623
617- // Request message for CreateNotification .
618- message CreateNotificationRequest {
619- // Required. The bucket to which this notification belongs.
624+ // Request message for CreateNotificationConfig .
625+ message CreateNotificationConfigRequest {
626+ // Required. The bucket to which this NotificationConfig belongs.
620627 string parent = 1 [
621628 (google.api.field_behavior ) = REQUIRED ,
622629 (google.api.resource_reference ) = {
623630 child_type : "storage.googleapis.com/Bucket"
624631 }
625632 ];
626633
627- // Required. Properties of the notification to be inserted.
628- Notification notification = 2 [(google.api.field_behavior ) = REQUIRED ];
634+ // Required. Properties of the NotificationConfig to be inserted.
635+ NotificationConfig notification_config = 2
636+ [(google.api.field_behavior ) = REQUIRED ];
629637}
630638
631639// Request message for ListNotifications.
632- message ListNotificationsRequest {
640+ message ListNotificationConfigsRequest {
633641 // Required. Name of a Google Cloud Storage bucket.
634642 string parent = 1 [
635643 (google.api.field_behavior ) = REQUIRED ,
@@ -638,24 +646,23 @@ message ListNotificationsRequest {
638646 }
639647 ];
640648
641- // The maximum number of notifications to return. The service may return fewer
642- // than this value.
643- // The default value is 100. Specifying a value above 100 will result in a
644- // page_size of 100.
649+ // The maximum number of NotificationConfigs to return. The service may
650+ // return fewer than this value. The default value is 100. Specifying a value
651+ // above 100 will result in a page_size of 100.
645652 int32 page_size = 2 ;
646653
647- // A page token, received from a previous `ListNotifications ` call.
654+ // A page token, received from a previous `ListNotificationConfigs ` call.
648655 // Provide this to retrieve the subsequent page.
649656 //
650- // When paginating, all other parameters provided to `ListNotifications` must
651- // match the call that provided the page token.
657+ // When paginating, all other parameters provided to `ListNotificationConfigs`
658+ // must match the call that provided the page token.
652659 string page_token = 3 ;
653660}
654661
655- // The result of a call to Notifications.ListNotifications
656- message ListNotificationsResponse {
662+ // The result of a call to ListNotificationConfigs
663+ message ListNotificationConfigsResponse {
657664 // The list of items.
658- repeated Notification notifications = 1 ;
665+ repeated NotificationConfig notification_configs = 1 ;
659666
660667 // A token, which can be sent as `page_token` to retrieve the next page.
661668 // If this field is omitted, there are no subsequent pages.
@@ -2056,15 +2063,15 @@ message HmacKeyMetadata {
20562063}
20572064
20582065// A directive to publish Pub/Sub notifications upon changes to a bucket.
2059- message Notification {
2066+ message NotificationConfig {
20602067 option (google.api.resource ) = {
2061- type : "storage.googleapis.com/Notification "
2062- pattern : "projects/{project}/buckets/{bucket}/notificationConfigs/{notification }"
2068+ type : "storage.googleapis.com/NotificationConfig "
2069+ pattern : "projects/{project}/buckets/{bucket}/notificationConfigs/{notification_config }"
20632070 };
20642071
2065- // Required. The resource name of this notification .
2072+ // Required. The resource name of this NotificationConfig .
20662073 // Format:
2067- // `projects/{project}/buckets/{bucket}/notificationConfigs/{notification }`
2074+ // `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig }`
20682075 // The `{project}` portion may be `_` for globally unique buckets.
20692076 string name = 1 [(google.api.field_behavior ) = REQUIRED ];
20702077
@@ -2073,20 +2080,20 @@ message Notification {
20732080 // '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
20742081 string topic = 2 [(google.api.field_behavior ) = REQUIRED ];
20752082
2076- // The etag of the Notification .
2077- // If included in the metadata of GetNotificationRequest , the operation will
2078- // only be performed if the etag matches that of the Notification .
2083+ // The etag of the NotificationConfig .
2084+ // If included in the metadata of GetNotificationConfigRequest , the operation
2085+ // will only be performed if the etag matches that of the NotificationConfig .
20792086 string etag = 7 ;
20802087
2081- // If present, only send notifications about listed event types. If empty,
2082- // sent notifications for all event types.
2088+ // If present, only send notifications about listed event types. If
2089+ // empty, sent notifications for all event types.
20832090 repeated string event_types = 3 ;
20842091
20852092 // A list of additional attributes to attach to each Pub/Sub
2086- // message published for this notification subscription .
2093+ // message published for this NotificationConfig .
20872094 map <string , string > custom_attributes = 4 ;
20882095
2089- // If present, only apply this notification config to object names that
2096+ // If present, only apply this NotificationConfig to object names that
20902097 // begin with this prefix.
20912098 string object_name_prefix = 5 ;
20922099
0 commit comments