@@ -237,11 +237,132 @@ message IngestionDataSourceSettings {
237
237
string gcp_service_account = 5 [(google.api.field_behavior ) = REQUIRED ];
238
238
}
239
239
240
+ // Ingestion settings for Cloud Storage.
241
+ message CloudStorage {
242
+ // Possible states for ingestion from Cloud Storage.
243
+ enum State {
244
+ // Default value. This value is unused.
245
+ STATE_UNSPECIFIED = 0 ;
246
+
247
+ // Ingestion is active.
248
+ ACTIVE = 1 ;
249
+
250
+ // Permission denied encountered while calling the Cloud Storage API. This
251
+ // can happen if the Pub/Sub SA has not been granted the
252
+ // [appropriate
253
+ // permissions](https://cloud.google.com/storage/docs/access-control/iam-permissions):
254
+ // - storage.objects.list: to list the objects in a bucket.
255
+ // - storage.objects.get: to read the objects in a bucket.
256
+ // - storage.buckets.get: to verify the bucket exists.
257
+ CLOUD_STORAGE_PERMISSION_DENIED = 2 ;
258
+
259
+ // Permission denied encountered while publishing to the topic. This can
260
+ // happen if the Pub/Sub SA has not been granted the [appropriate publish
261
+ // permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)
262
+ PUBLISH_PERMISSION_DENIED = 3 ;
263
+
264
+ // The provided Cloud Storage bucket doesn't exist.
265
+ BUCKET_NOT_FOUND = 4 ;
266
+
267
+ // The Cloud Storage bucket has too many objects, ingestion will be
268
+ // paused.
269
+ TOO_MANY_OBJECTS = 5 ;
270
+ }
271
+
272
+ // Configuration for reading Cloud Storage data in text format. Each line of
273
+ // text as specified by the delimiter will be set to the `data` field of a
274
+ // Pub/Sub message.
275
+ message TextFormat {
276
+ // Optional. When unset, '\n' is used.
277
+ optional string delimiter = 1 [(google.api.field_behavior ) = OPTIONAL ];
278
+ }
279
+
280
+ // Configuration for reading Cloud Storage data in Avro binary format. The
281
+ // bytes of each object will be set to the `data` field of a Pub/Sub
282
+ // message.
283
+ message AvroFormat {}
284
+
285
+ // Configuration for reading Cloud Storage data written via [Cloud Storage
286
+ // subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage). The
287
+ // data and attributes fields of the originally exported Pub/Sub message
288
+ // will be restored when publishing.
289
+ message PubSubAvroFormat {}
290
+
291
+ // Output only. An output-only field that indicates the state of the Cloud
292
+ // Storage ingestion source.
293
+ State state = 1 [(google.api.field_behavior ) = OUTPUT_ONLY ];
294
+
295
+ // Optional. Cloud Storage bucket. The bucket name must be without any
296
+ // prefix like "gs://". See the [bucket naming requirements]
297
+ // (https://cloud.google.com/storage/docs/buckets#naming).
298
+ string bucket = 2 [(google.api.field_behavior ) = OPTIONAL ];
299
+
300
+ // Defaults to text format.
301
+ oneof input_format {
302
+ // Optional. Data from Cloud Storage will be interpreted as text.
303
+ TextFormat text_format = 3 [(google.api.field_behavior ) = OPTIONAL ];
304
+
305
+ // Optional. Data from Cloud Storage will be interpreted in Avro format.
306
+ AvroFormat avro_format = 4 [(google.api.field_behavior ) = OPTIONAL ];
307
+
308
+ // Optional. It will be assumed data from Cloud Storage was written via
309
+ // [Cloud Storage
310
+ // subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
311
+ PubSubAvroFormat pubsub_avro_format = 5
312
+ [(google.api.field_behavior ) = OPTIONAL ];
313
+ }
314
+
315
+ // Optional. Only objects with a larger or equal creation timestamp will be
316
+ // ingested.
317
+ google.protobuf.Timestamp minimum_object_create_time = 6
318
+ [(google.api.field_behavior ) = OPTIONAL ];
319
+
320
+ // Optional. Glob pattern used to match objects that will be ingested. If
321
+ // unset, all objects will be ingested. See the [supported
322
+ // patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).
323
+ string match_glob = 9 [(google.api.field_behavior ) = OPTIONAL ];
324
+ }
325
+
240
326
// Only one source type can have settings set.
241
327
oneof source {
242
328
// Optional. Amazon Kinesis Data Streams.
243
329
AwsKinesis aws_kinesis = 1 [(google.api.field_behavior ) = OPTIONAL ];
330
+
331
+ // Optional. Cloud Storage.
332
+ CloudStorage cloud_storage = 2 [(google.api.field_behavior ) = OPTIONAL ];
333
+ }
334
+
335
+ // Optional. Platform Logs settings. If unset, no Platform Logs will be
336
+ // generated.
337
+ PlatformLogsSettings platform_logs_settings = 4
338
+ [(google.api.field_behavior ) = OPTIONAL ];
339
+ }
340
+
341
+ // Settings for Platform Logs produced by Pub/Sub.
342
+ message PlatformLogsSettings {
343
+ // Severity levels of Platform Logs.
344
+ enum Severity {
345
+ // Default value. Logs level is unspecified. Logs will be disabled.
346
+ SEVERITY_UNSPECIFIED = 0 ;
347
+
348
+ // Logs will be disabled.
349
+ DISABLED = 1 ;
350
+
351
+ // Debug logs and higher-severity logs will be written.
352
+ DEBUG = 2 ;
353
+
354
+ // Info logs and higher-severity logs will be written.
355
+ INFO = 3 ;
356
+
357
+ // Warning logs and higher-severity logs will be written.
358
+ WARNING = 4 ;
359
+
360
+ // Only error logs will be written.
361
+ ERROR = 5 ;
244
362
}
363
+
364
+ // Optional. The minimum severity level of Platform Logs that will be written.
365
+ Severity severity = 1 [(google.api.field_behavior ) = OPTIONAL ];
245
366
}
246
367
247
368
// A topic resource.
@@ -774,6 +895,20 @@ message Subscription {
774
895
RESOURCE_ERROR = 2 ;
775
896
}
776
897
898
+ // Information about an associated Analytics Hub subscription
899
+ // (https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions).
900
+ message AnalyticsHubSubscriptionInfo {
901
+ // Optional. The name of the associated Analytics Hub listing resource.
902
+ // Pattern:
903
+ // "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}"
904
+ string listing = 1 [(google.api.field_behavior ) = OPTIONAL ];
905
+
906
+ // Optional. The name of the associated Analytics Hub subscription resource.
907
+ // Pattern:
908
+ // "projects/{project}/locations/{location}/subscriptions/{subscription}"
909
+ string subscription = 2 [(google.api.field_behavior ) = OPTIONAL ];
910
+ }
911
+
777
912
// Required. The name of the subscription. It must have the format
778
913
// `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
779
914
// start with a letter, and contain only letters (`[A-Za-z]`), numbers
@@ -922,6 +1057,11 @@ message Subscription {
922
1057
// Output only. An output-only field indicating whether or not the
923
1058
// subscription can receive messages.
924
1059
State state = 19 [(google.api.field_behavior ) = OUTPUT_ONLY ];
1060
+
1061
+ // Output only. Information about the associated Analytics Hub subscription.
1062
+ // Only set if the subscritpion is created by Analytics Hub.
1063
+ AnalyticsHubSubscriptionInfo analytics_hub_subscription_info = 23
1064
+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
925
1065
}
926
1066
927
1067
// A policy that specifies how Pub/Sub retries message delivery.
0 commit comments