@@ -20,6 +20,7 @@ import "google/api/annotations.proto";
2020import "google/api/client.proto" ;
2121import "google/api/field_behavior.proto" ;
2222import "google/api/resource.proto" ;
23+ import "google/cloud/bigquery/analyticshub/v1/pubsub.proto" ;
2324import "google/iam/v1/iam_policy.proto" ;
2425import "google/iam/v1/policy.proto" ;
2526import "google/longrunning/operations.proto" ;
@@ -43,6 +44,22 @@ option (google.api.resource_definition) = {
4344 type : "bigquery.googleapis.com/Table"
4445 pattern : "projects/{project}/datasets/{dataset}/tables/{table}"
4546};
47+ option (google.api.resource_definition ) = {
48+ type : "pubsub.googleapis.com/Topic"
49+ pattern : "projects/{project}/topics/{topic}"
50+ };
51+ option (google.api.resource_definition ) = {
52+ type : "bigquery.googleapis.com/Routine"
53+ pattern : "projects/{project}/datasets/{dataset}/routines/{routine}"
54+ };
55+ option (google.api.resource_definition ) = {
56+ type : "servicemanagement.googleapis.com/ManagedService"
57+ pattern : "services/{service}"
58+ };
59+ option (google.api.resource_definition ) = {
60+ type : "cloudcommerceconsumerprocurement.googleapis.com/Order"
61+ pattern : "projects/{project}/orders/{order}"
62+ };
4663
4764// The `AnalyticsHubService` API facilitates data sharing within and across
4865// organizations. It allows data providers to publish listings that reference
@@ -167,8 +184,8 @@ service AnalyticsHubService {
167184 option (google.api.method_signature ) = "name" ;
168185 }
169186
170- // Creates a Subscription to a Data Exchange . This is a long-running operation
171- // as it will create one or more linked datasets.
187+ // Creates a Subscription to a Data Clean Room . This is a long-running
188+ // operation as it will create one or more linked datasets.
172189 rpc SubscribeDataExchange (SubscribeDataExchangeRequest )
173190 returns (google.longrunning.Operation ) {
174191 option (google.api.http ) = {
@@ -314,6 +331,18 @@ enum DiscoveryType {
314331 DISCOVERY_TYPE_PUBLIC = 2 ;
315332}
316333
334+ // The underlying shared asset type shared in a listing by a publisher.
335+ enum SharedResourceType {
336+ // Not specified.
337+ SHARED_RESOURCE_TYPE_UNSPECIFIED = 0 ;
338+
339+ // BigQuery Dataset Asset.
340+ BIGQUERY_DATASET = 1 ;
341+
342+ // Pub/Sub Topic Asset.
343+ PUBSUB_TOPIC = 2 ;
344+ }
345+
317346// A data exchange is a container that lets you share data. Along with the
318347// descriptive information about the data exchange, it contains listings that
319348// reference shared datasets.
@@ -366,6 +395,12 @@ message DataExchange {
366395 // discovery_type field for all the listings under this exchange.
367396 optional DiscoveryType discovery_type = 9
368397 [(google.api.field_behavior ) = OPTIONAL ];
398+
399+ // Optional. By default, false.
400+ // If true, the DataExchange has an email sharing mandate enabled.
401+ // Publishers can view the logged email of the subscriber.
402+ optional bool log_linked_dataset_query_user_email = 10
403+ [(google.api.field_behavior ) = OPTIONAL ];
369404}
370405
371406// Sharing environment is a behavior model for sharing data within a
@@ -423,7 +458,6 @@ message Publisher {
423458 string primary_contact = 2 [(google.api.field_behavior ) = OPTIONAL ];
424459}
425460
426- // Contains the reference that identifies a destination bigquery dataset.
427461message DestinationDatasetReference {
428462 // Required. A unique ID for this dataset, without the project name. The ID
429463 // must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).
@@ -461,6 +495,13 @@ message DestinationDataset {
461495 string location = 5 [(google.api.field_behavior ) = REQUIRED ];
462496}
463497
498+ // Defines the destination Pub/Sub subscription.
499+ message DestinationPubSubSubscription {
500+ // Required. Destination Pub/Sub subscription resource.
501+ PubSubSubscription pubsub_subscription = 1
502+ [(google.api.field_behavior ) = REQUIRED ];
503+ }
504+
464505// A listing is what gets published into a data exchange that a subscriber can
465506// subscribe to. It contains a reference to the data source along with
466507// descriptive information that will help subscribers find and subscribe the
@@ -479,7 +520,7 @@ message Listing {
479520 // the subscriber's project. A Linked dataset is an opaque, read-only BigQuery
480521 // dataset that serves as a _symbolic link_ to a shared dataset.
481522 message BigQueryDatasetSource {
482- // Resource in this dataset that are selectively shared.
523+ // Resource in this dataset that is selectively shared.
483524 message SelectedResource {
484525 oneof resource {
485526 // Optional. Format:
@@ -513,15 +554,17 @@ message Listing {
513554 [(google.api.field_behavior ) = OPTIONAL ];
514555 }
515556
516- // Resource name of the dataset source for this listing.
557+ // Optional. Resource name of the dataset source for this listing.
517558 // e.g. `projects/myproject/datasets/123`
518- string dataset = 1 [(google.api.resource_reference ) = {
519- type : "bigquery.googleapis.com/Dataset"
520- }];
559+ string dataset = 1 [
560+ (google.api.field_behavior ) = OPTIONAL ,
561+ (google.api.resource_reference ) = {
562+ type : "bigquery.googleapis.com/Dataset"
563+ }
564+ ];
521565
522- // Optional. Resources in this dataset that are selectively shared.
523- // If this field is empty, then the entire dataset (all resources) are
524- // shared. This field is only valid for data clean room exchanges.
566+ // Optional. Resource in this dataset that is selectively shared.
567+ // This field is required for data clean room exchanges.
525568 repeated SelectedResource selected_resources = 2
526569 [(google.api.field_behavior ) = OPTIONAL ];
527570
@@ -531,6 +574,22 @@ message Listing {
531574 [(google.api.field_behavior ) = OPTIONAL ];
532575 }
533576
577+ // Pub/Sub topic source.
578+ message PubSubTopicSource {
579+ // Required. Resource name of the Pub/Sub topic source for this listing.
580+ // e.g. projects/myproject/topics/topicId
581+ string topic = 1 [
582+ (google.api.field_behavior ) = REQUIRED ,
583+ (google.api.resource_reference ) = { type : "pubsub.googleapis.com/Topic" }
584+ ];
585+
586+ // Optional. Region hint on where the data might be published. Data affinity
587+ // regions are modifiable. See https://cloud.google.com/about/locations for
588+ // full listing of possible Cloud regions.
589+ repeated string data_affinity_regions = 2
590+ [(google.api.field_behavior ) = OPTIONAL ];
591+ }
592+
534593 // Restricted export config, used to configure restricted export on linked
535594 // dataset.
536595 message RestrictedExportConfig {
@@ -602,9 +661,11 @@ message Listing {
602661
603662 // Listing source.
604663 oneof source {
605- // Required. Shared dataset i.e. BigQuery dataset source.
606- BigQueryDatasetSource bigquery_dataset = 6
607- [(google.api.field_behavior ) = REQUIRED ];
664+ // Shared dataset i.e. BigQuery dataset source.
665+ BigQueryDatasetSource bigquery_dataset = 6 ;
666+
667+ // Pub/Sub topic source.
668+ PubSubTopicSource pubsub_topic = 16 ;
608669 }
609670
610671 // Output only. The resource name of the listing.
@@ -663,6 +724,15 @@ message Listing {
663724 // Optional. Type of discovery of the listing on the discovery page.
664725 optional DiscoveryType discovery_type = 14
665726 [(google.api.field_behavior ) = OPTIONAL ];
727+
728+ // Output only. Listing shared asset type.
729+ SharedResourceType resource_type = 15
730+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
731+
732+ // Optional. By default, false.
733+ // If true, the Listing has an email sharing mandate enabled.
734+ optional bool log_linked_dataset_query_user_email = 18
735+ [(google.api.field_behavior ) = OPTIONAL ];
666736}
667737
668738// A subscription represents a subscribers' access to a particular set of
@@ -680,7 +750,15 @@ message Subscription {
680750 // Output only. Name of the linked dataset, e.g.
681751 // projects/subscriberproject/datasets/linked_dataset
682752 string linked_dataset = 1 [(google.api.field_behavior ) = OUTPUT_ONLY ];
753+
754+ // Output only. Name of the Pub/Sub subscription, e.g.
755+ // projects/subscriberproject/subscriptions/subscriptions/sub_id
756+ string linked_pubsub_subscription = 3
757+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
683758 }
759+
760+ // Output only. Listing for which linked resource is created.
761+ string listing = 2 [(google.api.field_behavior ) = OUTPUT_ONLY ];
684762 }
685763
686764 // State of the subscription.
@@ -744,6 +822,21 @@ message Subscription {
744822
745823 // Output only. Email of the subscriber.
746824 string subscriber_contact = 9 [(google.api.field_behavior ) = OUTPUT_ONLY ];
825+
826+ // Output only. Linked resources created in the subscription. Only contains
827+ // values if state = STATE_ACTIVE.
828+ repeated LinkedResource linked_resources = 11
829+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
830+
831+ // Output only. Listing shared asset type.
832+ SharedResourceType resource_type = 12
833+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
834+
835+ // Output only. By default, false.
836+ // If true, the Subscriber agreed to the email sharing mandate
837+ // that is enabled for DataExchange/Listing.
838+ optional bool log_linked_dataset_query_user_email = 14
839+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
747840}
748841
749842// Message for requesting the list of data exchanges.
@@ -825,9 +918,7 @@ message CreateDataExchangeRequest {
825918 ];
826919
827920 // Required. The ID of the data exchange.
828- // Must contain only Unicode letters, numbers (0-9), underscores (_).
829- // Should not use characters that require URL-escaping, or characters
830- // outside of ASCII, spaces.
921+ // Must contain only ASCII letters, numbers (0-9), underscores (_).
831922 // Max length: 100 bytes.
832923 string data_exchange_id = 2 [(google.api.field_behavior ) = REQUIRED ];
833924
@@ -912,9 +1003,7 @@ message CreateListingRequest {
9121003 ];
9131004
9141005 // Required. The ID of the listing to create.
915- // Must contain only Unicode letters, numbers (0-9), underscores (_).
916- // Should not use characters that require URL-escaping, or characters
917- // outside of ASCII, spaces.
1006+ // Must contain only ASCII letters, numbers (0-9), underscores (_).
9181007 // Max length: 100 bytes.
9191008 string listing_id = 2 [(google.api.field_behavior ) = REQUIRED ];
9201009
@@ -953,6 +1042,11 @@ message SubscribeListingRequest {
9531042 // Input only. BigQuery destination dataset to create for the subscriber.
9541043 DestinationDataset destination_dataset = 3
9551044 [(google.api.field_behavior ) = INPUT_ONLY ];
1045+
1046+ // Input only. Destination Pub/Sub subscription to create for the
1047+ // subscriber.
1048+ DestinationPubSubSubscription destination_pubsub_subscription = 5
1049+ [(google.api.field_behavior ) = INPUT_ONLY ];
9561050 }
9571051
9581052 // Required. Resource name of the listing that you want to subscribe to.
@@ -991,6 +1085,10 @@ message SubscribeDataExchangeRequest {
9911085 }
9921086 ];
9931087
1088+ // Optional. BigQuery destination dataset to create for the subscriber.
1089+ DestinationDataset destination_dataset = 5
1090+ [(google.api.field_behavior ) = OPTIONAL ];
1091+
9941092 // Required. Name of the subscription to create.
9951093 // e.g. `subscription1`
9961094 string subscription = 4 [(google.api.field_behavior ) = REQUIRED ];
@@ -1123,6 +1221,7 @@ message RevokeSubscriptionRequest {
11231221}
11241222
11251223// Message for response when you revoke a subscription.
1224+ // Empty for now.
11261225message RevokeSubscriptionResponse {}
11271226
11281227// Message for deleting a subscription.
0 commit comments