Skip to content

Commit

Permalink
feat: add ingestion Cloud Storage fields and Platform Logging fields …
Browse files Browse the repository at this point in the history
…to Topic

PiperOrigin-RevId: 678307181

Source-Link: googleapis/googleapis@69e9dff

Source-Link: googleapis/googleapis-gen@11a52e5
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTFhNTJlNTI3MjMyMjdkM2I2MTIwZjg4ZjFhNTgwZTM5NThlMGNkNSJ9
  • Loading branch information
gcf-owl-bot[bot] committed Sep 24, 2024
1 parent bcc2735 commit c307b9b
Show file tree
Hide file tree
Showing 4 changed files with 2,171 additions and 4 deletions.
121 changes: 121 additions & 0 deletions owl-bot-staging/v1/protos/google/pubsub/v1/pubsub.proto
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,132 @@ message IngestionDataSourceSettings {
string gcp_service_account = 5 [(google.api.field_behavior) = REQUIRED];
}

// Ingestion settings for Cloud Storage.
message CloudStorage {
// Possible states for ingestion from Cloud Storage.
enum State {
// Default value. This value is unused.
STATE_UNSPECIFIED = 0;

// Ingestion is active.
ACTIVE = 1;

// Permission denied encountered while calling the Cloud Storage API. This
// can happen if the Pub/Sub SA has not been granted the
// [appropriate
// permissions](https://cloud.google.com/storage/docs/access-control/iam-permissions):
// - storage.objects.list: to list the objects in a bucket.
// - storage.objects.get: to read the objects in a bucket.
// - storage.buckets.get: to verify the bucket exists.
CLOUD_STORAGE_PERMISSION_DENIED = 2;

// Permission denied encountered while publishing to the topic. This can
// happen if the Pub/Sub SA has not been granted the [appropriate publish
// permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)
PUBLISH_PERMISSION_DENIED = 3;

// The provided Cloud Storage bucket doesn't exist.
BUCKET_NOT_FOUND = 4;

// The Cloud Storage bucket has too many objects, ingestion will be
// paused.
TOO_MANY_OBJECTS = 5;
}

// Configuration for reading Cloud Storage data in text format. Each line of
// text as specified by the delimiter will be set to the `data` field of a
// Pub/Sub message.
message TextFormat {
// Optional. When unset, '\n' is used.
optional string delimiter = 1 [(google.api.field_behavior) = OPTIONAL];
}

// Configuration for reading Cloud Storage data in Avro binary format. The
// bytes of each object will be set to the `data` field of a Pub/Sub
// message.
message AvroFormat {}

// Configuration for reading Cloud Storage data written via [Cloud Storage
// subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage). The
// data and attributes fields of the originally exported Pub/Sub message
// will be restored when publishing.
message PubSubAvroFormat {}

// Output only. An output-only field that indicates the state of the Cloud
// Storage ingestion source.
State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Optional. Cloud Storage bucket. The bucket name must be without any
// prefix like "gs://". See the [bucket naming requirements]
// (https://cloud.google.com/storage/docs/buckets#naming).
string bucket = 2 [(google.api.field_behavior) = OPTIONAL];

// Defaults to text format.
oneof input_format {
// Optional. Data from Cloud Storage will be interpreted as text.
TextFormat text_format = 3 [(google.api.field_behavior) = OPTIONAL];

// Optional. Data from Cloud Storage will be interpreted in Avro format.
AvroFormat avro_format = 4 [(google.api.field_behavior) = OPTIONAL];

// Optional. It will be assumed data from Cloud Storage was written via
// [Cloud Storage
// subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
PubSubAvroFormat pubsub_avro_format = 5
[(google.api.field_behavior) = OPTIONAL];
}

// Optional. Only objects with a larger or equal creation timestamp will be
// ingested.
google.protobuf.Timestamp minimum_object_create_time = 6
[(google.api.field_behavior) = OPTIONAL];

// Optional. Glob pattern used to match objects that will be ingested. If
// unset, all objects will be ingested. See the [supported
// patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).
string match_glob = 9 [(google.api.field_behavior) = OPTIONAL];
}

// Only one source type can have settings set.
oneof source {
// Optional. Amazon Kinesis Data Streams.
AwsKinesis aws_kinesis = 1 [(google.api.field_behavior) = OPTIONAL];

// Optional. Cloud Storage.
CloudStorage cloud_storage = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Optional. Platform Logs settings. If unset, no Platform Logs will be
// generated.
PlatformLogsSettings platform_logs_settings = 4
[(google.api.field_behavior) = OPTIONAL];
}

// Settings for Platform Logs produced by Pub/Sub.
message PlatformLogsSettings {
// Severity levels of Platform Logs.
enum Severity {
// Default value. Logs level is unspecified. Logs will be disabled.
SEVERITY_UNSPECIFIED = 0;

// Logs will be disabled.
DISABLED = 1;

// Debug logs and higher-severity logs will be written.
DEBUG = 2;

// Info logs and higher-severity logs will be written.
INFO = 3;

// Warning logs and higher-severity logs will be written.
WARNING = 4;

// Only error logs will be written.
ERROR = 5;
}

// Optional. The minimum severity level of Platform Logs that will be written.
Severity severity = 1 [(google.api.field_behavior) = OPTIONAL];
}

// A topic resource.
Expand Down
Loading

0 comments on commit c307b9b

Please sign in to comment.