@google-cloud/pubsub-api 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +111 -0
- package/build/protos/google/pubsub/v1/pubsub.proto +2588 -0
- package/build/protos/google/pubsub/v1/schema.proto +409 -0
- package/build/protos/protos.d.ts +18963 -0
- package/build/protos/protos.js +1 -0
- package/build/protos/protos.json +1 -0
- package/build/src/index.d.ts +17 -0
- package/build/src/index.js +32 -0
- package/build/src/index.js.map +1 -0
- package/build/src/v1/gapic_metadata.json +424 -0
- package/build/src/v1/index.d.ts +3 -0
- package/build/src/v1/index.js +27 -0
- package/build/src/v1/index.js.map +1 -0
- package/build/src/v1/publisher_client.d.ts +835 -0
- package/build/src/v1/publisher_client.js +1260 -0
- package/build/src/v1/publisher_client.js.map +1 -0
- package/build/src/v1/publisher_client_config.json +97 -0
- package/build/src/v1/publisher_proto_list.json +4 -0
- package/build/src/v1/schema_service_client.d.ts +745 -0
- package/build/src/v1/schema_service_client.js +1176 -0
- package/build/src/v1/schema_service_client.js.map +1 -0
- package/build/src/v1/schema_service_client_config.json +79 -0
- package/build/src/v1/schema_service_proto_list.json +4 -0
- package/build/src/v1/subscriber_client.d.ts +1159 -0
- package/build/src/v1/subscriber_client.js +1491 -0
- package/build/src/v1/subscriber_client.js.map +1 -0
- package/build/src/v1/subscriber_client_config.json +136 -0
- package/build/src/v1/subscriber_proto_list.json +4 -0
- package/package.json +66 -0
|
@@ -0,0 +1,2588 @@
|
|
|
1
|
+
// Copyright 2026 Google LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
syntax = "proto3";
|
|
16
|
+
|
|
17
|
+
package google.pubsub.v1;
|
|
18
|
+
|
|
19
|
+
import "google/api/annotations.proto";
|
|
20
|
+
import "google/api/client.proto";
|
|
21
|
+
import "google/api/field_behavior.proto";
|
|
22
|
+
import "google/api/resource.proto";
|
|
23
|
+
import "google/protobuf/duration.proto";
|
|
24
|
+
import "google/protobuf/empty.proto";
|
|
25
|
+
import "google/protobuf/field_mask.proto";
|
|
26
|
+
import "google/protobuf/struct.proto";
|
|
27
|
+
import "google/protobuf/timestamp.proto";
|
|
28
|
+
import "google/pubsub/v1/schema.proto";
|
|
29
|
+
|
|
30
|
+
option csharp_namespace = "Google.Cloud.PubSub.V1";
|
|
31
|
+
option go_package = "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb;pubsubpb";
|
|
32
|
+
option java_multiple_files = true;
|
|
33
|
+
option java_outer_classname = "PubsubProto";
|
|
34
|
+
option java_package = "com.google.pubsub.v1";
|
|
35
|
+
option php_namespace = "Google\\Cloud\\PubSub\\V1";
|
|
36
|
+
option ruby_package = "Google::Cloud::PubSub::V1";
|
|
37
|
+
option (google.api.resource_definition) = {
|
|
38
|
+
type: "cloudkms.googleapis.com/CryptoKey"
|
|
39
|
+
pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}"
|
|
40
|
+
};
|
|
41
|
+
option (google.api.resource_definition) = {
|
|
42
|
+
type: "analyticshub.googleapis.com/Listing"
|
|
43
|
+
pattern: "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}"
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// The service that an application uses to manipulate topics, and to send
|
|
47
|
+
// messages to a topic.
|
|
48
|
+
service Publisher {
|
|
49
|
+
option (google.api.default_host) = "pubsub.googleapis.com";
|
|
50
|
+
option (google.api.oauth_scopes) =
|
|
51
|
+
"https://www.googleapis.com/auth/cloud-platform,"
|
|
52
|
+
"https://www.googleapis.com/auth/pubsub";
|
|
53
|
+
|
|
54
|
+
// Creates the given topic with the given name. See the [resource name rules]
|
|
55
|
+
// (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
|
|
56
|
+
rpc CreateTopic(Topic) returns (Topic) {
|
|
57
|
+
option (google.api.http) = {
|
|
58
|
+
put: "/v1/{name=projects/*/topics/*}"
|
|
59
|
+
body: "*"
|
|
60
|
+
};
|
|
61
|
+
option (google.api.method_signature) = "name";
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Updates an existing topic by updating the fields specified in the update
|
|
65
|
+
// mask. Note that certain properties of a topic are not modifiable.
|
|
66
|
+
rpc UpdateTopic(UpdateTopicRequest) returns (Topic) {
|
|
67
|
+
option (google.api.http) = {
|
|
68
|
+
patch: "/v1/{topic.name=projects/*/topics/*}"
|
|
69
|
+
body: "*"
|
|
70
|
+
};
|
|
71
|
+
option (google.api.method_signature) = "topic,update_mask";
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
|
|
75
|
+
// does not exist.
|
|
76
|
+
rpc Publish(PublishRequest) returns (PublishResponse) {
|
|
77
|
+
option (google.api.http) = {
|
|
78
|
+
post: "/v1/{topic=projects/*/topics/*}:publish"
|
|
79
|
+
body: "*"
|
|
80
|
+
};
|
|
81
|
+
option (google.api.method_signature) = "topic,messages";
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Gets the configuration of a topic.
|
|
85
|
+
rpc GetTopic(GetTopicRequest) returns (Topic) {
|
|
86
|
+
option (google.api.http) = {
|
|
87
|
+
get: "/v1/{topic=projects/*/topics/*}"
|
|
88
|
+
};
|
|
89
|
+
option (google.api.method_signature) = "topic";
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Lists matching topics.
|
|
93
|
+
rpc ListTopics(ListTopicsRequest) returns (ListTopicsResponse) {
|
|
94
|
+
option (google.api.http) = {
|
|
95
|
+
get: "/v1/{project=projects/*}/topics"
|
|
96
|
+
};
|
|
97
|
+
option (google.api.method_signature) = "project";
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Lists the names of the attached subscriptions on this topic.
|
|
101
|
+
rpc ListTopicSubscriptions(ListTopicSubscriptionsRequest)
|
|
102
|
+
returns (ListTopicSubscriptionsResponse) {
|
|
103
|
+
option (google.api.http) = {
|
|
104
|
+
get: "/v1/{topic=projects/*/topics/*}/subscriptions"
|
|
105
|
+
};
|
|
106
|
+
option (google.api.method_signature) = "topic";
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Lists the names of the snapshots on this topic. Snapshots are used in
|
|
110
|
+
// [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
|
|
111
|
+
// which allow you to manage message acknowledgments in bulk. That is, you can
|
|
112
|
+
// set the acknowledgment state of messages in an existing subscription to the
|
|
113
|
+
// state captured by a snapshot.
|
|
114
|
+
rpc ListTopicSnapshots(ListTopicSnapshotsRequest)
|
|
115
|
+
returns (ListTopicSnapshotsResponse) {
|
|
116
|
+
option (google.api.http) = {
|
|
117
|
+
get: "/v1/{topic=projects/*/topics/*}/snapshots"
|
|
118
|
+
};
|
|
119
|
+
option (google.api.method_signature) = "topic";
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
|
|
123
|
+
// does not exist. After a topic is deleted, a new topic may be created with
|
|
124
|
+
// the same name; this is an entirely new topic with none of the old
|
|
125
|
+
// configuration or subscriptions. Existing subscriptions to this topic are
|
|
126
|
+
// not deleted, but their `topic` field is set to `_deleted-topic_`.
|
|
127
|
+
rpc DeleteTopic(DeleteTopicRequest) returns (google.protobuf.Empty) {
|
|
128
|
+
option (google.api.http) = {
|
|
129
|
+
delete: "/v1/{topic=projects/*/topics/*}"
|
|
130
|
+
};
|
|
131
|
+
option (google.api.method_signature) = "topic";
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Detaches a subscription from this topic. All messages retained in the
|
|
135
|
+
// subscription are dropped. Subsequent `Pull` and `StreamingPull` requests
|
|
136
|
+
// will return FAILED_PRECONDITION. If the subscription is a push
|
|
137
|
+
// subscription, pushes to the endpoint will stop.
|
|
138
|
+
rpc DetachSubscription(DetachSubscriptionRequest)
|
|
139
|
+
returns (DetachSubscriptionResponse) {
|
|
140
|
+
option (google.api.http) = {
|
|
141
|
+
post: "/v1/{subscription=projects/*/subscriptions/*}:detach"
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// A policy constraining the storage of messages published to the topic.
|
|
147
|
+
message MessageStoragePolicy {
|
|
148
|
+
// Optional. A list of IDs of Google Cloud regions where messages that are
|
|
149
|
+
// published to the topic may be persisted in storage. Messages published by
|
|
150
|
+
// publishers running in non-allowed Google Cloud regions (or running outside
|
|
151
|
+
// of Google Cloud altogether) are routed for storage in one of the allowed
|
|
152
|
+
// regions. An empty list means that no regions are allowed, and is not a
|
|
153
|
+
// valid configuration.
|
|
154
|
+
repeated string allowed_persistence_regions = 1
|
|
155
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
156
|
+
|
|
157
|
+
// Optional. If true, `allowed_persistence_regions` is also used to enforce
|
|
158
|
+
// in-transit guarantees for messages. That is, Pub/Sub will fail
|
|
159
|
+
// Publish operations on this topic and subscribe operations
|
|
160
|
+
// on any subscription attached to this topic in any region that is
|
|
161
|
+
// not in `allowed_persistence_regions`.
|
|
162
|
+
bool enforce_in_transit = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Settings for validating messages published against a schema.
|
|
166
|
+
message SchemaSettings {
|
|
167
|
+
// Required. The name of the schema that messages published should be
|
|
168
|
+
// validated against. Format is `projects/{project}/schemas/{schema}`. The
|
|
169
|
+
// value of this field will be `_deleted-schema_` if the schema has been
|
|
170
|
+
// deleted.
|
|
171
|
+
string schema = 1 [
|
|
172
|
+
(google.api.field_behavior) = REQUIRED,
|
|
173
|
+
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Schema" }
|
|
174
|
+
];
|
|
175
|
+
|
|
176
|
+
// Optional. The encoding of messages validated against `schema`.
|
|
177
|
+
Encoding encoding = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
178
|
+
|
|
179
|
+
// Optional. The minimum (inclusive) revision allowed for validating messages.
|
|
180
|
+
// If empty or not present, allow any revision to be validated against
|
|
181
|
+
// last_revision or any revision created before.
|
|
182
|
+
string first_revision_id = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
183
|
+
|
|
184
|
+
// Optional. The maximum (inclusive) revision allowed for validating messages.
|
|
185
|
+
// If empty or not present, allow any revision to be validated against
|
|
186
|
+
// first_revision or any revision created after.
|
|
187
|
+
string last_revision_id = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// Settings for an ingestion data source on a topic.
|
|
191
|
+
message IngestionDataSourceSettings {
|
|
192
|
+
// Ingestion settings for Amazon Kinesis Data Streams.
|
|
193
|
+
message AwsKinesis {
|
|
194
|
+
// Possible states for ingestion from Amazon Kinesis Data Streams.
|
|
195
|
+
enum State {
|
|
196
|
+
// Default value. This value is unused.
|
|
197
|
+
STATE_UNSPECIFIED = 0;
|
|
198
|
+
|
|
199
|
+
// Ingestion is active.
|
|
200
|
+
ACTIVE = 1;
|
|
201
|
+
|
|
202
|
+
// Permission denied encountered while consuming data from Kinesis.
|
|
203
|
+
// This can happen if:
|
|
204
|
+
// - The provided `aws_role_arn` does not exist or does not have the
|
|
205
|
+
// appropriate permissions attached.
|
|
206
|
+
// - The provided `aws_role_arn` is not set up properly for Identity
|
|
207
|
+
// Federation using `gcp_service_account`.
|
|
208
|
+
// - The Pub/Sub SA is not granted the
|
|
209
|
+
// `iam.serviceAccounts.getOpenIdToken` permission on
|
|
210
|
+
// `gcp_service_account`.
|
|
211
|
+
KINESIS_PERMISSION_DENIED = 2;
|
|
212
|
+
|
|
213
|
+
// Permission denied encountered while publishing to the topic. This can
|
|
214
|
+
// happen if the Pub/Sub SA has not been granted the [appropriate publish
|
|
215
|
+
// permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)
|
|
216
|
+
PUBLISH_PERMISSION_DENIED = 3;
|
|
217
|
+
|
|
218
|
+
// The Kinesis stream does not exist.
|
|
219
|
+
STREAM_NOT_FOUND = 4;
|
|
220
|
+
|
|
221
|
+
// The Kinesis consumer does not exist.
|
|
222
|
+
CONSUMER_NOT_FOUND = 5;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// Output only. An output-only field that indicates the state of the Kinesis
|
|
226
|
+
// ingestion source.
|
|
227
|
+
State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
228
|
+
|
|
229
|
+
// Required. The Kinesis stream ARN to ingest data from.
|
|
230
|
+
string stream_arn = 2 [(google.api.field_behavior) = REQUIRED];
|
|
231
|
+
|
|
232
|
+
// Required. The Kinesis consumer ARN to used for ingestion in Enhanced
|
|
233
|
+
// Fan-Out mode. The consumer must be already created and ready to be used.
|
|
234
|
+
string consumer_arn = 3 [(google.api.field_behavior) = REQUIRED];
|
|
235
|
+
|
|
236
|
+
// Required. AWS role ARN to be used for Federated Identity authentication
|
|
237
|
+
// with Kinesis. Check the Pub/Sub docs for how to set up this role and the
|
|
238
|
+
// required permissions that need to be attached to it.
|
|
239
|
+
string aws_role_arn = 4 [(google.api.field_behavior) = REQUIRED];
|
|
240
|
+
|
|
241
|
+
// Required. The GCP service account to be used for Federated Identity
|
|
242
|
+
// authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for
|
|
243
|
+
// the provided role). The `aws_role_arn` must be set up with
|
|
244
|
+
// `accounts.google.com:sub` equals to this service account number.
|
|
245
|
+
string gcp_service_account = 5 [(google.api.field_behavior) = REQUIRED];
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Ingestion settings for Cloud Storage.
|
|
249
|
+
message CloudStorage {
|
|
250
|
+
// Possible states for ingestion from Cloud Storage.
|
|
251
|
+
enum State {
|
|
252
|
+
// Default value. This value is unused.
|
|
253
|
+
STATE_UNSPECIFIED = 0;
|
|
254
|
+
|
|
255
|
+
// Ingestion is active.
|
|
256
|
+
ACTIVE = 1;
|
|
257
|
+
|
|
258
|
+
// Permission denied encountered while calling the Cloud Storage API. This
|
|
259
|
+
// can happen if the Pub/Sub SA has not been granted the
|
|
260
|
+
// [appropriate
|
|
261
|
+
// permissions](https://cloud.google.com/storage/docs/access-control/iam-permissions):
|
|
262
|
+
// - storage.objects.list: to list the objects in a bucket.
|
|
263
|
+
// - storage.objects.get: to read the objects in a bucket.
|
|
264
|
+
// - storage.buckets.get: to verify the bucket exists.
|
|
265
|
+
CLOUD_STORAGE_PERMISSION_DENIED = 2;
|
|
266
|
+
|
|
267
|
+
// Permission denied encountered while publishing to the topic. This can
|
|
268
|
+
// happen if the Pub/Sub SA has not been granted the [appropriate publish
|
|
269
|
+
// permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)
|
|
270
|
+
PUBLISH_PERMISSION_DENIED = 3;
|
|
271
|
+
|
|
272
|
+
// The provided Cloud Storage bucket doesn't exist.
|
|
273
|
+
BUCKET_NOT_FOUND = 4;
|
|
274
|
+
|
|
275
|
+
// The Cloud Storage bucket has too many objects, ingestion will be
|
|
276
|
+
// paused.
|
|
277
|
+
TOO_MANY_OBJECTS = 5;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// Configuration for reading Cloud Storage data in text format. Each line of
|
|
281
|
+
// text as specified by the delimiter will be set to the `data` field of a
|
|
282
|
+
// Pub/Sub message.
|
|
283
|
+
message TextFormat {
|
|
284
|
+
// Optional. When unset, '\n' is used.
|
|
285
|
+
optional string delimiter = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// Configuration for reading Cloud Storage data in Avro binary format. The
|
|
289
|
+
// bytes of each object will be set to the `data` field of a Pub/Sub
|
|
290
|
+
// message.
|
|
291
|
+
message AvroFormat {}
|
|
292
|
+
|
|
293
|
+
// Configuration for reading Cloud Storage data written via [Cloud Storage
|
|
294
|
+
// subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage). The
|
|
295
|
+
// data and attributes fields of the originally exported Pub/Sub message
|
|
296
|
+
// will be restored when publishing.
|
|
297
|
+
message PubSubAvroFormat {}
|
|
298
|
+
|
|
299
|
+
// Output only. An output-only field that indicates the state of the Cloud
|
|
300
|
+
// Storage ingestion source.
|
|
301
|
+
State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
302
|
+
|
|
303
|
+
// Optional. Cloud Storage bucket. The bucket name must be without any
|
|
304
|
+
// prefix like "gs://". See the [bucket naming requirements]
|
|
305
|
+
// (https://cloud.google.com/storage/docs/buckets#naming).
|
|
306
|
+
string bucket = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
307
|
+
|
|
308
|
+
// Defaults to text format.
|
|
309
|
+
oneof input_format {
|
|
310
|
+
// Optional. Data from Cloud Storage will be interpreted as text.
|
|
311
|
+
TextFormat text_format = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
312
|
+
|
|
313
|
+
// Optional. Data from Cloud Storage will be interpreted in Avro format.
|
|
314
|
+
AvroFormat avro_format = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
315
|
+
|
|
316
|
+
// Optional. It will be assumed data from Cloud Storage was written via
|
|
317
|
+
// [Cloud Storage
|
|
318
|
+
// subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
|
|
319
|
+
PubSubAvroFormat pubsub_avro_format = 5
|
|
320
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// Optional. Only objects with a larger or equal creation timestamp will be
|
|
324
|
+
// ingested.
|
|
325
|
+
google.protobuf.Timestamp minimum_object_create_time = 6
|
|
326
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
327
|
+
|
|
328
|
+
// Optional. Glob pattern used to match objects that will be ingested. If
|
|
329
|
+
// unset, all objects will be ingested. See the [supported
|
|
330
|
+
// patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).
|
|
331
|
+
string match_glob = 9 [(google.api.field_behavior) = OPTIONAL];
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// Ingestion settings for Azure Event Hubs.
|
|
335
|
+
message AzureEventHubs {
|
|
336
|
+
// Possible states for managed ingestion from Event Hubs.
|
|
337
|
+
enum State {
|
|
338
|
+
// Default value. This value is unused.
|
|
339
|
+
STATE_UNSPECIFIED = 0;
|
|
340
|
+
|
|
341
|
+
// Ingestion is active.
|
|
342
|
+
ACTIVE = 1;
|
|
343
|
+
|
|
344
|
+
// Permission denied encountered while consuming data from Event Hubs.
|
|
345
|
+
// This can happen when `client_id`, or `tenant_id` are invalid. Or the
|
|
346
|
+
// right permissions haven't been granted.
|
|
347
|
+
EVENT_HUBS_PERMISSION_DENIED = 2;
|
|
348
|
+
|
|
349
|
+
// Permission denied encountered while publishing to the topic.
|
|
350
|
+
PUBLISH_PERMISSION_DENIED = 3;
|
|
351
|
+
|
|
352
|
+
// The provided Event Hubs namespace couldn't be found.
|
|
353
|
+
NAMESPACE_NOT_FOUND = 4;
|
|
354
|
+
|
|
355
|
+
// The provided Event Hub couldn't be found.
|
|
356
|
+
EVENT_HUB_NOT_FOUND = 5;
|
|
357
|
+
|
|
358
|
+
// The provided Event Hubs subscription couldn't be found.
|
|
359
|
+
SUBSCRIPTION_NOT_FOUND = 6;
|
|
360
|
+
|
|
361
|
+
// The provided Event Hubs resource group couldn't be found.
|
|
362
|
+
RESOURCE_GROUP_NOT_FOUND = 7;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// Output only. An output-only field that indicates the state of the Event
|
|
366
|
+
// Hubs ingestion source.
|
|
367
|
+
State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
368
|
+
|
|
369
|
+
// Optional. Name of the resource group within the azure subscription.
|
|
370
|
+
string resource_group = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
371
|
+
|
|
372
|
+
// Optional. The name of the Event Hubs namespace.
|
|
373
|
+
string namespace = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
374
|
+
|
|
375
|
+
// Optional. The name of the Event Hub.
|
|
376
|
+
string event_hub = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
377
|
+
|
|
378
|
+
// Optional. The client id of the Azure application that is being used to
|
|
379
|
+
// authenticate Pub/Sub.
|
|
380
|
+
string client_id = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
381
|
+
|
|
382
|
+
// Optional. The tenant id of the Azure application that is being used to
|
|
383
|
+
// authenticate Pub/Sub.
|
|
384
|
+
string tenant_id = 6 [(google.api.field_behavior) = OPTIONAL];
|
|
385
|
+
|
|
386
|
+
// Optional. The Azure subscription id.
|
|
387
|
+
string subscription_id = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
388
|
+
|
|
389
|
+
// Optional. The GCP service account to be used for Federated Identity
|
|
390
|
+
// authentication.
|
|
391
|
+
string gcp_service_account = 8 [(google.api.field_behavior) = OPTIONAL];
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// Ingestion settings for Amazon MSK.
|
|
395
|
+
message AwsMsk {
|
|
396
|
+
// Possible states for managed ingestion from Amazon MSK.
|
|
397
|
+
enum State {
|
|
398
|
+
// Default value. This value is unused.
|
|
399
|
+
STATE_UNSPECIFIED = 0;
|
|
400
|
+
|
|
401
|
+
// Ingestion is active.
|
|
402
|
+
ACTIVE = 1;
|
|
403
|
+
|
|
404
|
+
// Permission denied encountered while consuming data from Amazon MSK.
|
|
405
|
+
MSK_PERMISSION_DENIED = 2;
|
|
406
|
+
|
|
407
|
+
// Permission denied encountered while publishing to the topic.
|
|
408
|
+
PUBLISH_PERMISSION_DENIED = 3;
|
|
409
|
+
|
|
410
|
+
// The provided MSK cluster wasn't found.
|
|
411
|
+
CLUSTER_NOT_FOUND = 4;
|
|
412
|
+
|
|
413
|
+
// The provided topic wasn't found.
|
|
414
|
+
TOPIC_NOT_FOUND = 5;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
// Output only. An output-only field that indicates the state of the Amazon
|
|
418
|
+
// MSK ingestion source.
|
|
419
|
+
State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
420
|
+
|
|
421
|
+
// Required. The Amazon Resource Name (ARN) that uniquely identifies the
|
|
422
|
+
// cluster.
|
|
423
|
+
string cluster_arn = 2 [(google.api.field_behavior) = REQUIRED];
|
|
424
|
+
|
|
425
|
+
// Required. The name of the topic in the Amazon MSK cluster that Pub/Sub
|
|
426
|
+
// will import from.
|
|
427
|
+
string topic = 3 [
|
|
428
|
+
(google.api.field_behavior) = REQUIRED,
|
|
429
|
+
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }
|
|
430
|
+
];
|
|
431
|
+
|
|
432
|
+
// Required. AWS role ARN to be used for Federated Identity authentication
|
|
433
|
+
// with Amazon MSK. Check the Pub/Sub docs for how to set up this role and
|
|
434
|
+
// the required permissions that need to be attached to it.
|
|
435
|
+
string aws_role_arn = 4 [(google.api.field_behavior) = REQUIRED];
|
|
436
|
+
|
|
437
|
+
// Required. The GCP service account to be used for Federated Identity
|
|
438
|
+
// authentication with Amazon MSK (via a `AssumeRoleWithWebIdentity` call
|
|
439
|
+
// for the provided role). The `aws_role_arn` must be set up with
|
|
440
|
+
// `accounts.google.com:sub` equals to this service account number.
|
|
441
|
+
string gcp_service_account = 5 [(google.api.field_behavior) = REQUIRED];
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
// Ingestion settings for Confluent Cloud.
|
|
445
|
+
message ConfluentCloud {
|
|
446
|
+
// Possible states for managed ingestion from Confluent Cloud.
|
|
447
|
+
enum State {
|
|
448
|
+
// Default value. This value is unused.
|
|
449
|
+
STATE_UNSPECIFIED = 0;
|
|
450
|
+
|
|
451
|
+
// Ingestion is active.
|
|
452
|
+
ACTIVE = 1;
|
|
453
|
+
|
|
454
|
+
// Permission denied encountered while consuming data from Confluent
|
|
455
|
+
// Cloud.
|
|
456
|
+
CONFLUENT_CLOUD_PERMISSION_DENIED = 2;
|
|
457
|
+
|
|
458
|
+
// Permission denied encountered while publishing to the topic.
|
|
459
|
+
PUBLISH_PERMISSION_DENIED = 3;
|
|
460
|
+
|
|
461
|
+
// The provided bootstrap server address is unreachable.
|
|
462
|
+
UNREACHABLE_BOOTSTRAP_SERVER = 4;
|
|
463
|
+
|
|
464
|
+
// The provided cluster wasn't found.
|
|
465
|
+
CLUSTER_NOT_FOUND = 5;
|
|
466
|
+
|
|
467
|
+
// The provided topic wasn't found.
|
|
468
|
+
TOPIC_NOT_FOUND = 6;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
// Output only. An output-only field that indicates the state of the
|
|
472
|
+
// Confluent Cloud ingestion source.
|
|
473
|
+
State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
474
|
+
|
|
475
|
+
// Required. The address of the bootstrap server. The format is url:port.
|
|
476
|
+
string bootstrap_server = 2 [(google.api.field_behavior) = REQUIRED];
|
|
477
|
+
|
|
478
|
+
// Required. The id of the cluster.
|
|
479
|
+
string cluster_id = 3 [(google.api.field_behavior) = REQUIRED];
|
|
480
|
+
|
|
481
|
+
// Required. The name of the topic in the Confluent Cloud cluster that
|
|
482
|
+
// Pub/Sub will import from.
|
|
483
|
+
string topic = 4 [(google.api.field_behavior) = REQUIRED];
|
|
484
|
+
|
|
485
|
+
// Required. The id of the identity pool to be used for Federated Identity
|
|
486
|
+
// authentication with Confluent Cloud. See
|
|
487
|
+
// https://docs.confluent.io/cloud/current/security/authenticate/workload-identities/identity-providers/oauth/identity-pools.html#add-oauth-identity-pools.
|
|
488
|
+
string identity_pool_id = 5 [(google.api.field_behavior) = REQUIRED];
|
|
489
|
+
|
|
490
|
+
// Required. The GCP service account to be used for Federated Identity
|
|
491
|
+
// authentication with `identity_pool_id`.
|
|
492
|
+
string gcp_service_account = 6 [(google.api.field_behavior) = REQUIRED];
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
// Only one source type can have settings set.
|
|
496
|
+
oneof source {
|
|
497
|
+
// Optional. Amazon Kinesis Data Streams.
|
|
498
|
+
AwsKinesis aws_kinesis = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
499
|
+
|
|
500
|
+
// Optional. Cloud Storage.
|
|
501
|
+
CloudStorage cloud_storage = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
502
|
+
|
|
503
|
+
// Optional. Azure Event Hubs.
|
|
504
|
+
AzureEventHubs azure_event_hubs = 3
|
|
505
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
506
|
+
|
|
507
|
+
// Optional. Amazon MSK.
|
|
508
|
+
AwsMsk aws_msk = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
509
|
+
|
|
510
|
+
// Optional. Confluent Cloud.
|
|
511
|
+
ConfluentCloud confluent_cloud = 6 [(google.api.field_behavior) = OPTIONAL];
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
// Optional. Platform Logs settings. If unset, no Platform Logs will be
|
|
515
|
+
// generated.
|
|
516
|
+
PlatformLogsSettings platform_logs_settings = 4
|
|
517
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
// Settings for Platform Logs produced by Pub/Sub.
|
|
521
|
+
message PlatformLogsSettings {
|
|
522
|
+
// Severity levels of Platform Logs.
|
|
523
|
+
enum Severity {
|
|
524
|
+
// Default value. Logs level is unspecified. Logs will be disabled.
|
|
525
|
+
SEVERITY_UNSPECIFIED = 0;
|
|
526
|
+
|
|
527
|
+
// Logs will be disabled.
|
|
528
|
+
DISABLED = 1;
|
|
529
|
+
|
|
530
|
+
// Debug logs and higher-severity logs will be written.
|
|
531
|
+
DEBUG = 2;
|
|
532
|
+
|
|
533
|
+
// Info logs and higher-severity logs will be written.
|
|
534
|
+
INFO = 3;
|
|
535
|
+
|
|
536
|
+
// Warning logs and higher-severity logs will be written.
|
|
537
|
+
WARNING = 4;
|
|
538
|
+
|
|
539
|
+
// Only error logs will be written.
|
|
540
|
+
ERROR = 5;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
// Optional. The minimum severity level of Platform Logs that will be written.
|
|
544
|
+
Severity severity = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
// Payload of the Platform Log entry sent when a failure is encountered while
|
|
548
|
+
// ingesting.
|
|
549
|
+
message IngestionFailureEvent {
|
|
550
|
+
// Specifies the reason why some data may have been left out of
|
|
551
|
+
// the desired Pub/Sub message due to the API message limits
|
|
552
|
+
// (https://cloud.google.com/pubsub/quotas#resource_limits). For example,
|
|
553
|
+
// when the number of attributes is larger than 100, the number of
|
|
554
|
+
// attributes is truncated to 100 to respect the limit on the attribute count.
|
|
555
|
+
// Other attribute limits are treated similarly. When the size of the desired
|
|
556
|
+
// message would've been larger than 10MB, the message won't be published at
|
|
557
|
+
// all, and ingestion of the subsequent messages will proceed as normal.
|
|
558
|
+
message ApiViolationReason {}
|
|
559
|
+
|
|
560
|
+
// Set when an Avro file is unsupported or its format is not valid. When this
|
|
561
|
+
// occurs, one or more Avro objects won't be ingested.
|
|
562
|
+
message AvroFailureReason {}
|
|
563
|
+
|
|
564
|
+
// Set when a Pub/Sub message fails to get published due to a schema
|
|
565
|
+
// validation violation.
|
|
566
|
+
message SchemaViolationReason {}
|
|
567
|
+
|
|
568
|
+
// Set when a Pub/Sub message fails to get published due to a message
|
|
569
|
+
// transformation error.
|
|
570
|
+
message MessageTransformationFailureReason {}
|
|
571
|
+
|
|
572
|
+
// Failure when ingesting from a Cloud Storage source.
|
|
573
|
+
message CloudStorageFailure {
|
|
574
|
+
// Optional. Name of the Cloud Storage bucket used for ingestion.
|
|
575
|
+
string bucket = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
576
|
+
|
|
577
|
+
// Optional. Name of the Cloud Storage object which contained the section
|
|
578
|
+
// that couldn't be ingested.
|
|
579
|
+
string object_name = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
580
|
+
|
|
581
|
+
// Optional. Generation of the Cloud Storage object which contained the
|
|
582
|
+
// section that couldn't be ingested.
|
|
583
|
+
int64 object_generation = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
584
|
+
|
|
585
|
+
// Reason why ingestion failed for the specified object.
|
|
586
|
+
oneof reason {
|
|
587
|
+
// Optional. Failure encountered when parsing an Avro file.
|
|
588
|
+
AvroFailureReason avro_failure_reason = 5
|
|
589
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
590
|
+
|
|
591
|
+
// Optional. The Pub/Sub API limits prevented the desired message from
|
|
592
|
+
// being published.
|
|
593
|
+
ApiViolationReason api_violation_reason = 6
|
|
594
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
595
|
+
|
|
596
|
+
// Optional. The Pub/Sub message failed schema validation.
|
|
597
|
+
SchemaViolationReason schema_violation_reason = 7
|
|
598
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
599
|
+
|
|
600
|
+
// Optional. Failure encountered when applying a message transformation to
|
|
601
|
+
// the Pub/Sub message.
|
|
602
|
+
MessageTransformationFailureReason message_transformation_failure_reason =
|
|
603
|
+
8 [(google.api.field_behavior) = OPTIONAL];
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
// Failure when ingesting from an Amazon MSK source.
|
|
608
|
+
message AwsMskFailureReason {
|
|
609
|
+
// Optional. The ARN of the cluster of the topic being ingested from.
|
|
610
|
+
string cluster_arn = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
611
|
+
|
|
612
|
+
// Optional. The name of the Kafka topic being ingested from.
|
|
613
|
+
string kafka_topic = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
614
|
+
|
|
615
|
+
// Optional. The partition ID of the message that failed to be ingested.
|
|
616
|
+
int64 partition_id = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
617
|
+
|
|
618
|
+
// Optional. The offset within the partition of the message that failed to
|
|
619
|
+
// be ingested.
|
|
620
|
+
int64 offset = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
621
|
+
|
|
622
|
+
// Reason why ingestion failed for the specified message.
|
|
623
|
+
oneof reason {
|
|
624
|
+
// Optional. The Pub/Sub API limits prevented the desired message from
|
|
625
|
+
// being published.
|
|
626
|
+
ApiViolationReason api_violation_reason = 5
|
|
627
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
628
|
+
|
|
629
|
+
// Optional. The Pub/Sub message failed schema validation.
|
|
630
|
+
SchemaViolationReason schema_violation_reason = 6
|
|
631
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
632
|
+
|
|
633
|
+
// Optional. Failure encountered when applying a message transformation to
|
|
634
|
+
// the Pub/Sub message.
|
|
635
|
+
MessageTransformationFailureReason message_transformation_failure_reason =
|
|
636
|
+
7 [(google.api.field_behavior) = OPTIONAL];
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
// Failure when ingesting from an Azure Event Hubs source.
|
|
641
|
+
message AzureEventHubsFailureReason {
|
|
642
|
+
// Optional. The namespace containing the event hub being ingested from.
|
|
643
|
+
string namespace = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
644
|
+
|
|
645
|
+
// Optional. The name of the event hub being ingested from.
|
|
646
|
+
string event_hub = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
647
|
+
|
|
648
|
+
// Optional. The partition ID of the message that failed to be ingested.
|
|
649
|
+
int64 partition_id = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
650
|
+
|
|
651
|
+
// Optional. The offset within the partition of the message that failed to
|
|
652
|
+
// be ingested.
|
|
653
|
+
int64 offset = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
654
|
+
|
|
655
|
+
// Reason why ingestion failed for the specified message.
|
|
656
|
+
oneof reason {
|
|
657
|
+
// Optional. The Pub/Sub API limits prevented the desired message from
|
|
658
|
+
// being published.
|
|
659
|
+
ApiViolationReason api_violation_reason = 5
|
|
660
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
661
|
+
|
|
662
|
+
// Optional. The Pub/Sub message failed schema validation.
|
|
663
|
+
SchemaViolationReason schema_violation_reason = 6
|
|
664
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
665
|
+
|
|
666
|
+
// Optional. Failure encountered when applying a message transformation to
|
|
667
|
+
// the Pub/Sub message.
|
|
668
|
+
MessageTransformationFailureReason message_transformation_failure_reason =
|
|
669
|
+
7 [(google.api.field_behavior) = OPTIONAL];
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
// Failure when ingesting from a Confluent Cloud source.
|
|
674
|
+
message ConfluentCloudFailureReason {
|
|
675
|
+
// Optional. The cluster ID containing the topic being ingested from.
|
|
676
|
+
string cluster_id = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
677
|
+
|
|
678
|
+
// Optional. The name of the Kafka topic being ingested from.
|
|
679
|
+
string kafka_topic = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
680
|
+
|
|
681
|
+
// Optional. The partition ID of the message that failed to be ingested.
|
|
682
|
+
int64 partition_id = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
683
|
+
|
|
684
|
+
// Optional. The offset within the partition of the message that failed to
|
|
685
|
+
// be ingested.
|
|
686
|
+
int64 offset = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
687
|
+
|
|
688
|
+
// Reason why ingestion failed for the specified message.
|
|
689
|
+
oneof reason {
|
|
690
|
+
// Optional. The Pub/Sub API limits prevented the desired message from
|
|
691
|
+
// being published.
|
|
692
|
+
ApiViolationReason api_violation_reason = 5
|
|
693
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
694
|
+
|
|
695
|
+
// Optional. The Pub/Sub message failed schema validation.
|
|
696
|
+
SchemaViolationReason schema_violation_reason = 6
|
|
697
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
698
|
+
|
|
699
|
+
// Optional. Failure encountered when applying a message transformation to
|
|
700
|
+
// the Pub/Sub message.
|
|
701
|
+
MessageTransformationFailureReason message_transformation_failure_reason =
|
|
702
|
+
7 [(google.api.field_behavior) = OPTIONAL];
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
// Failure when ingesting from an AWS Kinesis source.
|
|
707
|
+
message AwsKinesisFailureReason {
|
|
708
|
+
// Optional. The stream ARN of the Kinesis stream being ingested from.
|
|
709
|
+
string stream_arn = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
710
|
+
|
|
711
|
+
// Optional. The partition key of the message that failed to be ingested.
|
|
712
|
+
string partition_key = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
713
|
+
|
|
714
|
+
// Optional. The sequence number of the message that failed to be ingested.
|
|
715
|
+
string sequence_number = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
716
|
+
|
|
717
|
+
// Reason why ingestion failed for the specified message.
|
|
718
|
+
oneof reason {
|
|
719
|
+
// Optional. The Pub/Sub message failed schema validation.
|
|
720
|
+
SchemaViolationReason schema_violation_reason = 4
|
|
721
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
722
|
+
|
|
723
|
+
// Optional. Failure encountered when applying a message transformation to
|
|
724
|
+
// the Pub/Sub message.
|
|
725
|
+
MessageTransformationFailureReason message_transformation_failure_reason =
|
|
726
|
+
5 [(google.api.field_behavior) = OPTIONAL];
|
|
727
|
+
|
|
728
|
+
// Optional. The message failed to be published due to an API violation.
|
|
729
|
+
// This is only set when the size of the data field of the Kinesis record
|
|
730
|
+
// is zero.
|
|
731
|
+
ApiViolationReason api_violation_reason = 6
|
|
732
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
// Required. Name of the import topic. Format is:
|
|
737
|
+
// projects/{project_name}/topics/{topic_name}.
|
|
738
|
+
string topic = 1 [
|
|
739
|
+
(google.api.field_behavior) = REQUIRED,
|
|
740
|
+
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }
|
|
741
|
+
];
|
|
742
|
+
|
|
743
|
+
// Required. Error details explaining why ingestion to Pub/Sub has failed.
|
|
744
|
+
string error_message = 2 [(google.api.field_behavior) = REQUIRED];
|
|
745
|
+
|
|
746
|
+
oneof failure {
|
|
747
|
+
// Optional. Failure when ingesting from Cloud Storage.
|
|
748
|
+
CloudStorageFailure cloud_storage_failure = 3
|
|
749
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
750
|
+
|
|
751
|
+
// Optional. Failure when ingesting from Amazon MSK.
|
|
752
|
+
AwsMskFailureReason aws_msk_failure = 4
|
|
753
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
754
|
+
|
|
755
|
+
// Optional. Failure when ingesting from Azure Event Hubs.
|
|
756
|
+
AzureEventHubsFailureReason azure_event_hubs_failure = 5
|
|
757
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
758
|
+
|
|
759
|
+
// Optional. Failure when ingesting from Confluent Cloud.
|
|
760
|
+
ConfluentCloudFailureReason confluent_cloud_failure = 6
|
|
761
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
762
|
+
|
|
763
|
+
// Optional. Failure when ingesting from AWS Kinesis.
|
|
764
|
+
AwsKinesisFailureReason aws_kinesis_failure = 7
|
|
765
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
// User-defined JavaScript function that can transform or filter a Pub/Sub
|
|
770
|
+
// message.
|
|
771
|
+
message JavaScriptUDF {
|
|
772
|
+
// Required. Name of the JavasScript function that should applied to Pub/Sub
|
|
773
|
+
// messages.
|
|
774
|
+
string function_name = 1 [(google.api.field_behavior) = REQUIRED];
|
|
775
|
+
|
|
776
|
+
// Required. JavaScript code that contains a function `function_name` with the
|
|
777
|
+
// below signature:
|
|
778
|
+
//
|
|
779
|
+
// ```
|
|
780
|
+
// /**
|
|
781
|
+
// * Transforms a Pub/Sub message.
|
|
782
|
+
//
|
|
783
|
+
// * @return {(Object<string, (string | Object<string, string>)>|null)} - To
|
|
784
|
+
// * filter a message, return `null`. To transform a message return a map
|
|
785
|
+
// * with the following keys:
|
|
786
|
+
// * - (required) 'data' : {string}
|
|
787
|
+
// * - (optional) 'attributes' : {Object<string, string>}
|
|
788
|
+
// * Returning empty `attributes` will remove all attributes from the
|
|
789
|
+
// * message.
|
|
790
|
+
// *
|
|
791
|
+
// * @param {(Object<string, (string | Object<string, string>)>} Pub/Sub
|
|
792
|
+
// * message. Keys:
|
|
793
|
+
// * - (required) 'data' : {string}
|
|
794
|
+
// * - (required) 'attributes' : {Object<string, string>}
|
|
795
|
+
// *
|
|
796
|
+
// * @param {Object<string, any>} metadata - Pub/Sub message metadata.
|
|
797
|
+
// * Keys:
|
|
798
|
+
// * - (optional) 'message_id' : {string}
|
|
799
|
+
// * - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format
|
|
800
|
+
// * - (optional) 'ordering_key': {string}
|
|
801
|
+
// */
|
|
802
|
+
//
|
|
803
|
+
// function <function_name>(message, metadata) {
|
|
804
|
+
// }
|
|
805
|
+
// ```
|
|
806
|
+
string code = 2 [(google.api.field_behavior) = REQUIRED];
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
// Configuration for making inference requests against Vertex AI models.
|
|
810
|
+
message AIInference {
|
|
811
|
+
// Configuration for making inferences using arbitrary JSON payloads.
|
|
812
|
+
message UnstructuredInference {
|
|
813
|
+
// Optional. A parameters object to be included in each inference request.
|
|
814
|
+
// The parameters object is combined with the data field of the Pub/Sub
|
|
815
|
+
// message to form the inference request.
|
|
816
|
+
google.protobuf.Struct parameters = 1
|
|
817
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
// Required. An endpoint to a Vertex AI model of the form
|
|
821
|
+
// `projects/{project}/locations/{location}/endpoints/{endpoint}` or
|
|
822
|
+
// `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`.
|
|
823
|
+
// Vertex AI API requests will be sent to this endpoint.
|
|
824
|
+
string endpoint = 1 [(google.api.field_behavior) = REQUIRED];
|
|
825
|
+
|
|
826
|
+
// The format of inference requests made to the endpoint.
|
|
827
|
+
oneof inference_mode {
|
|
828
|
+
// Optional. Requests and responses can be any arbitrary JSON object.
|
|
829
|
+
UnstructuredInference unstructured_inference = 2
|
|
830
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
// Optional. The service account to use to make prediction requests against
|
|
834
|
+
// endpoints. The resource creator or updater that specifies this field must
|
|
835
|
+
// have `iam.serviceAccounts.actAs` permission on the service account. If not
|
|
836
|
+
// specified, the Pub/Sub [service
|
|
837
|
+
// agent](https://cloud.google.com/iam/docs/service-agents),
|
|
838
|
+
// service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
|
|
839
|
+
string service_account_email = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
// All supported message transforms types.
|
|
843
|
+
message MessageTransform {
|
|
844
|
+
// The type of transform to apply to messages.
|
|
845
|
+
oneof transform {
|
|
846
|
+
// Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
|
|
847
|
+
// are specified on a resource, each must have a unique `function_name`.
|
|
848
|
+
JavaScriptUDF javascript_udf = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
849
|
+
|
|
850
|
+
// Optional. AI Inference. Specifies the Vertex AI endpoint that inference
|
|
851
|
+
// requests built from the Pub/Sub message data and provided parameters will
|
|
852
|
+
// be sent to.
|
|
853
|
+
AIInference ai_inference = 6 [(google.api.field_behavior) = OPTIONAL];
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
// Optional. This field is deprecated, use the `disabled` field to disable
|
|
857
|
+
// transforms.
|
|
858
|
+
bool enabled = 3 [deprecated = true, (google.api.field_behavior) = OPTIONAL];
|
|
859
|
+
|
|
860
|
+
// Optional. If true, the transform is disabled and will not be applied to
|
|
861
|
+
// messages. Defaults to `false`.
|
|
862
|
+
bool disabled = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
// A topic resource.
|
|
866
|
+
message Topic {
|
|
867
|
+
option (google.api.resource) = {
|
|
868
|
+
type: "pubsub.googleapis.com/Topic"
|
|
869
|
+
pattern: "projects/{project}/topics/{topic}"
|
|
870
|
+
pattern: "_deleted-topic_"
|
|
871
|
+
plural: "topics"
|
|
872
|
+
singular: "topic"
|
|
873
|
+
};
|
|
874
|
+
|
|
875
|
+
// The state of the topic.
|
|
876
|
+
enum State {
|
|
877
|
+
// Default value. This value is unused.
|
|
878
|
+
STATE_UNSPECIFIED = 0;
|
|
879
|
+
|
|
880
|
+
// The topic does not have any persistent errors.
|
|
881
|
+
ACTIVE = 1;
|
|
882
|
+
|
|
883
|
+
// Ingestion from the data source has encountered a permanent error.
|
|
884
|
+
// See the more detailed error state in the corresponding ingestion
|
|
885
|
+
// source configuration.
|
|
886
|
+
INGESTION_RESOURCE_ERROR = 2;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
// Required. Identifier. The name of the topic. It must have the format
|
|
890
|
+
// `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
|
|
891
|
+
// and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
|
|
892
|
+
// underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
|
|
893
|
+
// signs (`%`). It must be between 3 and 255 characters in length, and it
|
|
894
|
+
// must not start with `"goog"`.
|
|
895
|
+
string name = 1 [
|
|
896
|
+
(google.api.field_behavior) = REQUIRED,
|
|
897
|
+
(google.api.field_behavior) = IDENTIFIER
|
|
898
|
+
];
|
|
899
|
+
|
|
900
|
+
// Optional. See [Creating and managing labels]
|
|
901
|
+
// (https://cloud.google.com/pubsub/docs/labels).
|
|
902
|
+
map<string, string> labels = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
903
|
+
|
|
904
|
+
// Optional. Policy constraining the set of Google Cloud Platform regions
|
|
905
|
+
// where messages published to the topic may be stored. If not present, then
|
|
906
|
+
// no constraints are in effect.
|
|
907
|
+
MessageStoragePolicy message_storage_policy = 3
|
|
908
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
909
|
+
|
|
910
|
+
// Optional. The resource name of the Cloud KMS CryptoKey to be used to
|
|
911
|
+
// protect access to messages published on this topic.
|
|
912
|
+
//
|
|
913
|
+
// The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
|
|
914
|
+
string kms_key_name = 5 [
|
|
915
|
+
(google.api.field_behavior) = OPTIONAL,
|
|
916
|
+
(google.api.resource_reference) = {
|
|
917
|
+
type: "cloudkms.googleapis.com/CryptoKey"
|
|
918
|
+
}
|
|
919
|
+
];
|
|
920
|
+
|
|
921
|
+
// Optional. Settings for validating messages published against a schema.
|
|
922
|
+
SchemaSettings schema_settings = 6 [(google.api.field_behavior) = OPTIONAL];
|
|
923
|
+
|
|
924
|
+
// Optional. Reserved for future use. This field is set only in responses from
|
|
925
|
+
// the server; it is ignored if it is set in any requests.
|
|
926
|
+
bool satisfies_pzs = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
927
|
+
|
|
928
|
+
// Optional. Indicates the minimum duration to retain a message after it is
|
|
929
|
+
// published to the topic. If this field is set, messages published to the
|
|
930
|
+
// topic in the last `message_retention_duration` are always available to
|
|
931
|
+
// subscribers. For instance, it allows any attached subscription to [seek to
|
|
932
|
+
// a
|
|
933
|
+
// timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time)
|
|
934
|
+
// that is up to `message_retention_duration` in the past. If this field is
|
|
935
|
+
// not set, message retention is controlled by settings on individual
|
|
936
|
+
// subscriptions. Cannot be more than 31 days or less than 10 minutes.
|
|
937
|
+
google.protobuf.Duration message_retention_duration = 8
|
|
938
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
939
|
+
|
|
940
|
+
// Output only. An output-only field indicating the state of the topic.
|
|
941
|
+
State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
942
|
+
|
|
943
|
+
// Optional. Settings for ingestion from a data source into this topic.
|
|
944
|
+
IngestionDataSourceSettings ingestion_data_source_settings = 10
|
|
945
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
946
|
+
|
|
947
|
+
// Optional. Transforms to be applied to messages published to the topic.
|
|
948
|
+
// Transforms are applied in the order specified.
|
|
949
|
+
repeated MessageTransform message_transforms = 13
|
|
950
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
951
|
+
|
|
952
|
+
// Optional. Input only. Immutable. Tag keys/values directly bound to this
|
|
953
|
+
// resource. For example:
|
|
954
|
+
// "123/environment": "production",
|
|
955
|
+
// "123/costCenter": "marketing"
|
|
956
|
+
// See https://docs.cloud.google.com/pubsub/docs/tags for more information on
|
|
957
|
+
// using tags with Pub/Sub resources.
|
|
958
|
+
map<string, string> tags = 14 [
|
|
959
|
+
(google.api.field_behavior) = INPUT_ONLY,
|
|
960
|
+
(google.api.field_behavior) = IMMUTABLE,
|
|
961
|
+
(google.api.field_behavior) = OPTIONAL
|
|
962
|
+
];
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
// A message that is published by publishers and consumed by subscribers. The
|
|
966
|
+
// message must contain either a non-empty data field or at least one attribute.
|
|
967
|
+
// Note that client libraries represent this object differently
|
|
968
|
+
// depending on the language. See the corresponding [client library
|
|
969
|
+
// documentation](https://cloud.google.com/pubsub/docs/reference/libraries) for
|
|
970
|
+
// more information. See [quotas and limits]
|
|
971
|
+
// (https://cloud.google.com/pubsub/quotas) for more information about message
|
|
972
|
+
// limits.
|
|
973
|
+
message PubsubMessage {
|
|
974
|
+
// Optional. The message data field. If this field is empty, the message must
|
|
975
|
+
// contain at least one attribute.
|
|
976
|
+
bytes data = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
977
|
+
|
|
978
|
+
// Optional. Attributes for this message. If this field is empty, the message
|
|
979
|
+
// must contain non-empty data. This can be used to filter messages on the
|
|
980
|
+
// subscription.
|
|
981
|
+
map<string, string> attributes = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
982
|
+
|
|
983
|
+
// ID of this message, assigned by the server when the message is published.
|
|
984
|
+
// Guaranteed to be unique within the topic. This value may be read by a
|
|
985
|
+
// subscriber that receives a `PubsubMessage` via a `Pull` call or a push
|
|
986
|
+
// delivery. It must not be populated by the publisher in a `Publish` call.
|
|
987
|
+
string message_id = 3;
|
|
988
|
+
|
|
989
|
+
// The time at which the message was published, populated by the server when
|
|
990
|
+
// it receives the `Publish` call. It must not be populated by the
|
|
991
|
+
// publisher in a `Publish` call.
|
|
992
|
+
google.protobuf.Timestamp publish_time = 4;
|
|
993
|
+
|
|
994
|
+
// Optional. If non-empty, identifies related messages for which publish order
|
|
995
|
+
// should be respected. If a `Subscription` has `enable_message_ordering` set
|
|
996
|
+
// to `true`, messages published with the same non-empty `ordering_key` value
|
|
997
|
+
// will be delivered to subscribers in the order in which they are received by
|
|
998
|
+
// the Pub/Sub system. All `PubsubMessage`s published in a given
|
|
999
|
+
// `PublishRequest` must specify the same `ordering_key` value. For more
|
|
1000
|
+
// information, see [ordering
|
|
1001
|
+
// messages](https://cloud.google.com/pubsub/docs/ordering).
|
|
1002
|
+
string ordering_key = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
// Request for the GetTopic method.
|
|
1006
|
+
message GetTopicRequest {
|
|
1007
|
+
// Required. The name of the topic to get.
|
|
1008
|
+
// Format is `projects/{project}/topics/{topic}`.
|
|
1009
|
+
string topic = 1 [
|
|
1010
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1011
|
+
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }
|
|
1012
|
+
];
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
// Request for the UpdateTopic method.
|
|
1016
|
+
message UpdateTopicRequest {
|
|
1017
|
+
// Required. The updated topic object.
|
|
1018
|
+
Topic topic = 1 [(google.api.field_behavior) = REQUIRED];
|
|
1019
|
+
|
|
1020
|
+
// Required. Indicates which fields in the provided topic to update. Must be
|
|
1021
|
+
// specified and non-empty. Note that if `update_mask` contains
|
|
1022
|
+
// "message_storage_policy" but the `message_storage_policy` is not set in
|
|
1023
|
+
// the `topic` provided above, then the updated value is determined by the
|
|
1024
|
+
// policy configured at the project or organization level.
|
|
1025
|
+
google.protobuf.FieldMask update_mask = 2
|
|
1026
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
// Request for the Publish method.
|
|
1030
|
+
message PublishRequest {
|
|
1031
|
+
// Required. The messages in the request will be published on this topic.
|
|
1032
|
+
// Format is `projects/{project}/topics/{topic}`.
|
|
1033
|
+
string topic = 1 [
|
|
1034
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1035
|
+
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }
|
|
1036
|
+
];
|
|
1037
|
+
|
|
1038
|
+
// Required. The messages to publish.
|
|
1039
|
+
repeated PubsubMessage messages = 2 [(google.api.field_behavior) = REQUIRED];
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
// Response for the `Publish` method.
|
|
1043
|
+
message PublishResponse {
|
|
1044
|
+
// Optional. The server-assigned ID of each published message, in the same
|
|
1045
|
+
// order as the messages in the request. IDs are guaranteed to be unique
|
|
1046
|
+
// within the topic.
|
|
1047
|
+
repeated string message_ids = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
// Request for the `ListTopics` method.
|
|
1051
|
+
message ListTopicsRequest {
|
|
1052
|
+
// Required. The name of the project in which to list topics.
|
|
1053
|
+
// Format is `projects/{project-id}`.
|
|
1054
|
+
string project = 1 [
|
|
1055
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1056
|
+
(google.api.resource_reference) = {
|
|
1057
|
+
type: "cloudresourcemanager.googleapis.com/Project"
|
|
1058
|
+
}
|
|
1059
|
+
];
|
|
1060
|
+
|
|
1061
|
+
// Optional. Maximum number of topics to return.
|
|
1062
|
+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
1063
|
+
|
|
1064
|
+
// Optional. The value returned by the last `ListTopicsResponse`; indicates
|
|
1065
|
+
// that this is a continuation of a prior `ListTopics` call, and that the
|
|
1066
|
+
// system should return the next page of data.
|
|
1067
|
+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
// Response for the `ListTopics` method.
|
|
1071
|
+
message ListTopicsResponse {
|
|
1072
|
+
// Optional. The resulting topics.
|
|
1073
|
+
repeated Topic topics = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
1074
|
+
|
|
1075
|
+
// Optional. If not empty, indicates that there may be more topics that match
|
|
1076
|
+
// the request; this value should be passed in a new `ListTopicsRequest`.
|
|
1077
|
+
string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
// Request for the `ListTopicSubscriptions` method.
|
|
1081
|
+
message ListTopicSubscriptionsRequest {
|
|
1082
|
+
// Required. The name of the topic that subscriptions are attached to.
|
|
1083
|
+
// Format is `projects/{project}/topics/{topic}`.
|
|
1084
|
+
string topic = 1 [
|
|
1085
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1086
|
+
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }
|
|
1087
|
+
];
|
|
1088
|
+
|
|
1089
|
+
// Optional. Maximum number of subscription names to return.
|
|
1090
|
+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
1091
|
+
|
|
1092
|
+
// Optional. The value returned by the last `ListTopicSubscriptionsResponse`;
|
|
1093
|
+
// indicates that this is a continuation of a prior `ListTopicSubscriptions`
|
|
1094
|
+
// call, and that the system should return the next page of data.
|
|
1095
|
+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
// Response for the `ListTopicSubscriptions` method.
|
|
1099
|
+
message ListTopicSubscriptionsResponse {
|
|
1100
|
+
// Optional. The names of subscriptions attached to the topic specified in the
|
|
1101
|
+
// request.
|
|
1102
|
+
repeated string subscriptions = 1 [
|
|
1103
|
+
(google.api.field_behavior) = OPTIONAL,
|
|
1104
|
+
(google.api.resource_reference) = {
|
|
1105
|
+
type: "pubsub.googleapis.com/Subscription"
|
|
1106
|
+
}
|
|
1107
|
+
];
|
|
1108
|
+
|
|
1109
|
+
// Optional. If not empty, indicates that there may be more subscriptions that
|
|
1110
|
+
// match the request; this value should be passed in a new
|
|
1111
|
+
// `ListTopicSubscriptionsRequest` to get more subscriptions.
|
|
1112
|
+
string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
// Request for the `ListTopicSnapshots` method.
|
|
1116
|
+
message ListTopicSnapshotsRequest {
|
|
1117
|
+
// Required. The name of the topic that snapshots are attached to.
|
|
1118
|
+
// Format is `projects/{project}/topics/{topic}`.
|
|
1119
|
+
string topic = 1 [
|
|
1120
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1121
|
+
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }
|
|
1122
|
+
];
|
|
1123
|
+
|
|
1124
|
+
// Optional. Maximum number of snapshot names to return.
|
|
1125
|
+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
1126
|
+
|
|
1127
|
+
// Optional. The value returned by the last `ListTopicSnapshotsResponse`;
|
|
1128
|
+
// indicates that this is a continuation of a prior `ListTopicSnapshots` call,
|
|
1129
|
+
// and that the system should return the next page of data.
|
|
1130
|
+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
// Response for the `ListTopicSnapshots` method.
|
|
1134
|
+
message ListTopicSnapshotsResponse {
|
|
1135
|
+
// Optional. The names of the snapshots that match the request.
|
|
1136
|
+
repeated string snapshots = 1 [
|
|
1137
|
+
(google.api.field_behavior) = OPTIONAL,
|
|
1138
|
+
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Snapshot" }
|
|
1139
|
+
];
|
|
1140
|
+
|
|
1141
|
+
// Optional. If not empty, indicates that there may be more snapshots that
|
|
1142
|
+
// match the request; this value should be passed in a new
|
|
1143
|
+
// `ListTopicSnapshotsRequest` to get more snapshots.
|
|
1144
|
+
string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
// Request for the `DeleteTopic` method.
|
|
1148
|
+
message DeleteTopicRequest {
|
|
1149
|
+
// Required. Name of the topic to delete.
|
|
1150
|
+
// Format is `projects/{project}/topics/{topic}`.
|
|
1151
|
+
string topic = 1 [
|
|
1152
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1153
|
+
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }
|
|
1154
|
+
];
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
// Request for the DetachSubscription method.
|
|
1158
|
+
message DetachSubscriptionRequest {
|
|
1159
|
+
// Required. The subscription to detach.
|
|
1160
|
+
// Format is `projects/{project}/subscriptions/{subscription}`.
|
|
1161
|
+
string subscription = 1 [
|
|
1162
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1163
|
+
(google.api.resource_reference) = {
|
|
1164
|
+
type: "pubsub.googleapis.com/Subscription"
|
|
1165
|
+
}
|
|
1166
|
+
];
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
// Response for the DetachSubscription method.
|
|
1170
|
+
// Reserved for future use.
|
|
1171
|
+
message DetachSubscriptionResponse {}
|
|
1172
|
+
|
|
1173
|
+
// The service that an application uses to manipulate subscriptions and to
|
|
1174
|
+
// consume messages from a subscription via the `Pull` method or by
|
|
1175
|
+
// establishing a bi-directional stream using the `StreamingPull` method.
|
|
1176
|
+
service Subscriber {
|
|
1177
|
+
option (google.api.default_host) = "pubsub.googleapis.com";
|
|
1178
|
+
option (google.api.oauth_scopes) =
|
|
1179
|
+
"https://www.googleapis.com/auth/cloud-platform,"
|
|
1180
|
+
"https://www.googleapis.com/auth/pubsub";
|
|
1181
|
+
|
|
1182
|
+
// Creates a subscription to a given topic. See the [resource name rules]
|
|
1183
|
+
// (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
|
|
1184
|
+
// If the subscription already exists, returns `ALREADY_EXISTS`.
|
|
1185
|
+
// If the corresponding topic doesn't exist, returns `NOT_FOUND`.
|
|
1186
|
+
//
|
|
1187
|
+
// If the name is not provided in the request, the server will assign a random
|
|
1188
|
+
// name for this subscription on the same project as the topic, conforming
|
|
1189
|
+
// to the [resource name format]
|
|
1190
|
+
// (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
|
|
1191
|
+
// generated name is populated in the returned Subscription object. Note that
|
|
1192
|
+
// for REST API requests, you must specify a name in the request.
|
|
1193
|
+
rpc CreateSubscription(Subscription) returns (Subscription) {
|
|
1194
|
+
option (google.api.http) = {
|
|
1195
|
+
put: "/v1/{name=projects/*/subscriptions/*}"
|
|
1196
|
+
body: "*"
|
|
1197
|
+
};
|
|
1198
|
+
option (google.api.method_signature) =
|
|
1199
|
+
"name,topic,push_config,ack_deadline_seconds";
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
// Gets the configuration details of a subscription.
|
|
1203
|
+
rpc GetSubscription(GetSubscriptionRequest) returns (Subscription) {
|
|
1204
|
+
option (google.api.http) = {
|
|
1205
|
+
get: "/v1/{subscription=projects/*/subscriptions/*}"
|
|
1206
|
+
};
|
|
1207
|
+
option (google.api.method_signature) = "subscription";
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
// Updates an existing subscription by updating the fields specified in the
|
|
1211
|
+
// update mask. Note that certain properties of a subscription, such as its
|
|
1212
|
+
// topic, are not modifiable.
|
|
1213
|
+
rpc UpdateSubscription(UpdateSubscriptionRequest) returns (Subscription) {
|
|
1214
|
+
option (google.api.http) = {
|
|
1215
|
+
patch: "/v1/{subscription.name=projects/*/subscriptions/*}"
|
|
1216
|
+
body: "*"
|
|
1217
|
+
};
|
|
1218
|
+
option (google.api.method_signature) = "subscription,update_mask";
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
// Lists matching subscriptions.
|
|
1222
|
+
rpc ListSubscriptions(ListSubscriptionsRequest)
|
|
1223
|
+
returns (ListSubscriptionsResponse) {
|
|
1224
|
+
option (google.api.http) = {
|
|
1225
|
+
get: "/v1/{project=projects/*}/subscriptions"
|
|
1226
|
+
};
|
|
1227
|
+
option (google.api.method_signature) = "project";
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
// Deletes an existing subscription. All messages retained in the subscription
|
|
1231
|
+
// are immediately dropped. Calls to `Pull` after deletion will return
|
|
1232
|
+
// `NOT_FOUND`. After a subscription is deleted, a new one may be created with
|
|
1233
|
+
// the same name, but the new one has no association with the old
|
|
1234
|
+
// subscription or its topic unless the same topic is specified.
|
|
1235
|
+
rpc DeleteSubscription(DeleteSubscriptionRequest)
|
|
1236
|
+
returns (google.protobuf.Empty) {
|
|
1237
|
+
option (google.api.http) = {
|
|
1238
|
+
delete: "/v1/{subscription=projects/*/subscriptions/*}"
|
|
1239
|
+
};
|
|
1240
|
+
option (google.api.method_signature) = "subscription";
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
// Modifies the ack deadline for a specific message. This method is useful
|
|
1244
|
+
// to indicate that more time is needed to process a message by the
|
|
1245
|
+
// subscriber, or to make the message available for redelivery if the
|
|
1246
|
+
// processing was interrupted. Note that this does not modify the
|
|
1247
|
+
// subscription-level `ackDeadlineSeconds` used for subsequent messages.
|
|
1248
|
+
rpc ModifyAckDeadline(ModifyAckDeadlineRequest)
|
|
1249
|
+
returns (google.protobuf.Empty) {
|
|
1250
|
+
option (google.api.http) = {
|
|
1251
|
+
post: "/v1/{subscription=projects/*/subscriptions/*}:modifyAckDeadline"
|
|
1252
|
+
body: "*"
|
|
1253
|
+
};
|
|
1254
|
+
option (google.api.method_signature) =
|
|
1255
|
+
"subscription,ack_ids,ack_deadline_seconds";
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
// Acknowledges the messages associated with the `ack_ids` in the
|
|
1259
|
+
// `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
|
|
1260
|
+
// from the subscription.
|
|
1261
|
+
//
|
|
1262
|
+
// Acknowledging a message whose ack deadline has expired may succeed,
|
|
1263
|
+
// but such a message may be redelivered later. Acknowledging a message more
|
|
1264
|
+
// than once will not result in an error.
|
|
1265
|
+
rpc Acknowledge(AcknowledgeRequest) returns (google.protobuf.Empty) {
|
|
1266
|
+
option (google.api.http) = {
|
|
1267
|
+
post: "/v1/{subscription=projects/*/subscriptions/*}:acknowledge"
|
|
1268
|
+
body: "*"
|
|
1269
|
+
};
|
|
1270
|
+
option (google.api.method_signature) = "subscription,ack_ids";
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
// Pulls messages from the server.
|
|
1274
|
+
rpc Pull(PullRequest) returns (PullResponse) {
|
|
1275
|
+
option (google.api.http) = {
|
|
1276
|
+
post: "/v1/{subscription=projects/*/subscriptions/*}:pull"
|
|
1277
|
+
body: "*"
|
|
1278
|
+
};
|
|
1279
|
+
option (google.api.method_signature) =
|
|
1280
|
+
"subscription,return_immediately,max_messages";
|
|
1281
|
+
option (google.api.method_signature) = "subscription,max_messages";
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
// Establishes a stream with the server, which sends messages down to the
|
|
1285
|
+
// client. The client streams acknowledgments and ack deadline modifications
|
|
1286
|
+
// back to the server. The server will close the stream and return the status
|
|
1287
|
+
// on any error. The server may close the stream with status `UNAVAILABLE` to
|
|
1288
|
+
// reassign server-side resources, in which case, the client should
|
|
1289
|
+
// re-establish the stream. Flow control can be achieved by configuring the
|
|
1290
|
+
// underlying RPC channel.
|
|
1291
|
+
rpc StreamingPull(stream StreamingPullRequest)
|
|
1292
|
+
returns (stream StreamingPullResponse) {}
|
|
1293
|
+
|
|
1294
|
+
// Modifies the `PushConfig` for a specified subscription.
|
|
1295
|
+
//
|
|
1296
|
+
// This may be used to change a push subscription to a pull one (signified by
|
|
1297
|
+
// an empty `PushConfig`) or vice versa, or change the endpoint URL and other
|
|
1298
|
+
// attributes of a push subscription. Messages will accumulate for delivery
|
|
1299
|
+
// continuously through the call regardless of changes to the `PushConfig`.
|
|
1300
|
+
rpc ModifyPushConfig(ModifyPushConfigRequest)
|
|
1301
|
+
returns (google.protobuf.Empty) {
|
|
1302
|
+
option (google.api.http) = {
|
|
1303
|
+
post: "/v1/{subscription=projects/*/subscriptions/*}:modifyPushConfig"
|
|
1304
|
+
body: "*"
|
|
1305
|
+
};
|
|
1306
|
+
option (google.api.method_signature) = "subscription,push_config";
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
// Gets the configuration details of a snapshot. Snapshots are used in
|
|
1310
|
+
// [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
|
|
1311
|
+
// which allow you to manage message acknowledgments in bulk. That is, you can
|
|
1312
|
+
// set the acknowledgment state of messages in an existing subscription to the
|
|
1313
|
+
// state captured by a snapshot.
|
|
1314
|
+
rpc GetSnapshot(GetSnapshotRequest) returns (Snapshot) {
|
|
1315
|
+
option (google.api.http) = {
|
|
1316
|
+
get: "/v1/{snapshot=projects/*/snapshots/*}"
|
|
1317
|
+
};
|
|
1318
|
+
option (google.api.method_signature) = "snapshot";
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
// Lists the existing snapshots. Snapshots are used in [Seek](
|
|
1322
|
+
// https://cloud.google.com/pubsub/docs/replay-overview) operations, which
|
|
1323
|
+
// allow you to manage message acknowledgments in bulk. That is, you can set
|
|
1324
|
+
// the acknowledgment state of messages in an existing subscription to the
|
|
1325
|
+
// state captured by a snapshot.
|
|
1326
|
+
rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) {
|
|
1327
|
+
option (google.api.http) = {
|
|
1328
|
+
get: "/v1/{project=projects/*}/snapshots"
|
|
1329
|
+
};
|
|
1330
|
+
option (google.api.method_signature) = "project";
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
// Creates a snapshot from the requested subscription. Snapshots are used in
|
|
1334
|
+
// [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
|
|
1335
|
+
// which allow you to manage message acknowledgments in bulk. That is, you can
|
|
1336
|
+
// set the acknowledgment state of messages in an existing subscription to the
|
|
1337
|
+
// state captured by a snapshot.
|
|
1338
|
+
// If the snapshot already exists, returns `ALREADY_EXISTS`.
|
|
1339
|
+
// If the requested subscription doesn't exist, returns `NOT_FOUND`.
|
|
1340
|
+
// If the backlog in the subscription is too old -- and the resulting snapshot
|
|
1341
|
+
// would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
|
|
1342
|
+
// See also the `Snapshot.expire_time` field. If the name is not provided in
|
|
1343
|
+
// the request, the server will assign a random
|
|
1344
|
+
// name for this snapshot on the same project as the subscription, conforming
|
|
1345
|
+
// to the [resource name format]
|
|
1346
|
+
// (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
|
|
1347
|
+
// generated name is populated in the returned Snapshot object. Note that for
|
|
1348
|
+
// REST API requests, you must specify a name in the request.
|
|
1349
|
+
rpc CreateSnapshot(CreateSnapshotRequest) returns (Snapshot) {
|
|
1350
|
+
option (google.api.http) = {
|
|
1351
|
+
put: "/v1/{name=projects/*/snapshots/*}"
|
|
1352
|
+
body: "*"
|
|
1353
|
+
};
|
|
1354
|
+
option (google.api.method_signature) = "name,subscription";
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
// Updates an existing snapshot by updating the fields specified in the update
|
|
1358
|
+
// mask. Snapshots are used in
|
|
1359
|
+
// [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
|
|
1360
|
+
// which allow you to manage message acknowledgments in bulk. That is, you can
|
|
1361
|
+
// set the acknowledgment state of messages in an existing subscription to the
|
|
1362
|
+
// state captured by a snapshot.
|
|
1363
|
+
rpc UpdateSnapshot(UpdateSnapshotRequest) returns (Snapshot) {
|
|
1364
|
+
option (google.api.http) = {
|
|
1365
|
+
patch: "/v1/{snapshot.name=projects/*/snapshots/*}"
|
|
1366
|
+
body: "*"
|
|
1367
|
+
};
|
|
1368
|
+
option (google.api.method_signature) = "snapshot,update_mask";
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
// Removes an existing snapshot. Snapshots are used in [Seek]
|
|
1372
|
+
// (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
|
|
1373
|
+
// allow you to manage message acknowledgments in bulk. That is, you can set
|
|
1374
|
+
// the acknowledgment state of messages in an existing subscription to the
|
|
1375
|
+
// state captured by a snapshot.
|
|
1376
|
+
// When the snapshot is deleted, all messages retained in the snapshot
|
|
1377
|
+
// are immediately dropped. After a snapshot is deleted, a new one may be
|
|
1378
|
+
// created with the same name, but the new one has no association with the old
|
|
1379
|
+
// snapshot or its subscription, unless the same subscription is specified.
|
|
1380
|
+
rpc DeleteSnapshot(DeleteSnapshotRequest) returns (google.protobuf.Empty) {
|
|
1381
|
+
option (google.api.http) = {
|
|
1382
|
+
delete: "/v1/{snapshot=projects/*/snapshots/*}"
|
|
1383
|
+
};
|
|
1384
|
+
option (google.api.method_signature) = "snapshot";
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
// Seeks an existing subscription to a point in time or to a given snapshot,
|
|
1388
|
+
// whichever is provided in the request. Snapshots are used in [Seek]
|
|
1389
|
+
// (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
|
|
1390
|
+
// allow you to manage message acknowledgments in bulk. That is, you can set
|
|
1391
|
+
// the acknowledgment state of messages in an existing subscription to the
|
|
1392
|
+
// state captured by a snapshot. Note that both the subscription and the
|
|
1393
|
+
// snapshot must be on the same topic.
|
|
1394
|
+
rpc Seek(SeekRequest) returns (SeekResponse) {
|
|
1395
|
+
option (google.api.http) = {
|
|
1396
|
+
post: "/v1/{subscription=projects/*/subscriptions/*}:seek"
|
|
1397
|
+
body: "*"
|
|
1398
|
+
};
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
// A subscription resource. If none of `push_config`, `bigquery_config`, or
|
|
1403
|
+
// `cloud_storage_config` is set, then the subscriber will pull and ack messages
|
|
1404
|
+
// using API methods. At most one of these fields may be set.
|
|
1405
|
+
message Subscription {
|
|
1406
|
+
option (google.api.resource) = {
|
|
1407
|
+
type: "pubsub.googleapis.com/Subscription"
|
|
1408
|
+
pattern: "projects/{project}/subscriptions/{subscription}"
|
|
1409
|
+
plural: "subscriptions"
|
|
1410
|
+
singular: "subscription"
|
|
1411
|
+
};
|
|
1412
|
+
|
|
1413
|
+
// Possible states for a subscription.
|
|
1414
|
+
enum State {
|
|
1415
|
+
// Default value. This value is unused.
|
|
1416
|
+
STATE_UNSPECIFIED = 0;
|
|
1417
|
+
|
|
1418
|
+
// The subscription can actively receive messages
|
|
1419
|
+
ACTIVE = 1;
|
|
1420
|
+
|
|
1421
|
+
// The subscription cannot receive messages because of an error with the
|
|
1422
|
+
// resource to which it pushes messages. See the more detailed error state
|
|
1423
|
+
// in the corresponding configuration.
|
|
1424
|
+
RESOURCE_ERROR = 2;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
// Information about an associated [Analytics Hub
|
|
1428
|
+
// subscription](https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions).
|
|
1429
|
+
message AnalyticsHubSubscriptionInfo {
|
|
1430
|
+
// Optional. The name of the associated Analytics Hub listing resource.
|
|
1431
|
+
// Pattern:
|
|
1432
|
+
// "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}"
|
|
1433
|
+
string listing = 1 [
|
|
1434
|
+
(google.api.field_behavior) = OPTIONAL,
|
|
1435
|
+
(google.api.resource_reference) = {
|
|
1436
|
+
type: "analyticshub.googleapis.com/Listing"
|
|
1437
|
+
}
|
|
1438
|
+
];
|
|
1439
|
+
|
|
1440
|
+
// Optional. The name of the associated Analytics Hub subscription resource.
|
|
1441
|
+
// Pattern:
|
|
1442
|
+
// "projects/{project}/locations/{location}/subscriptions/{subscription}"
|
|
1443
|
+
string subscription = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
// Required. Identifier. The name of the subscription. It must have the format
|
|
1447
|
+
// `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
|
|
1448
|
+
// start with a letter, and contain only letters (`[A-Za-z]`), numbers
|
|
1449
|
+
// (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
|
|
1450
|
+
// plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
|
|
1451
|
+
// in length, and it must not start with `"goog"`.
|
|
1452
|
+
string name = 1 [
|
|
1453
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1454
|
+
(google.api.field_behavior) = IDENTIFIER
|
|
1455
|
+
];
|
|
1456
|
+
|
|
1457
|
+
// Required. The name of the topic from which this subscription is receiving
|
|
1458
|
+
// messages. Format is `projects/{project}/topics/{topic}`. The value of this
|
|
1459
|
+
// field will be `_deleted-topic_` if the topic has been deleted.
|
|
1460
|
+
string topic = 2 [
|
|
1461
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1462
|
+
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }
|
|
1463
|
+
];
|
|
1464
|
+
|
|
1465
|
+
// Optional. If push delivery is used with this subscription, this field is
|
|
1466
|
+
// used to configure it.
|
|
1467
|
+
PushConfig push_config = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
1468
|
+
|
|
1469
|
+
// Optional. If delivery to BigQuery is used with this subscription, this
|
|
1470
|
+
// field is used to configure it.
|
|
1471
|
+
BigQueryConfig bigquery_config = 18 [(google.api.field_behavior) = OPTIONAL];
|
|
1472
|
+
|
|
1473
|
+
// Optional. If delivery to Google Cloud Storage is used with this
|
|
1474
|
+
// subscription, this field is used to configure it.
|
|
1475
|
+
CloudStorageConfig cloud_storage_config = 22
|
|
1476
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1477
|
+
|
|
1478
|
+
// Optional. If delivery to Bigtable is used with this subscription, this
|
|
1479
|
+
// field is used to configure it.
|
|
1480
|
+
BigtableConfig bigtable_config = 27 [(google.api.field_behavior) = OPTIONAL];
|
|
1481
|
+
|
|
1482
|
+
// Optional. The approximate amount of time (on a best-effort basis) Pub/Sub
|
|
1483
|
+
// waits for the subscriber to acknowledge receipt before resending the
|
|
1484
|
+
// message. In the interval after the message is delivered and before it is
|
|
1485
|
+
// acknowledged, it is considered to be _outstanding_. During that time
|
|
1486
|
+
// period, the message will not be redelivered (on a best-effort basis).
|
|
1487
|
+
//
|
|
1488
|
+
// For pull subscriptions, this value is used as the initial value for the ack
|
|
1489
|
+
// deadline. To override this value for a given message, call
|
|
1490
|
+
// `ModifyAckDeadline` with the corresponding `ack_id` if using
|
|
1491
|
+
// non-streaming pull or send the `ack_id` in a
|
|
1492
|
+
// `StreamingModifyAckDeadlineRequest` if using streaming pull.
|
|
1493
|
+
// The minimum custom deadline you can specify is 10 seconds.
|
|
1494
|
+
// The maximum custom deadline you can specify is 600 seconds (10 minutes).
|
|
1495
|
+
// If this parameter is 0, a default value of 10 seconds is used.
|
|
1496
|
+
//
|
|
1497
|
+
// For push delivery, this value is also used to set the request timeout for
|
|
1498
|
+
// the call to the push endpoint.
|
|
1499
|
+
//
|
|
1500
|
+
// If the subscriber never acknowledges the message, the Pub/Sub
|
|
1501
|
+
// system will eventually redeliver the message.
|
|
1502
|
+
int32 ack_deadline_seconds = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
1503
|
+
|
|
1504
|
+
// Optional. Indicates whether to retain acknowledged messages. If true, then
|
|
1505
|
+
// messages are not expunged from the subscription's backlog, even if they are
|
|
1506
|
+
// acknowledged, until they fall out of the `message_retention_duration`
|
|
1507
|
+
// window. This must be true if you would like to [`Seek` to a timestamp]
|
|
1508
|
+
// (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in
|
|
1509
|
+
// the past to replay previously-acknowledged messages.
|
|
1510
|
+
bool retain_acked_messages = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
1511
|
+
|
|
1512
|
+
// Optional. How long to retain unacknowledged messages in the subscription's
|
|
1513
|
+
// backlog, from the moment a message is published. If `retain_acked_messages`
|
|
1514
|
+
// is true, then this also configures the retention of acknowledged messages,
|
|
1515
|
+
// and thus configures how far back in time a `Seek` can be done. Defaults to
|
|
1516
|
+
// 7 days. Cannot be more than 31 days or less than 10 minutes.
|
|
1517
|
+
google.protobuf.Duration message_retention_duration = 8
|
|
1518
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1519
|
+
|
|
1520
|
+
// Optional. See [Creating and managing
|
|
1521
|
+
// labels](https://cloud.google.com/pubsub/docs/labels).
|
|
1522
|
+
map<string, string> labels = 9 [(google.api.field_behavior) = OPTIONAL];
|
|
1523
|
+
|
|
1524
|
+
// Optional. If true, messages published with the same `ordering_key` in
|
|
1525
|
+
// `PubsubMessage` will be delivered to the subscribers in the order in which
|
|
1526
|
+
// they are received by the Pub/Sub system. Otherwise, they may be delivered
|
|
1527
|
+
// in any order.
|
|
1528
|
+
bool enable_message_ordering = 10 [(google.api.field_behavior) = OPTIONAL];
|
|
1529
|
+
|
|
1530
|
+
// Optional. A policy that specifies the conditions for this subscription's
|
|
1531
|
+
// expiration. A subscription is considered active as long as any connected
|
|
1532
|
+
// subscriber is successfully consuming messages from the subscription or is
|
|
1533
|
+
// issuing operations on the subscription. If `expiration_policy` is not set,
|
|
1534
|
+
// a *default policy* with `ttl` of 31 days will be used. The minimum allowed
|
|
1535
|
+
// value for `expiration_policy.ttl` is 1 day. If `expiration_policy` is set,
|
|
1536
|
+
// but `expiration_policy.ttl` is not set, the subscription never expires.
|
|
1537
|
+
ExpirationPolicy expiration_policy = 11
|
|
1538
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1539
|
+
|
|
1540
|
+
// Optional. An expression written in the Pub/Sub [filter
|
|
1541
|
+
// language](https://cloud.google.com/pubsub/docs/filtering). If non-empty,
|
|
1542
|
+
// then only `PubsubMessage`s whose `attributes` field matches the filter are
|
|
1543
|
+
// delivered on this subscription. If empty, then no messages are filtered
|
|
1544
|
+
// out.
|
|
1545
|
+
string filter = 12 [(google.api.field_behavior) = OPTIONAL];
|
|
1546
|
+
|
|
1547
|
+
// Optional. A policy that specifies the conditions for dead lettering
|
|
1548
|
+
// messages in this subscription. If dead_letter_policy is not set, dead
|
|
1549
|
+
// lettering is disabled.
|
|
1550
|
+
//
|
|
1551
|
+
// The Pub/Sub service account associated with this subscriptions's
|
|
1552
|
+
// parent project (i.e.,
|
|
1553
|
+
// service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
|
|
1554
|
+
// permission to Acknowledge() messages on this subscription.
|
|
1555
|
+
DeadLetterPolicy dead_letter_policy = 13
|
|
1556
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1557
|
+
|
|
1558
|
+
// Optional. A policy that specifies how Pub/Sub retries message delivery for
|
|
1559
|
+
// this subscription.
|
|
1560
|
+
//
|
|
1561
|
+
// If not set, the default retry policy is applied. This generally implies
|
|
1562
|
+
// that messages will be retried as soon as possible for healthy subscribers.
|
|
1563
|
+
// RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded
|
|
1564
|
+
// events for a given message.
|
|
1565
|
+
RetryPolicy retry_policy = 14 [(google.api.field_behavior) = OPTIONAL];
|
|
1566
|
+
|
|
1567
|
+
// Optional. Indicates whether the subscription is detached from its topic.
|
|
1568
|
+
// Detached subscriptions don't receive messages from their topic and don't
|
|
1569
|
+
// retain any backlog. `Pull` and `StreamingPull` requests will return
|
|
1570
|
+
// FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
|
|
1571
|
+
// the endpoint will not be made.
|
|
1572
|
+
bool detached = 15 [(google.api.field_behavior) = OPTIONAL];
|
|
1573
|
+
|
|
1574
|
+
// Optional. If true, Pub/Sub provides the following guarantees for the
|
|
1575
|
+
// delivery of a message with a given value of `message_id` on this
|
|
1576
|
+
// subscription:
|
|
1577
|
+
//
|
|
1578
|
+
// * The message sent to a subscriber is guaranteed not to be resent
|
|
1579
|
+
// before the message's acknowledgment deadline expires.
|
|
1580
|
+
// * An acknowledged message will not be resent to a subscriber.
|
|
1581
|
+
//
|
|
1582
|
+
// Note that subscribers may still receive multiple copies of a message
|
|
1583
|
+
// when `enable_exactly_once_delivery` is true if the message was published
|
|
1584
|
+
// multiple times by a publisher client. These copies are considered distinct
|
|
1585
|
+
// by Pub/Sub and have distinct `message_id` values.
|
|
1586
|
+
bool enable_exactly_once_delivery = 16
|
|
1587
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1588
|
+
|
|
1589
|
+
// Output only. Indicates the minimum duration for which a message is retained
|
|
1590
|
+
// after it is published to the subscription's topic. If this field is set,
|
|
1591
|
+
// messages published to the subscription's topic in the last
|
|
1592
|
+
// `topic_message_retention_duration` are always available to subscribers. See
|
|
1593
|
+
// the `message_retention_duration` field in `Topic`. This field is set only
|
|
1594
|
+
// in responses from the server; it is ignored if it is set in any requests.
|
|
1595
|
+
google.protobuf.Duration topic_message_retention_duration = 17
|
|
1596
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
1597
|
+
|
|
1598
|
+
// Output only. An output-only field indicating whether or not the
|
|
1599
|
+
// subscription can receive messages.
|
|
1600
|
+
State state = 19 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
1601
|
+
|
|
1602
|
+
// Output only. Information about the associated Analytics Hub subscription.
|
|
1603
|
+
// Only set if the subscription is created by Analytics Hub.
|
|
1604
|
+
AnalyticsHubSubscriptionInfo analytics_hub_subscription_info = 23
|
|
1605
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
1606
|
+
|
|
1607
|
+
// Optional. Transforms to be applied to messages before they are delivered to
|
|
1608
|
+
// subscribers. Transforms are applied in the order specified.
|
|
1609
|
+
repeated MessageTransform message_transforms = 25
|
|
1610
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1611
|
+
|
|
1612
|
+
// Optional. Input only. Immutable. Tag keys/values directly bound to this
|
|
1613
|
+
// resource. For example:
|
|
1614
|
+
// "123/environment": "production",
|
|
1615
|
+
// "123/costCenter": "marketing"
|
|
1616
|
+
// See https://docs.cloud.google.com/pubsub/docs/tags for more information on
|
|
1617
|
+
// using tags with Pub/Sub resources.
|
|
1618
|
+
map<string, string> tags = 26 [
|
|
1619
|
+
(google.api.field_behavior) = INPUT_ONLY,
|
|
1620
|
+
(google.api.field_behavior) = IMMUTABLE,
|
|
1621
|
+
(google.api.field_behavior) = OPTIONAL
|
|
1622
|
+
];
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
// A policy that specifies how Pub/Sub retries message delivery.
|
|
1626
|
+
//
|
|
1627
|
+
// Retry delay will be exponential based on provided minimum and maximum
|
|
1628
|
+
// backoffs. https://en.wikipedia.org/wiki/Exponential_backoff.
|
|
1629
|
+
//
|
|
1630
|
+
// RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded
|
|
1631
|
+
// events for a given message.
|
|
1632
|
+
//
|
|
1633
|
+
// Retry Policy is implemented on a best effort basis. At times, the delay
|
|
1634
|
+
// between consecutive deliveries may not match the configuration. That is,
|
|
1635
|
+
// delay can be more or less than configured backoff.
|
|
1636
|
+
message RetryPolicy {
|
|
1637
|
+
// Optional. The minimum delay between consecutive deliveries of a given
|
|
1638
|
+
// message. Value should be between 0 and 600 seconds. Defaults to 10 seconds.
|
|
1639
|
+
google.protobuf.Duration minimum_backoff = 1
|
|
1640
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1641
|
+
|
|
1642
|
+
// Optional. The maximum delay between consecutive deliveries of a given
|
|
1643
|
+
// message. Value should be between 0 and 600 seconds. Defaults to 600
|
|
1644
|
+
// seconds.
|
|
1645
|
+
google.protobuf.Duration maximum_backoff = 2
|
|
1646
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
// Dead lettering is done on a best effort basis. The same message might be
|
|
1650
|
+
// dead lettered multiple times.
|
|
1651
|
+
//
|
|
1652
|
+
// If validation on any of the fields fails at subscription creation/updation,
|
|
1653
|
+
// the create/update subscription request will fail.
|
|
1654
|
+
message DeadLetterPolicy {
|
|
1655
|
+
// Optional. The name of the topic to which dead letter messages should be
|
|
1656
|
+
// published. Format is `projects/{project}/topics/{topic}`.The Pub/Sub
|
|
1657
|
+
// service account associated with the enclosing subscription's parent project
|
|
1658
|
+
// (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must
|
|
1659
|
+
// have permission to Publish() to this topic.
|
|
1660
|
+
//
|
|
1661
|
+
// The operation will fail if the topic does not exist.
|
|
1662
|
+
// Users should ensure that there is a subscription attached to this topic
|
|
1663
|
+
// since messages published to a topic with no subscriptions are lost.
|
|
1664
|
+
string dead_letter_topic = 1 [
|
|
1665
|
+
(google.api.field_behavior) = OPTIONAL,
|
|
1666
|
+
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }
|
|
1667
|
+
];
|
|
1668
|
+
|
|
1669
|
+
// Optional. The maximum number of delivery attempts for any message. The
|
|
1670
|
+
// value must be between 5 and 100.
|
|
1671
|
+
//
|
|
1672
|
+
// The number of delivery attempts is defined as 1 + (the sum of number of
|
|
1673
|
+
// NACKs and number of times the acknowledgment deadline has been exceeded
|
|
1674
|
+
// for the message).
|
|
1675
|
+
//
|
|
1676
|
+
// A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that
|
|
1677
|
+
// client libraries may automatically extend ack_deadlines.
|
|
1678
|
+
//
|
|
1679
|
+
// This field will be honored on a best effort basis.
|
|
1680
|
+
//
|
|
1681
|
+
// If this parameter is 0, a default value of 5 is used.
|
|
1682
|
+
int32 max_delivery_attempts = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
// A policy that specifies the conditions for resource expiration (i.e.,
|
|
1686
|
+
// automatic resource deletion).
|
|
1687
|
+
message ExpirationPolicy {
|
|
1688
|
+
// Optional. Specifies the "time-to-live" duration for an associated resource.
|
|
1689
|
+
// The resource expires if it is not active for a period of `ttl`. The
|
|
1690
|
+
// definition of "activity" depends on the type of the associated resource.
|
|
1691
|
+
// The minimum and maximum allowed values for `ttl` depend on the type of the
|
|
1692
|
+
// associated resource, as well. If `ttl` is not set, the associated resource
|
|
1693
|
+
// never expires.
|
|
1694
|
+
google.protobuf.Duration ttl = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
// Configuration for a push delivery endpoint.
|
|
1698
|
+
message PushConfig {
|
|
1699
|
+
// Contains information needed for generating an
|
|
1700
|
+
// [OpenID Connect
|
|
1701
|
+
// token](https://developers.google.com/identity/protocols/OpenIDConnect).
|
|
1702
|
+
message OidcToken {
|
|
1703
|
+
// Optional. [Service account
|
|
1704
|
+
// email](https://cloud.google.com/iam/docs/service-accounts)
|
|
1705
|
+
// used for generating the OIDC token. For more information
|
|
1706
|
+
// on setting up authentication, see
|
|
1707
|
+
// [Push subscriptions](https://cloud.google.com/pubsub/docs/push).
|
|
1708
|
+
string service_account_email = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
1709
|
+
|
|
1710
|
+
// Optional. Audience to be used when generating OIDC token. The audience
|
|
1711
|
+
// claim identifies the recipients that the JWT is intended for. The
|
|
1712
|
+
// audience value is a single case-sensitive string. Having multiple values
|
|
1713
|
+
// (array) for the audience field is not supported. More info about the OIDC
|
|
1714
|
+
// JWT token audience here:
|
|
1715
|
+
// https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified,
|
|
1716
|
+
// the Push endpoint URL will be used.
|
|
1717
|
+
string audience = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
// The payload to the push endpoint is in the form of the JSON representation
|
|
1721
|
+
// of a PubsubMessage
|
|
1722
|
+
// (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage).
|
|
1723
|
+
message PubsubWrapper {}
|
|
1724
|
+
|
|
1725
|
+
// Sets the `data` field as the HTTP body for delivery.
|
|
1726
|
+
message NoWrapper {
|
|
1727
|
+
// Optional. When true, writes the Pub/Sub message metadata to
|
|
1728
|
+
// `x-goog-pubsub-<KEY>:<VAL>` headers of the HTTP request. Writes the
|
|
1729
|
+
// Pub/Sub message attributes to `<KEY>:<VAL>` headers of the HTTP request.
|
|
1730
|
+
bool write_metadata = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
// Optional. A URL locating the endpoint to which messages should be pushed.
|
|
1734
|
+
// For example, a Webhook endpoint might use `https://example.com/push`.
|
|
1735
|
+
string push_endpoint = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
1736
|
+
|
|
1737
|
+
// Optional. Endpoint configuration attributes that can be used to control
|
|
1738
|
+
// different aspects of the message delivery.
|
|
1739
|
+
//
|
|
1740
|
+
// The only currently supported attribute is `x-goog-version`, which you can
|
|
1741
|
+
// use to change the format of the pushed message. This attribute
|
|
1742
|
+
// indicates the version of the data expected by the endpoint. This
|
|
1743
|
+
// controls the shape of the pushed message (i.e., its fields and metadata).
|
|
1744
|
+
//
|
|
1745
|
+
// If not present during the `CreateSubscription` call, it will default to
|
|
1746
|
+
// the version of the Pub/Sub API used to make such call. If not present in a
|
|
1747
|
+
// `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
|
|
1748
|
+
// calls will always return a valid version, even if the subscription was
|
|
1749
|
+
// created without this attribute.
|
|
1750
|
+
//
|
|
1751
|
+
// The only supported values for the `x-goog-version` attribute are:
|
|
1752
|
+
//
|
|
1753
|
+
// * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
|
|
1754
|
+
// * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
|
|
1755
|
+
//
|
|
1756
|
+
// For example:
|
|
1757
|
+
// `attributes { "x-goog-version": "v1" }`
|
|
1758
|
+
map<string, string> attributes = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
1759
|
+
|
|
1760
|
+
// An authentication method used by push endpoints to verify the source of
|
|
1761
|
+
// push requests. This can be used with push endpoints that are private by
|
|
1762
|
+
// default to allow requests only from the Pub/Sub system, for example.
|
|
1763
|
+
// This field is optional and should be set only by users interested in
|
|
1764
|
+
// authenticated push.
|
|
1765
|
+
oneof authentication_method {
|
|
1766
|
+
// Optional. If specified, Pub/Sub will generate and attach an OIDC JWT
|
|
1767
|
+
// token as an `Authorization` header in the HTTP request for every pushed
|
|
1768
|
+
// message.
|
|
1769
|
+
OidcToken oidc_token = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
// The format of the delivered message to the push endpoint is defined by
|
|
1773
|
+
// the chosen wrapper. When unset, `PubsubWrapper` is used.
|
|
1774
|
+
oneof wrapper {
|
|
1775
|
+
// Optional. When set, the payload to the push endpoint is in the form of
|
|
1776
|
+
// the JSON representation of a PubsubMessage
|
|
1777
|
+
// (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage).
|
|
1778
|
+
PubsubWrapper pubsub_wrapper = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
1779
|
+
|
|
1780
|
+
// Optional. When set, the payload to the push endpoint is not wrapped.
|
|
1781
|
+
NoWrapper no_wrapper = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
// Configuration for a BigQuery subscription.
|
|
1786
|
+
message BigQueryConfig {
|
|
1787
|
+
// Possible states for a BigQuery subscription.
|
|
1788
|
+
enum State {
|
|
1789
|
+
// Default value. This value is unused.
|
|
1790
|
+
STATE_UNSPECIFIED = 0;
|
|
1791
|
+
|
|
1792
|
+
// The subscription can actively send messages to BigQuery
|
|
1793
|
+
ACTIVE = 1;
|
|
1794
|
+
|
|
1795
|
+
// Cannot write to the BigQuery table because of permission denied errors.
|
|
1796
|
+
// This can happen if
|
|
1797
|
+
// - Pub/Sub SA has not been granted the [appropriate BigQuery IAM
|
|
1798
|
+
// permissions](https://cloud.google.com/pubsub/docs/create-subscription#assign_bigquery_service_account)
|
|
1799
|
+
// - bigquery.googleapis.com API is not enabled for the project
|
|
1800
|
+
// ([instructions](https://cloud.google.com/service-usage/docs/enable-disable))
|
|
1801
|
+
PERMISSION_DENIED = 2;
|
|
1802
|
+
|
|
1803
|
+
// Cannot write to the BigQuery table because it does not exist.
|
|
1804
|
+
NOT_FOUND = 3;
|
|
1805
|
+
|
|
1806
|
+
// Cannot write to the BigQuery table due to a schema mismatch.
|
|
1807
|
+
SCHEMA_MISMATCH = 4;
|
|
1808
|
+
|
|
1809
|
+
// Cannot write to the destination because enforce_in_transit is set to true
|
|
1810
|
+
// and the destination locations are not in the allowed regions.
|
|
1811
|
+
IN_TRANSIT_LOCATION_RESTRICTION = 5;
|
|
1812
|
+
|
|
1813
|
+
// Cannot write to the BigQuery table because the table is not in the same
|
|
1814
|
+
// location as where Vertex AI models used in `message_transform`s are
|
|
1815
|
+
// deployed.
|
|
1816
|
+
VERTEX_AI_LOCATION_RESTRICTION = 6;
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
// Optional. The name of the table to which to write data, of the form
|
|
1820
|
+
// {projectId}.{datasetId}.{tableId}
|
|
1821
|
+
string table = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
1822
|
+
|
|
1823
|
+
// Optional. When true, use the topic's schema as the columns to write to in
|
|
1824
|
+
// BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be
|
|
1825
|
+
// enabled at the same time.
|
|
1826
|
+
bool use_topic_schema = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
1827
|
+
|
|
1828
|
+
// Optional. When true, write the subscription name, message_id, publish_time,
|
|
1829
|
+
// attributes, and ordering_key to additional columns in the table. The
|
|
1830
|
+
// subscription name, message_id, and publish_time fields are put in their own
|
|
1831
|
+
// columns while all other message properties (other than data) are written to
|
|
1832
|
+
// a JSON object in the attributes column.
|
|
1833
|
+
bool write_metadata = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
1834
|
+
|
|
1835
|
+
// Optional. When true and use_topic_schema is true, any fields that are a
|
|
1836
|
+
// part of the topic schema that are not part of the BigQuery table schema are
|
|
1837
|
+
// dropped when writing to BigQuery. Otherwise, the schemas must be kept in
|
|
1838
|
+
// sync and any messages with extra fields are not written and remain in the
|
|
1839
|
+
// subscription's backlog.
|
|
1840
|
+
bool drop_unknown_fields = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
1841
|
+
|
|
1842
|
+
// Output only. An output-only field that indicates whether or not the
|
|
1843
|
+
// subscription can receive messages.
|
|
1844
|
+
State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
1845
|
+
|
|
1846
|
+
// Optional. When true, use the BigQuery table's schema as the columns to
|
|
1847
|
+
// write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be
|
|
1848
|
+
// enabled at the same time.
|
|
1849
|
+
bool use_table_schema = 6 [(google.api.field_behavior) = OPTIONAL];
|
|
1850
|
+
|
|
1851
|
+
// Optional. The service account to use to write to BigQuery. The subscription
|
|
1852
|
+
// creator or updater that specifies this field must have
|
|
1853
|
+
// `iam.serviceAccounts.actAs` permission on the service account. If not
|
|
1854
|
+
// specified, the Pub/Sub [service
|
|
1855
|
+
// agent](https://cloud.google.com/iam/docs/service-agents),
|
|
1856
|
+
// service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
|
|
1857
|
+
string service_account_email = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
// Configuration for a Bigtable subscription. The Pub/Sub message will be
|
|
1861
|
+
// written to a Bigtable row as follows:
|
|
1862
|
+
// - row key: subscription name and message ID delimited by #.
|
|
1863
|
+
// - columns: message bytes written to a single column family "data" with an
|
|
1864
|
+
// empty-string column qualifier.
|
|
1865
|
+
// - cell timestamp: the message publish timestamp.
|
|
1866
|
+
message BigtableConfig {
|
|
1867
|
+
// Possible states for a Bigtable subscription.
|
|
1868
|
+
// Note: more states could be added in the future. Please code accordingly.
|
|
1869
|
+
enum State {
|
|
1870
|
+
// Default value. This value is unused.
|
|
1871
|
+
STATE_UNSPECIFIED = 0;
|
|
1872
|
+
|
|
1873
|
+
// The subscription can actively send messages to Bigtable.
|
|
1874
|
+
ACTIVE = 1;
|
|
1875
|
+
|
|
1876
|
+
// Cannot write to Bigtable because the instance, table, or app profile
|
|
1877
|
+
// does not exist.
|
|
1878
|
+
NOT_FOUND = 2;
|
|
1879
|
+
|
|
1880
|
+
// Cannot write to Bigtable because the app profile is not configured for
|
|
1881
|
+
// single-cluster routing.
|
|
1882
|
+
APP_PROFILE_MISCONFIGURED = 3;
|
|
1883
|
+
|
|
1884
|
+
// Cannot write to Bigtable because of permission denied errors.
|
|
1885
|
+
// This can happen if:
|
|
1886
|
+
// - The Pub/Sub service agent has not been granted the
|
|
1887
|
+
// [appropriate Bigtable IAM permission
|
|
1888
|
+
// bigtable.tables.mutateRows]({$universe.dns_names.final_documentation_domain}/bigtable/docs/access-control#permissions)
|
|
1889
|
+
// - The bigtable.googleapis.com API is not enabled for the project
|
|
1890
|
+
// ([instructions]({$universe.dns_names.final_documentation_domain}/service-usage/docs/enable-disable))
|
|
1891
|
+
PERMISSION_DENIED = 4;
|
|
1892
|
+
|
|
1893
|
+
// Cannot write to Bigtable because of a missing column family ("data") or
|
|
1894
|
+
// if there is no structured row key for the subscription name + message ID.
|
|
1895
|
+
SCHEMA_MISMATCH = 5;
|
|
1896
|
+
|
|
1897
|
+
// Cannot write to the destination because enforce_in_transit is set to true
|
|
1898
|
+
// and the destination locations are not in the allowed regions.
|
|
1899
|
+
IN_TRANSIT_LOCATION_RESTRICTION = 6;
|
|
1900
|
+
|
|
1901
|
+
// Cannot write to Bigtable because the table is not in the same location as
|
|
1902
|
+
// where Vertex AI models used in `message_transform`s are deployed.
|
|
1903
|
+
VERTEX_AI_LOCATION_RESTRICTION = 7;
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
// Optional. The unique name of the table to write messages to.
|
|
1907
|
+
//
|
|
1908
|
+
// Values are of the form
|
|
1909
|
+
// `projects/<project>/instances/<instance>/tables/<table>`.
|
|
1910
|
+
string table = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
1911
|
+
|
|
1912
|
+
// Optional. The app profile to use for the Bigtable writes. If not specified,
|
|
1913
|
+
// the "default" application profile will be used. The app profile must use
|
|
1914
|
+
// single-cluster routing.
|
|
1915
|
+
string app_profile_id = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
1916
|
+
|
|
1917
|
+
// Optional. The service account to use to write to Bigtable. The subscription
|
|
1918
|
+
// creator or updater that specifies this field must have
|
|
1919
|
+
// `iam.serviceAccounts.actAs` permission on the service account. If not
|
|
1920
|
+
// specified, the Pub/Sub [service
|
|
1921
|
+
// agent](https://cloud.google.com/iam/docs/service-agents),
|
|
1922
|
+
// service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
|
|
1923
|
+
string service_account_email = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
1924
|
+
|
|
1925
|
+
// Optional. When true, write the subscription name, message_id, publish_time,
|
|
1926
|
+
// attributes, and ordering_key to additional columns in the table under the
|
|
1927
|
+
// pubsub_metadata column family. The subscription name, message_id, and
|
|
1928
|
+
// publish_time fields are put in their own columns while all other message
|
|
1929
|
+
// properties (other than data) are written to a JSON object in the attributes
|
|
1930
|
+
// column.
|
|
1931
|
+
bool write_metadata = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
1932
|
+
|
|
1933
|
+
// Output only. An output-only field that indicates whether or not the
|
|
1934
|
+
// subscription can receive messages.
|
|
1935
|
+
State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
// Configuration for a Cloud Storage subscription.
|
|
1939
|
+
message CloudStorageConfig {
|
|
1940
|
+
// Configuration for writing message data in text format.
|
|
1941
|
+
// Message payloads will be written to files as raw text, separated by a
|
|
1942
|
+
// newline.
|
|
1943
|
+
message TextConfig {}
|
|
1944
|
+
|
|
1945
|
+
// Configuration for writing message data in Avro format.
|
|
1946
|
+
// Message payloads and metadata will be written to files as an Avro binary.
|
|
1947
|
+
message AvroConfig {
|
|
1948
|
+
// Optional. When true, write the subscription name, message_id,
|
|
1949
|
+
// publish_time, attributes, and ordering_key as additional fields in the
|
|
1950
|
+
// output. The subscription name, message_id, and publish_time fields are
|
|
1951
|
+
// put in their own fields while all other message properties other than
|
|
1952
|
+
// data (for example, an ordering_key, if present) are added as entries in
|
|
1953
|
+
// the attributes map.
|
|
1954
|
+
bool write_metadata = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
1955
|
+
|
|
1956
|
+
// Optional. When true, the output Cloud Storage file will be serialized
|
|
1957
|
+
// using the topic schema, if it exists.
|
|
1958
|
+
bool use_topic_schema = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
// Possible states for a Cloud Storage subscription.
|
|
1962
|
+
enum State {
|
|
1963
|
+
// Default value. This value is unused.
|
|
1964
|
+
STATE_UNSPECIFIED = 0;
|
|
1965
|
+
|
|
1966
|
+
// The subscription can actively send messages to Cloud Storage.
|
|
1967
|
+
ACTIVE = 1;
|
|
1968
|
+
|
|
1969
|
+
// Cannot write to the Cloud Storage bucket because of permission denied
|
|
1970
|
+
// errors.
|
|
1971
|
+
PERMISSION_DENIED = 2;
|
|
1972
|
+
|
|
1973
|
+
// Cannot write to the Cloud Storage bucket because it does not exist.
|
|
1974
|
+
NOT_FOUND = 3;
|
|
1975
|
+
|
|
1976
|
+
// Cannot write to the destination because enforce_in_transit is set to true
|
|
1977
|
+
// and the destination locations are not in the allowed regions.
|
|
1978
|
+
IN_TRANSIT_LOCATION_RESTRICTION = 4;
|
|
1979
|
+
|
|
1980
|
+
// Cannot write to the Cloud Storage bucket due to an incompatibility
|
|
1981
|
+
// between the topic schema and subscription settings.
|
|
1982
|
+
SCHEMA_MISMATCH = 5;
|
|
1983
|
+
|
|
1984
|
+
// Cannot write to the Cloud Storage bucket because the bucket is not in the
|
|
1985
|
+
// same location as where Vertex AI models used in `message_transform`s are
|
|
1986
|
+
// deployed.
|
|
1987
|
+
VERTEX_AI_LOCATION_RESTRICTION = 6;
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
// Required. User-provided name for the Cloud Storage bucket.
|
|
1991
|
+
// The bucket must be created by the user. The bucket name must be without
|
|
1992
|
+
// any prefix like "gs://". See the [bucket naming
|
|
1993
|
+
// requirements] (https://cloud.google.com/storage/docs/buckets#naming).
|
|
1994
|
+
string bucket = 1 [(google.api.field_behavior) = REQUIRED];
|
|
1995
|
+
|
|
1996
|
+
// Optional. User-provided prefix for Cloud Storage filename. See the [object
|
|
1997
|
+
// naming requirements](https://cloud.google.com/storage/docs/objects#naming).
|
|
1998
|
+
string filename_prefix = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
1999
|
+
|
|
2000
|
+
// Optional. User-provided suffix for Cloud Storage filename. See the [object
|
|
2001
|
+
// naming requirements](https://cloud.google.com/storage/docs/objects#naming).
|
|
2002
|
+
// Must not end in "/".
|
|
2003
|
+
string filename_suffix = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
2004
|
+
|
|
2005
|
+
// Optional. User-provided format string specifying how to represent datetimes
|
|
2006
|
+
// in Cloud Storage filenames. See the [datetime format
|
|
2007
|
+
// guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names).
|
|
2008
|
+
string filename_datetime_format = 10 [(google.api.field_behavior) = OPTIONAL];
|
|
2009
|
+
|
|
2010
|
+
// Defaults to text format.
|
|
2011
|
+
oneof output_format {
|
|
2012
|
+
// Optional. If set, message data will be written to Cloud Storage in text
|
|
2013
|
+
// format.
|
|
2014
|
+
TextConfig text_config = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
2015
|
+
|
|
2016
|
+
// Optional. If set, message data will be written to Cloud Storage in Avro
|
|
2017
|
+
// format.
|
|
2018
|
+
AvroConfig avro_config = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
// Optional. The maximum duration that can elapse before a new Cloud Storage
|
|
2022
|
+
// file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not
|
|
2023
|
+
// exceed the subscription's acknowledgment deadline.
|
|
2024
|
+
google.protobuf.Duration max_duration = 6
|
|
2025
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2026
|
+
|
|
2027
|
+
// Optional. The maximum bytes that can be written to a Cloud Storage file
|
|
2028
|
+
// before a new file is created. Min 1 KB, max 10 GiB. The max_bytes limit may
|
|
2029
|
+
// be exceeded in cases where messages are larger than the limit.
|
|
2030
|
+
int64 max_bytes = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
2031
|
+
|
|
2032
|
+
// Optional. The maximum number of messages that can be written to a Cloud
|
|
2033
|
+
// Storage file before a new file is created. Min 1000 messages.
|
|
2034
|
+
int64 max_messages = 8 [(google.api.field_behavior) = OPTIONAL];
|
|
2035
|
+
|
|
2036
|
+
// Output only. An output-only field that indicates whether or not the
|
|
2037
|
+
// subscription can receive messages.
|
|
2038
|
+
State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2039
|
+
|
|
2040
|
+
// Optional. The service account to use to write to Cloud Storage. The
|
|
2041
|
+
// subscription creator or updater that specifies this field must have
|
|
2042
|
+
// `iam.serviceAccounts.actAs` permission on the service account. If not
|
|
2043
|
+
// specified, the Pub/Sub
|
|
2044
|
+
// [service agent](https://cloud.google.com/iam/docs/service-agents),
|
|
2045
|
+
// service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
|
|
2046
|
+
string service_account_email = 11 [(google.api.field_behavior) = OPTIONAL];
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
// A message and its corresponding acknowledgment ID.
|
|
2050
|
+
message ReceivedMessage {
|
|
2051
|
+
// Optional. This ID can be used to acknowledge the received message.
|
|
2052
|
+
string ack_id = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2053
|
+
|
|
2054
|
+
// Optional. The message.
|
|
2055
|
+
PubsubMessage message = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
2056
|
+
|
|
2057
|
+
// Optional. The approximate number of times that Pub/Sub has attempted to
|
|
2058
|
+
// deliver the associated message to a subscriber.
|
|
2059
|
+
//
|
|
2060
|
+
// More precisely, this is 1 + (number of NACKs) +
|
|
2061
|
+
// (number of ack_deadline exceeds) for this message.
|
|
2062
|
+
//
|
|
2063
|
+
// A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline
|
|
2064
|
+
// exceeds event is whenever a message is not acknowledged within
|
|
2065
|
+
// ack_deadline. Note that ack_deadline is initially
|
|
2066
|
+
// Subscription.ackDeadlineSeconds, but may get extended automatically by
|
|
2067
|
+
// the client library.
|
|
2068
|
+
//
|
|
2069
|
+
// Upon the first delivery of a given message, `delivery_attempt` will have a
|
|
2070
|
+
// value of 1. The value is calculated at best effort and is approximate.
|
|
2071
|
+
//
|
|
2072
|
+
// If a DeadLetterPolicy is not set on the subscription, this will be 0.
|
|
2073
|
+
int32 delivery_attempt = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
// Request for the GetSubscription method.
|
|
2077
|
+
message GetSubscriptionRequest {
|
|
2078
|
+
// Required. The name of the subscription to get.
|
|
2079
|
+
// Format is `projects/{project}/subscriptions/{sub}`.
|
|
2080
|
+
string subscription = 1 [
|
|
2081
|
+
(google.api.field_behavior) = REQUIRED,
|
|
2082
|
+
(google.api.resource_reference) = {
|
|
2083
|
+
type: "pubsub.googleapis.com/Subscription"
|
|
2084
|
+
}
|
|
2085
|
+
];
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
// Request for the UpdateSubscription method.
|
|
2089
|
+
message UpdateSubscriptionRequest {
|
|
2090
|
+
// Required. The updated subscription object.
|
|
2091
|
+
Subscription subscription = 1 [(google.api.field_behavior) = REQUIRED];
|
|
2092
|
+
|
|
2093
|
+
// Required. Indicates which fields in the provided subscription to update.
|
|
2094
|
+
// Must be specified and non-empty.
|
|
2095
|
+
google.protobuf.FieldMask update_mask = 2
|
|
2096
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
// Request for the `ListSubscriptions` method.
|
|
2100
|
+
message ListSubscriptionsRequest {
|
|
2101
|
+
// Required. The name of the project in which to list subscriptions.
|
|
2102
|
+
// Format is `projects/{project-id}`.
|
|
2103
|
+
string project = 1 [
|
|
2104
|
+
(google.api.field_behavior) = REQUIRED,
|
|
2105
|
+
(google.api.resource_reference) = {
|
|
2106
|
+
type: "cloudresourcemanager.googleapis.com/Project"
|
|
2107
|
+
}
|
|
2108
|
+
];
|
|
2109
|
+
|
|
2110
|
+
// Optional. Maximum number of subscriptions to return.
|
|
2111
|
+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
2112
|
+
|
|
2113
|
+
// Optional. The value returned by the last `ListSubscriptionsResponse`;
|
|
2114
|
+
// indicates that this is a continuation of a prior `ListSubscriptions` call,
|
|
2115
|
+
// and that the system should return the next page of data.
|
|
2116
|
+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
// Response for the `ListSubscriptions` method.
|
|
2120
|
+
message ListSubscriptionsResponse {
|
|
2121
|
+
// Optional. The subscriptions that match the request.
|
|
2122
|
+
repeated Subscription subscriptions = 1
|
|
2123
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2124
|
+
|
|
2125
|
+
// Optional. If not empty, indicates that there may be more subscriptions that
|
|
2126
|
+
// match the request; this value should be passed in a new
|
|
2127
|
+
// `ListSubscriptionsRequest` to get more subscriptions.
|
|
2128
|
+
string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
2129
|
+
}
|
|
2130
|
+
|
|
2131
|
+
// Request for the DeleteSubscription method.
|
|
2132
|
+
message DeleteSubscriptionRequest {
|
|
2133
|
+
// Required. The subscription to delete.
|
|
2134
|
+
// Format is `projects/{project}/subscriptions/{sub}`.
|
|
2135
|
+
string subscription = 1 [
|
|
2136
|
+
(google.api.field_behavior) = REQUIRED,
|
|
2137
|
+
(google.api.resource_reference) = {
|
|
2138
|
+
type: "pubsub.googleapis.com/Subscription"
|
|
2139
|
+
}
|
|
2140
|
+
];
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
// Request for the ModifyPushConfig method.
|
|
2144
|
+
message ModifyPushConfigRequest {
|
|
2145
|
+
// Required. The name of the subscription.
|
|
2146
|
+
// Format is `projects/{project}/subscriptions/{sub}`.
|
|
2147
|
+
string subscription = 1 [
|
|
2148
|
+
(google.api.field_behavior) = REQUIRED,
|
|
2149
|
+
(google.api.resource_reference) = {
|
|
2150
|
+
type: "pubsub.googleapis.com/Subscription"
|
|
2151
|
+
}
|
|
2152
|
+
];
|
|
2153
|
+
|
|
2154
|
+
// Required. The push configuration for future deliveries.
|
|
2155
|
+
//
|
|
2156
|
+
// An empty `pushConfig` indicates that the Pub/Sub system should
|
|
2157
|
+
// stop pushing messages from the given subscription and allow
|
|
2158
|
+
// messages to be pulled and acknowledged - effectively pausing
|
|
2159
|
+
// the subscription if `Pull` or `StreamingPull` is not called.
|
|
2160
|
+
PushConfig push_config = 2 [(google.api.field_behavior) = REQUIRED];
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
// Request for the `Pull` method.
|
|
2164
|
+
message PullRequest {
|
|
2165
|
+
// Required. The subscription from which messages should be pulled.
|
|
2166
|
+
// Format is `projects/{project}/subscriptions/{sub}`.
|
|
2167
|
+
string subscription = 1 [
|
|
2168
|
+
(google.api.field_behavior) = REQUIRED,
|
|
2169
|
+
(google.api.resource_reference) = {
|
|
2170
|
+
type: "pubsub.googleapis.com/Subscription"
|
|
2171
|
+
}
|
|
2172
|
+
];
|
|
2173
|
+
|
|
2174
|
+
// Optional. If this field set to true, the system will respond immediately
|
|
2175
|
+
// even if it there are no messages available to return in the `Pull`
|
|
2176
|
+
// response. Otherwise, the system may wait (for a bounded amount of time)
|
|
2177
|
+
// until at least one message is available, rather than returning no messages.
|
|
2178
|
+
// Warning: setting this field to `true` is discouraged because it adversely
|
|
2179
|
+
// impacts the performance of `Pull` operations. We recommend that users do
|
|
2180
|
+
// not set this field.
|
|
2181
|
+
bool return_immediately = 2
|
|
2182
|
+
[deprecated = true, (google.api.field_behavior) = OPTIONAL];
|
|
2183
|
+
|
|
2184
|
+
// Required. The maximum number of messages to return for this request. Must
|
|
2185
|
+
// be a positive integer. The Pub/Sub system may return fewer than the number
|
|
2186
|
+
// specified.
|
|
2187
|
+
int32 max_messages = 3 [(google.api.field_behavior) = REQUIRED];
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2190
|
+
// Response for the `Pull` method.
|
|
2191
|
+
message PullResponse {
|
|
2192
|
+
// Optional. Received Pub/Sub messages. The list will be empty if there are no
|
|
2193
|
+
// more messages available in the backlog, or if no messages could be returned
|
|
2194
|
+
// before the request timeout. For JSON, the response can be entirely
|
|
2195
|
+
// empty. The Pub/Sub system may return fewer than the `maxMessages` requested
|
|
2196
|
+
// even if there are more messages available in the backlog.
|
|
2197
|
+
repeated ReceivedMessage received_messages = 1
|
|
2198
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2199
|
+
}
|
|
2200
|
+
|
|
2201
|
+
// Request for the ModifyAckDeadline method.
|
|
2202
|
+
message ModifyAckDeadlineRequest {
|
|
2203
|
+
// Required. The name of the subscription.
|
|
2204
|
+
// Format is `projects/{project}/subscriptions/{sub}`.
|
|
2205
|
+
string subscription = 1 [
|
|
2206
|
+
(google.api.field_behavior) = REQUIRED,
|
|
2207
|
+
(google.api.resource_reference) = {
|
|
2208
|
+
type: "pubsub.googleapis.com/Subscription"
|
|
2209
|
+
}
|
|
2210
|
+
];
|
|
2211
|
+
|
|
2212
|
+
// Required. List of acknowledgment IDs.
|
|
2213
|
+
repeated string ack_ids = 4 [(google.api.field_behavior) = REQUIRED];
|
|
2214
|
+
|
|
2215
|
+
// Required. The new ack deadline with respect to the time this request was
|
|
2216
|
+
// sent to the Pub/Sub system. For example, if the value is 10, the new ack
|
|
2217
|
+
// deadline will expire 10 seconds after the `ModifyAckDeadline` call was
|
|
2218
|
+
// made. Specifying zero might immediately make the message available for
|
|
2219
|
+
// delivery to another subscriber client. This typically results in an
|
|
2220
|
+
// increase in the rate of message redeliveries (that is, duplicates).
|
|
2221
|
+
// The minimum deadline you can specify is 0 seconds.
|
|
2222
|
+
// The maximum deadline you can specify in a single request is 600 seconds
|
|
2223
|
+
// (10 minutes).
|
|
2224
|
+
int32 ack_deadline_seconds = 3 [(google.api.field_behavior) = REQUIRED];
|
|
2225
|
+
}
|
|
2226
|
+
|
|
2227
|
+
// Request for the Acknowledge method.
|
|
2228
|
+
message AcknowledgeRequest {
|
|
2229
|
+
// Required. The subscription whose message is being acknowledged.
|
|
2230
|
+
// Format is `projects/{project}/subscriptions/{sub}`.
|
|
2231
|
+
string subscription = 1 [
|
|
2232
|
+
(google.api.field_behavior) = REQUIRED,
|
|
2233
|
+
(google.api.resource_reference) = {
|
|
2234
|
+
type: "pubsub.googleapis.com/Subscription"
|
|
2235
|
+
}
|
|
2236
|
+
];
|
|
2237
|
+
|
|
2238
|
+
// Required. The acknowledgment ID for the messages being acknowledged that
|
|
2239
|
+
// was returned by the Pub/Sub system in the `Pull` response. Must not be
|
|
2240
|
+
// empty.
|
|
2241
|
+
repeated string ack_ids = 2 [(google.api.field_behavior) = REQUIRED];
|
|
2242
|
+
}
|
|
2243
|
+
|
|
2244
|
+
// Request for the `StreamingPull` streaming RPC method. This request is used to
|
|
2245
|
+
// establish the initial stream as well as to stream acknowledgments and ack
|
|
2246
|
+
// deadline modifications from the client to the server.
|
|
2247
|
+
message StreamingPullRequest {
|
|
2248
|
+
// Required. The subscription for which to initialize the new stream. This
|
|
2249
|
+
// must be provided in the first request on the stream, and must not be set in
|
|
2250
|
+
// subsequent requests from client to server.
|
|
2251
|
+
// Format is `projects/{project}/subscriptions/{sub}`.
|
|
2252
|
+
string subscription = 1 [
|
|
2253
|
+
(google.api.field_behavior) = REQUIRED,
|
|
2254
|
+
(google.api.resource_reference) = {
|
|
2255
|
+
type: "pubsub.googleapis.com/Subscription"
|
|
2256
|
+
}
|
|
2257
|
+
];
|
|
2258
|
+
|
|
2259
|
+
// Optional. List of acknowledgment IDs for acknowledging previously received
|
|
2260
|
+
// messages (received on this stream or a different stream). If an ack ID has
|
|
2261
|
+
// expired, the corresponding message may be redelivered later. Acknowledging
|
|
2262
|
+
// a message more than once will not result in an error. If the acknowledgment
|
|
2263
|
+
// ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
|
|
2264
|
+
repeated string ack_ids = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
2265
|
+
|
|
2266
|
+
// Optional. The list of new ack deadlines for the IDs listed in
|
|
2267
|
+
// `modify_deadline_ack_ids`. The size of this list must be the same as the
|
|
2268
|
+
// size of `modify_deadline_ack_ids`. If it differs the stream will be aborted
|
|
2269
|
+
// with `INVALID_ARGUMENT`. Each element in this list is applied to the
|
|
2270
|
+
// element in the same position in `modify_deadline_ack_ids`. The new ack
|
|
2271
|
+
// deadline is with respect to the time this request was sent to the Pub/Sub
|
|
2272
|
+
// system. Must be >= 0. For example, if the value is 10, the new ack deadline
|
|
2273
|
+
// will expire 10 seconds after this request is received. If the value is 0,
|
|
2274
|
+
// the message is immediately made available for another streaming or
|
|
2275
|
+
// non-streaming pull request. If the value is < 0 (an error), the stream will
|
|
2276
|
+
// be aborted with status `INVALID_ARGUMENT`.
|
|
2277
|
+
repeated int32 modify_deadline_seconds = 3
|
|
2278
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2279
|
+
|
|
2280
|
+
// Optional. List of acknowledgment IDs whose deadline will be modified based
|
|
2281
|
+
// on the corresponding element in `modify_deadline_seconds`. This field can
|
|
2282
|
+
// be used to indicate that more time is needed to process a message by the
|
|
2283
|
+
// subscriber, or to make the message available for redelivery if the
|
|
2284
|
+
// processing was interrupted.
|
|
2285
|
+
repeated string modify_deadline_ack_ids = 4
|
|
2286
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2287
|
+
|
|
2288
|
+
// Required. The ack deadline to use for the stream. This must be provided in
|
|
2289
|
+
// the first request on the stream, but it can also be updated on subsequent
|
|
2290
|
+
// requests from client to server. The minimum deadline you can specify is 10
|
|
2291
|
+
// seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
|
|
2292
|
+
int32 stream_ack_deadline_seconds = 5
|
|
2293
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
2294
|
+
|
|
2295
|
+
// Optional. A unique identifier that is used to distinguish client instances
|
|
2296
|
+
// from each other. Only needs to be provided on the initial request. When a
|
|
2297
|
+
// stream disconnects and reconnects for the same stream, the client_id should
|
|
2298
|
+
// be set to the same value so that state associated with the old stream can
|
|
2299
|
+
// be transferred to the new stream. The same client_id should not be used for
|
|
2300
|
+
// different client instances.
|
|
2301
|
+
string client_id = 6 [(google.api.field_behavior) = OPTIONAL];
|
|
2302
|
+
|
|
2303
|
+
// Optional. Flow control settings for the maximum number of outstanding
|
|
2304
|
+
// messages. When there are `max_outstanding_messages` currently sent to the
|
|
2305
|
+
// streaming pull client that have not yet been acked or nacked, the server
|
|
2306
|
+
// stops sending more messages. The sending of messages resumes once the
|
|
2307
|
+
// number of outstanding messages is less than this value. If the value is
|
|
2308
|
+
// <= 0, there is no limit to the number of outstanding messages. This
|
|
2309
|
+
// property can only be set on the initial StreamingPullRequest. If it is set
|
|
2310
|
+
// on a subsequent request, the stream will be aborted with status
|
|
2311
|
+
// `INVALID_ARGUMENT`.
|
|
2312
|
+
int64 max_outstanding_messages = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
2313
|
+
|
|
2314
|
+
// Optional. Flow control settings for the maximum number of outstanding
|
|
2315
|
+
// bytes. When there are `max_outstanding_bytes` or more worth of messages
|
|
2316
|
+
// currently sent to the streaming pull client that have not yet been acked or
|
|
2317
|
+
// nacked, the server will stop sending more messages. The sending of messages
|
|
2318
|
+
// resumes once the number of outstanding bytes is less than this value. If
|
|
2319
|
+
// the value is <= 0, there is no limit to the number of outstanding bytes.
|
|
2320
|
+
// This property can only be set on the initial StreamingPullRequest. If it is
|
|
2321
|
+
// set on a subsequent request, the stream will be aborted with status
|
|
2322
|
+
// `INVALID_ARGUMENT`.
|
|
2323
|
+
int64 max_outstanding_bytes = 8 [(google.api.field_behavior) = OPTIONAL];
|
|
2324
|
+
|
|
2325
|
+
// Optional. The protocol version used by the client. This property can only
|
|
2326
|
+
// be set on the initial StreamingPullRequest. If it is set on a subsequent
|
|
2327
|
+
// request, the stream will be aborted with status `INVALID_ARGUMENT`.
|
|
2328
|
+
int64 protocol_version = 10 [(google.api.field_behavior) = OPTIONAL];
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
// Response for the `StreamingPull` method. This response is used to stream
|
|
2332
|
+
// messages from the server to the client.
|
|
2333
|
+
message StreamingPullResponse {
|
|
2334
|
+
// Acknowledgment IDs sent in one or more previous requests to acknowledge a
|
|
2335
|
+
// previously received message.
|
|
2336
|
+
message AcknowledgeConfirmation {
|
|
2337
|
+
// Optional. Successfully processed acknowledgment IDs.
|
|
2338
|
+
repeated string ack_ids = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2339
|
+
|
|
2340
|
+
// Optional. List of acknowledgment IDs that were malformed or whose
|
|
2341
|
+
// acknowledgment deadline has expired.
|
|
2342
|
+
repeated string invalid_ack_ids = 2
|
|
2343
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2344
|
+
|
|
2345
|
+
// Optional. List of acknowledgment IDs that were out of order.
|
|
2346
|
+
repeated string unordered_ack_ids = 3
|
|
2347
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2348
|
+
|
|
2349
|
+
// Optional. List of acknowledgment IDs that failed processing with
|
|
2350
|
+
// temporary issues.
|
|
2351
|
+
repeated string temporary_failed_ack_ids = 4
|
|
2352
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
// Acknowledgment IDs sent in one or more previous requests to modify the
|
|
2356
|
+
// deadline for a specific message.
|
|
2357
|
+
message ModifyAckDeadlineConfirmation {
|
|
2358
|
+
// Optional. Successfully processed acknowledgment IDs.
|
|
2359
|
+
repeated string ack_ids = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2360
|
+
|
|
2361
|
+
// Optional. List of acknowledgment IDs that were malformed or whose
|
|
2362
|
+
// acknowledgment deadline has expired.
|
|
2363
|
+
repeated string invalid_ack_ids = 2
|
|
2364
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2365
|
+
|
|
2366
|
+
// Optional. List of acknowledgment IDs that failed processing with
|
|
2367
|
+
// temporary issues.
|
|
2368
|
+
repeated string temporary_failed_ack_ids = 3
|
|
2369
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2372
|
+
// Subscription properties sent as part of the response.
|
|
2373
|
+
message SubscriptionProperties {
|
|
2374
|
+
// Optional. True iff exactly once delivery is enabled for this
|
|
2375
|
+
// subscription.
|
|
2376
|
+
bool exactly_once_delivery_enabled = 1
|
|
2377
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2378
|
+
|
|
2379
|
+
// Optional. True iff message ordering is enabled for this subscription.
|
|
2380
|
+
bool message_ordering_enabled = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
// Optional. Received Pub/Sub messages.
|
|
2384
|
+
repeated ReceivedMessage received_messages = 1
|
|
2385
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2386
|
+
|
|
2387
|
+
// Optional. This field will only be set if `enable_exactly_once_delivery` is
|
|
2388
|
+
// set to `true` and is not guaranteed to be populated.
|
|
2389
|
+
AcknowledgeConfirmation acknowledge_confirmation = 5
|
|
2390
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2391
|
+
|
|
2392
|
+
// Optional. This field will only be set if `enable_exactly_once_delivery` is
|
|
2393
|
+
// set to `true` and is not guaranteed to be populated.
|
|
2394
|
+
ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3
|
|
2395
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2396
|
+
|
|
2397
|
+
// Optional. Properties associated with this subscription.
|
|
2398
|
+
SubscriptionProperties subscription_properties = 4
|
|
2399
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
// Request for the `CreateSnapshot` method.
|
|
2403
|
+
message CreateSnapshotRequest {
|
|
2404
|
+
// Required. User-provided name for this snapshot. If the name is not provided
|
|
2405
|
+
// in the request, the server will assign a random name for this snapshot on
|
|
2406
|
+
// the same project as the subscription. Note that for REST API requests, you
|
|
2407
|
+
// must specify a name. See the [resource name
|
|
2408
|
+
// rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
|
|
2409
|
+
// Format is `projects/{project}/snapshots/{snap}`.
|
|
2410
|
+
string name = 1 [
|
|
2411
|
+
(google.api.field_behavior) = REQUIRED,
|
|
2412
|
+
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Snapshot" }
|
|
2413
|
+
];
|
|
2414
|
+
|
|
2415
|
+
// Required. The subscription whose backlog the snapshot retains.
|
|
2416
|
+
// Specifically, the created snapshot is guaranteed to retain:
|
|
2417
|
+
// (a) The existing backlog on the subscription. More precisely, this is
|
|
2418
|
+
// defined as the messages in the subscription's backlog that are
|
|
2419
|
+
// unacknowledged upon the successful completion of the
|
|
2420
|
+
// `CreateSnapshot` request; as well as:
|
|
2421
|
+
// (b) Any messages published to the subscription's topic following the
|
|
2422
|
+
// successful completion of the CreateSnapshot request.
|
|
2423
|
+
// Format is `projects/{project}/subscriptions/{sub}`.
|
|
2424
|
+
string subscription = 2 [
|
|
2425
|
+
(google.api.field_behavior) = REQUIRED,
|
|
2426
|
+
(google.api.resource_reference) = {
|
|
2427
|
+
type: "pubsub.googleapis.com/Subscription"
|
|
2428
|
+
}
|
|
2429
|
+
];
|
|
2430
|
+
|
|
2431
|
+
// Optional. See [Creating and managing
|
|
2432
|
+
// labels](https://cloud.google.com/pubsub/docs/labels).
|
|
2433
|
+
map<string, string> labels = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
2434
|
+
|
|
2435
|
+
// Optional. Input only. Immutable. Tag keys/values directly bound to this
|
|
2436
|
+
// resource. For example:
|
|
2437
|
+
// "123/environment": "production",
|
|
2438
|
+
// "123/costCenter": "marketing"
|
|
2439
|
+
// See https://docs.cloud.google.com/pubsub/docs/tags for more information on
|
|
2440
|
+
// using tags with Pub/Sub resources.
|
|
2441
|
+
map<string, string> tags = 4 [
|
|
2442
|
+
(google.api.field_behavior) = INPUT_ONLY,
|
|
2443
|
+
(google.api.field_behavior) = IMMUTABLE,
|
|
2444
|
+
(google.api.field_behavior) = OPTIONAL
|
|
2445
|
+
];
|
|
2446
|
+
}
|
|
2447
|
+
|
|
2448
|
+
// Request for the UpdateSnapshot method.
|
|
2449
|
+
message UpdateSnapshotRequest {
|
|
2450
|
+
// Required. The updated snapshot object.
|
|
2451
|
+
Snapshot snapshot = 1 [(google.api.field_behavior) = REQUIRED];
|
|
2452
|
+
|
|
2453
|
+
// Required. Indicates which fields in the provided snapshot to update.
|
|
2454
|
+
// Must be specified and non-empty.
|
|
2455
|
+
google.protobuf.FieldMask update_mask = 2
|
|
2456
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
2457
|
+
}
|
|
2458
|
+
|
|
2459
|
+
// A snapshot resource. Snapshots are used in
|
|
2460
|
+
// [Seek](https://cloud.google.com/pubsub/docs/replay-overview)
|
|
2461
|
+
// operations, which allow you to manage message acknowledgments in bulk. That
|
|
2462
|
+
// is, you can set the acknowledgment state of messages in an existing
|
|
2463
|
+
// subscription to the state captured by a snapshot.
|
|
2464
|
+
message Snapshot {
|
|
2465
|
+
option (google.api.resource) = {
|
|
2466
|
+
type: "pubsub.googleapis.com/Snapshot"
|
|
2467
|
+
pattern: "projects/{project}/snapshots/{snapshot}"
|
|
2468
|
+
plural: "snapshots"
|
|
2469
|
+
singular: "snapshot"
|
|
2470
|
+
};
|
|
2471
|
+
|
|
2472
|
+
// Optional. The name of the snapshot.
|
|
2473
|
+
string name = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2474
|
+
|
|
2475
|
+
// Optional. The name of the topic from which this snapshot is retaining
|
|
2476
|
+
// messages.
|
|
2477
|
+
string topic = 2 [
|
|
2478
|
+
(google.api.field_behavior) = OPTIONAL,
|
|
2479
|
+
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }
|
|
2480
|
+
];
|
|
2481
|
+
|
|
2482
|
+
// Optional. The snapshot is guaranteed to exist up until this time.
|
|
2483
|
+
// A newly-created snapshot expires no later than 7 days from the time of its
|
|
2484
|
+
// creation. Its exact lifetime is determined at creation by the existing
|
|
2485
|
+
// backlog in the source subscription. Specifically, the lifetime of the
|
|
2486
|
+
// snapshot is `7 days - (age of oldest unacked message in the subscription)`.
|
|
2487
|
+
// For example, consider a subscription whose oldest unacked message is 3 days
|
|
2488
|
+
// old. If a snapshot is created from this subscription, the snapshot -- which
|
|
2489
|
+
// will always capture this 3-day-old backlog as long as the snapshot
|
|
2490
|
+
// exists -- will expire in 4 days. The service will refuse to create a
|
|
2491
|
+
// snapshot that would expire in less than 1 hour after creation.
|
|
2492
|
+
google.protobuf.Timestamp expire_time = 3
|
|
2493
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2494
|
+
|
|
2495
|
+
// Optional. See [Creating and managing labels]
|
|
2496
|
+
// (https://cloud.google.com/pubsub/docs/labels).
|
|
2497
|
+
map<string, string> labels = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2500
|
+
// Request for the GetSnapshot method.
|
|
2501
|
+
message GetSnapshotRequest {
|
|
2502
|
+
// Required. The name of the snapshot to get.
|
|
2503
|
+
// Format is `projects/{project}/snapshots/{snap}`.
|
|
2504
|
+
string snapshot = 1 [
|
|
2505
|
+
(google.api.field_behavior) = REQUIRED,
|
|
2506
|
+
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Snapshot" }
|
|
2507
|
+
];
|
|
2508
|
+
}
|
|
2509
|
+
|
|
2510
|
+
// Request for the `ListSnapshots` method.
|
|
2511
|
+
message ListSnapshotsRequest {
|
|
2512
|
+
// Required. The name of the project in which to list snapshots.
|
|
2513
|
+
// Format is `projects/{project-id}`.
|
|
2514
|
+
string project = 1 [
|
|
2515
|
+
(google.api.field_behavior) = REQUIRED,
|
|
2516
|
+
(google.api.resource_reference) = {
|
|
2517
|
+
type: "cloudresourcemanager.googleapis.com/Project"
|
|
2518
|
+
}
|
|
2519
|
+
];
|
|
2520
|
+
|
|
2521
|
+
// Optional. Maximum number of snapshots to return.
|
|
2522
|
+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
2523
|
+
|
|
2524
|
+
// Optional. The value returned by the last `ListSnapshotsResponse`; indicates
|
|
2525
|
+
// that this is a continuation of a prior `ListSnapshots` call, and that the
|
|
2526
|
+
// system should return the next page of data.
|
|
2527
|
+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
2528
|
+
}
|
|
2529
|
+
|
|
2530
|
+
// Response for the `ListSnapshots` method.
|
|
2531
|
+
message ListSnapshotsResponse {
|
|
2532
|
+
// Optional. The resulting snapshots.
|
|
2533
|
+
repeated Snapshot snapshots = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2534
|
+
|
|
2535
|
+
// Optional. If not empty, indicates that there may be more snapshot that
|
|
2536
|
+
// match the request; this value should be passed in a new
|
|
2537
|
+
// `ListSnapshotsRequest`.
|
|
2538
|
+
string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
2539
|
+
}
|
|
2540
|
+
|
|
2541
|
+
// Request for the `DeleteSnapshot` method.
|
|
2542
|
+
message DeleteSnapshotRequest {
|
|
2543
|
+
// Required. The name of the snapshot to delete.
|
|
2544
|
+
// Format is `projects/{project}/snapshots/{snap}`.
|
|
2545
|
+
string snapshot = 1 [
|
|
2546
|
+
(google.api.field_behavior) = REQUIRED,
|
|
2547
|
+
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Snapshot" }
|
|
2548
|
+
];
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
// Request for the `Seek` method.
|
|
2552
|
+
message SeekRequest {
|
|
2553
|
+
// Required. The subscription to affect.
|
|
2554
|
+
string subscription = 1 [
|
|
2555
|
+
(google.api.field_behavior) = REQUIRED,
|
|
2556
|
+
(google.api.resource_reference) = {
|
|
2557
|
+
type: "pubsub.googleapis.com/Subscription"
|
|
2558
|
+
}
|
|
2559
|
+
];
|
|
2560
|
+
|
|
2561
|
+
oneof target {
|
|
2562
|
+
// Optional. The time to seek to.
|
|
2563
|
+
// Messages retained in the subscription that were published before this
|
|
2564
|
+
// time are marked as acknowledged, and messages retained in the
|
|
2565
|
+
// subscription that were published after this time are marked as
|
|
2566
|
+
// unacknowledged. Note that this operation affects only those messages
|
|
2567
|
+
// retained in the subscription (configured by the combination of
|
|
2568
|
+
// `message_retention_duration` and `retain_acked_messages`). For example,
|
|
2569
|
+
// if `time` corresponds to a point before the message retention
|
|
2570
|
+
// window (or to a point before the system's notion of the subscription
|
|
2571
|
+
// creation time), only retained messages will be marked as unacknowledged,
|
|
2572
|
+
// and already-expunged messages will not be restored.
|
|
2573
|
+
google.protobuf.Timestamp time = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
2574
|
+
|
|
2575
|
+
// Optional. The snapshot to seek to. The snapshot's topic must be the same
|
|
2576
|
+
// as that of the provided subscription. Format is
|
|
2577
|
+
// `projects/{project}/snapshots/{snap}`.
|
|
2578
|
+
string snapshot = 3 [
|
|
2579
|
+
(google.api.field_behavior) = OPTIONAL,
|
|
2580
|
+
(google.api.resource_reference) = {
|
|
2581
|
+
type: "pubsub.googleapis.com/Snapshot"
|
|
2582
|
+
}
|
|
2583
|
+
];
|
|
2584
|
+
}
|
|
2585
|
+
}
|
|
2586
|
+
|
|
2587
|
+
// Response for the `Seek` method (this response is empty).
|
|
2588
|
+
message SeekResponse {}
|