@@ -39,6 +39,23 @@ message GoogleApiSource {
3939 singular : "googleApiSource"
4040 };
4141
42+ // Config to enable subscribing to all events from a list of projects.
43+ message ProjectSubscriptions {
44+ // Required. A list of projects to receive events from.
45+ //
46+ // All the projects must be in the same org. The listed projects should have
47+ // the format project/{identifier} where identifier can be either the
48+ // project id for project number. A single list may contain both formats. At
49+ // most 100 projects can be listed.
50+ repeated string list = 1 [(google.api.field_behavior ) = REQUIRED ];
51+ }
52+
53+ // Config to enabled subscribing to events from other projects in the org.
54+ message OrganizationSubscription {
55+ // Required. Enable org level subscription.
56+ bool enabled = 1 [(google.api.field_behavior ) = REQUIRED ];
57+ }
58+
4259 // Identifier. Resource name of the form
4360 // projects/{project}/locations/{location}/googleApiSources/{google_api_source}
4461 string name = 1 [(google.api.field_behavior ) = IDENTIFIER ];
@@ -98,4 +115,22 @@ message GoogleApiSource {
98115
99116 // Optional. Config to control Platform logging for the GoogleApiSource.
100117 LoggingConfig logging_config = 11 [(google.api.field_behavior ) = OPTIONAL ];
118+
119+ // Config to enabled subscribing to events from other projects in the org.
120+ //
121+ // Users need the eventarc.googleApiSource.create permission on the entire org
122+ // in order to create a resource with these settings.
123+ oneof wide_scope_subscription {
124+ // Optional. Config to enable subscribing to events from all projects in the
125+ // GoogleApiSource's org.
126+ OrganizationSubscription organization_subscription = 12
127+ [(google.api.field_behavior ) = OPTIONAL ];
128+
129+ // Optional. Config to enable subscribing to all events from a list of
130+ // projects.
131+ //
132+ // All the projects must be in the same org as the GoogleApiSource.
133+ ProjectSubscriptions project_subscriptions = 13
134+ [(google.api.field_behavior ) = OPTIONAL ];
135+ }
101136}
0 commit comments