/
bigtable_table_admin.proto
556 lines (487 loc) · 22.3 KB
/
bigtable_table_admin.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
// Copyright 2018 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";
package google.bigtable.admin.v2;
import "google/api/annotations.proto";
import "google/bigtable/admin/v2/table.proto";
import "google/iam/v1/iam_policy.proto";
import "google/iam/v1/policy.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2";
option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin";
option java_multiple_files = true;
option java_outer_classname = "BigtableTableAdminProto";
option java_package = "com.google.bigtable.admin.v2";
option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2";
// Service for creating, configuring, and deleting Cloud Bigtable tables.
//
//
// Provides access to the table schemas only, not the data stored within
// the tables.
service BigtableTableAdmin {
// Creates a new table in the specified instance.
// The table can be created with a full set of initial column families,
// specified in the request.
rpc CreateTable(CreateTableRequest) returns (Table) {
option (google.api.http) = {
post: "/v2/{parent=projects/*/instances/*}/tables"
body: "*"
};
}
// Creates a new table from the specified snapshot. The target table must
// not exist. The snapshot and the table must be in the same instance.
//
// Note: This is a private alpha release of Cloud Bigtable snapshots. This
// feature is not currently available to most Cloud Bigtable customers. This
// feature might be changed in backward-incompatible ways and is not
// recommended for production use. It is not subject to any SLA or deprecation
// policy.
rpc CreateTableFromSnapshot(CreateTableFromSnapshotRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2/{parent=projects/*/instances/*}/tables:createFromSnapshot"
body: "*"
};
}
// Lists all tables served from a specified instance.
rpc ListTables(ListTablesRequest) returns (ListTablesResponse) {
option (google.api.http) = {
get: "/v2/{parent=projects/*/instances/*}/tables"
};
}
// Gets metadata information about the specified table.
rpc GetTable(GetTableRequest) returns (Table) {
option (google.api.http) = {
get: "/v2/{name=projects/*/instances/*/tables/*}"
};
}
// Permanently deletes a specified table and all of its data.
rpc DeleteTable(DeleteTableRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v2/{name=projects/*/instances/*/tables/*}"
};
}
// Performs a series of column family modifications on the specified table.
// Either all or none of the modifications will occur before this method
// returns, but data requests received prior to that point may see a table
// where only some modifications have taken effect.
rpc ModifyColumnFamilies(ModifyColumnFamiliesRequest) returns (Table) {
option (google.api.http) = {
post: "/v2/{name=projects/*/instances/*/tables/*}:modifyColumnFamilies"
body: "*"
};
}
// Permanently drop/delete a row range from a specified table. The request can
// specify whether to delete all rows in a table, or only those that match a
// particular prefix.
rpc DropRowRange(DropRowRangeRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/v2/{name=projects/*/instances/*/tables/*}:dropRowRange"
body: "*"
};
}
// Generates a consistency token for a Table, which can be used in
// CheckConsistency to check whether mutations to the table that finished
// before this call started have been replicated. The tokens will be available
// for 90 days.
rpc GenerateConsistencyToken(GenerateConsistencyTokenRequest)
returns (GenerateConsistencyTokenResponse) {
option (google.api.http) = {
post: "/v2/{name=projects/*/instances/*/tables/*}:generateConsistencyToken"
body: "*"
};
}
// Checks replication consistency based on a consistency token, that is, if
// replication has caught up based on the conditions specified in the token
// and the check request.
rpc CheckConsistency(CheckConsistencyRequest)
returns (CheckConsistencyResponse) {
option (google.api.http) = {
post: "/v2/{name=projects/*/instances/*/tables/*}:checkConsistency"
body: "*"
};
}
// Creates a new snapshot in the specified cluster from the specified
// source table. The cluster and the table must be in the same instance.
//
// Note: This is a private alpha release of Cloud Bigtable snapshots. This
// feature is not currently available to most Cloud Bigtable customers. This
// feature might be changed in backward-incompatible ways and is not
// recommended for production use. It is not subject to any SLA or deprecation
// policy.
rpc SnapshotTable(SnapshotTableRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2/{name=projects/*/instances/*/tables/*}:snapshot"
body: "*"
};
}
// Gets metadata information about the specified snapshot.
//
// Note: This is a private alpha release of Cloud Bigtable snapshots. This
// feature is not currently available to most Cloud Bigtable customers. This
// feature might be changed in backward-incompatible ways and is not
// recommended for production use. It is not subject to any SLA or deprecation
// policy.
rpc GetSnapshot(GetSnapshotRequest) returns (Snapshot) {
option (google.api.http) = {
get: "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}"
};
}
// Lists all snapshots associated with the specified cluster.
//
// Note: This is a private alpha release of Cloud Bigtable snapshots. This
// feature is not currently available to most Cloud Bigtable customers. This
// feature might be changed in backward-incompatible ways and is not
// recommended for production use. It is not subject to any SLA or deprecation
// policy.
rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) {
option (google.api.http) = {
get: "/v2/{parent=projects/*/instances/*/clusters/*}/snapshots"
};
}
// Permanently deletes the specified snapshot.
//
// Note: This is a private alpha release of Cloud Bigtable snapshots. This
// feature is not currently available to most Cloud Bigtable customers. This
// feature might be changed in backward-incompatible ways and is not
// recommended for production use. It is not subject to any SLA or deprecation
// policy.
rpc DeleteSnapshot(DeleteSnapshotRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}"
};
}
// Gets the access control policy for a table resource. Returns an empty
// policy if an table exists but does not have a policy set.
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
option (google.api.http) = {
post: "/v2/{resource=projects/*/instances/*/tables/*}:getIamPolicy"
body: "*"
};
}
// Sets the access control policy on a table resource. Replaces any existing
// policy.
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
option (google.api.http) = {
post: "/v2/{resource=projects/*/instances/*/tables/*}:setIamPolicy"
body: "*"
};
}
// Returns permissions that the caller has on the specified table resource.
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
option (google.api.http) = {
post: "/v2/{resource=projects/*/instances/*/tables/*}:testIamPermissions"
body: "*"
};
}
}
// Request message for
// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable][google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]
message CreateTableRequest {
// An initial split point for a newly created table.
message Split {
// Row key to use as an initial tablet boundary.
bytes key = 1;
}
// The unique name of the instance in which to create the table.
// Values are of the form `projects/<project>/instances/<instance>`.
string parent = 1;
// The name by which the new table should be referred to within the parent
// instance, e.g., `foobar` rather than `<parent>/tables/foobar`.
string table_id = 2;
// The Table to create.
Table table = 3;
// The optional list of row keys that will be used to initially split the
// table into several tablets (tablets are similar to HBase regions).
// Given two split keys, `s1` and `s2`, three tablets will be created,
// spanning the key ranges: `[, s1), [s1, s2), [s2, )`.
//
// Example:
//
// * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",`
// `"other", "zz"]`
// * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]`
// * Key assignment:
// - Tablet 1 `[, apple) => {"a"}.`
// - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.`
// - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.`
// - Tablet 4 `[customer_2, other) => {"customer_2"}.`
// - Tablet 5 `[other, ) => {"other", "zz"}.`
repeated Split initial_splits = 4;
}
// Request message for
// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot]
//
// Note: This is a private alpha release of Cloud Bigtable snapshots. This
// feature is not currently available to most Cloud Bigtable customers. This
// feature might be changed in backward-incompatible ways and is not recommended
// for production use. It is not subject to any SLA or deprecation policy.
message CreateTableFromSnapshotRequest {
// The unique name of the instance in which to create the table.
// Values are of the form `projects/<project>/instances/<instance>`.
string parent = 1;
// The name by which the new table should be referred to within the parent
// instance, e.g., `foobar` rather than `<parent>/tables/foobar`.
string table_id = 2;
// The unique name of the snapshot from which to restore the table. The
// snapshot and the table must be in the same instance.
// Values are of the form
// `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`.
string source_snapshot = 3;
}
// Request message for
// [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange][google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]
message DropRowRangeRequest {
// The unique name of the table on which to drop a range of rows.
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>`.
string name = 1;
// Delete all rows or by prefix.
oneof target {
// Delete all rows that start with this row key prefix. Prefix cannot be
// zero length.
bytes row_key_prefix = 2;
// Delete all rows in the table. Setting this to false is a no-op.
bool delete_all_data_from_table = 3;
}
}
// Request message for
// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
message ListTablesRequest {
// The unique name of the instance for which tables should be listed.
// Values are of the form `projects/<project>/instances/<instance>`.
string parent = 1;
// The view to be applied to the returned tables' fields.
// Defaults to `NAME_ONLY` if unspecified; no others are currently supported.
Table.View view = 2;
// Maximum number of results per page.
// CURRENTLY UNIMPLEMENTED AND IGNORED.
int32 page_size = 4;
// The value of `next_page_token` returned by a previous call.
string page_token = 3;
}
// Response message for
// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
message ListTablesResponse {
// The tables present in the requested instance.
repeated Table tables = 1;
// Set if not all tables could be returned in a single response.
// Pass this value to `page_token` in another request to get the next
// page of results.
string next_page_token = 2;
}
// Request message for
// [google.bigtable.admin.v2.BigtableTableAdmin.GetTable][google.bigtable.admin.v2.BigtableTableAdmin.GetTable]
message GetTableRequest {
// The unique name of the requested table.
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>`.
string name = 1;
// The view to be applied to the returned table's fields.
// Defaults to `SCHEMA_VIEW` if unspecified.
Table.View view = 2;
}
// Request message for
// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]
message DeleteTableRequest {
// The unique name of the table to be deleted.
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>`.
string name = 1;
}
// Request message for
// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]
message ModifyColumnFamiliesRequest {
// A create, update, or delete of a particular column family.
message Modification {
// The ID of the column family to be modified.
string id = 1;
// Column familiy modifications.
oneof mod {
// Create a new column family with the specified schema, or fail if
// one already exists with the given ID.
ColumnFamily create = 2;
// Update an existing column family to the specified schema, or fail
// if no column family exists with the given ID.
ColumnFamily update = 3;
// Drop (delete) the column family with the given ID, or fail if no such
// family exists.
bool drop = 4;
}
}
// The unique name of the table whose families should be modified.
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>`.
string name = 1;
// Modifications to be atomically applied to the specified table's families.
// Entries are applied in order, meaning that earlier modifications can be
// masked by later ones (in the case of repeated updates to the same family,
// for example).
repeated Modification modifications = 2;
}
// Request message for
// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
message GenerateConsistencyTokenRequest {
// The unique name of the Table for which to create a consistency token.
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>`.
string name = 1;
}
// Response message for
// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
message GenerateConsistencyTokenResponse {
// The generated consistency token.
string consistency_token = 1;
}
// Request message for
// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
message CheckConsistencyRequest {
// The unique name of the Table for which to check replication consistency.
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>`.
string name = 1;
// The token created using GenerateConsistencyToken for the Table.
string consistency_token = 2;
}
// Response message for
// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
message CheckConsistencyResponse {
// True only if the token is consistent. A token is consistent if replication
// has caught up with the restrictions specified in the request.
bool consistent = 1;
}
// Request message for
// [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable][google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable]
//
// Note: This is a private alpha release of Cloud Bigtable snapshots. This
// feature is not currently available to most Cloud Bigtable customers. This
// feature might be changed in backward-incompatible ways and is not recommended
// for production use. It is not subject to any SLA or deprecation policy.
message SnapshotTableRequest {
// The unique name of the table to have the snapshot taken.
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>`.
string name = 1;
// The name of the cluster where the snapshot will be created in.
// Values are of the form
// `projects/<project>/instances/<instance>/clusters/<cluster>`.
string cluster = 2;
// The ID by which the new snapshot should be referred to within the parent
// cluster, e.g., `mysnapshot` of the form: `[_a-zA-Z0-9][-_.a-zA-Z0-9]*`
// rather than
// `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/mysnapshot`.
string snapshot_id = 3;
// The amount of time that the new snapshot can stay active after it is
// created. Once 'ttl' expires, the snapshot will get deleted. The maximum
// amount of time a snapshot can stay active is 7 days. If 'ttl' is not
// specified, the default value of 24 hours will be used.
google.protobuf.Duration ttl = 4;
// Description of the snapshot.
string description = 5;
}
// Request message for
// [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot]
//
// Note: This is a private alpha release of Cloud Bigtable snapshots. This
// feature is not currently available to most Cloud Bigtable customers. This
// feature might be changed in backward-incompatible ways and is not recommended
// for production use. It is not subject to any SLA or deprecation policy.
message GetSnapshotRequest {
// The unique name of the requested snapshot.
// Values are of the form
// `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`.
string name = 1;
}
// Request message for
// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
//
// Note: This is a private alpha release of Cloud Bigtable snapshots. This
// feature is not currently available to most Cloud Bigtable customers. This
// feature might be changed in backward-incompatible ways and is not recommended
// for production use. It is not subject to any SLA or deprecation policy.
message ListSnapshotsRequest {
// The unique name of the cluster for which snapshots should be listed.
// Values are of the form
// `projects/<project>/instances/<instance>/clusters/<cluster>`.
// Use `<cluster> = '-'` to list snapshots for all clusters in an instance,
// e.g., `projects/<project>/instances/<instance>/clusters/-`.
string parent = 1;
// The maximum number of snapshots to return per page.
// CURRENTLY UNIMPLEMENTED AND IGNORED.
int32 page_size = 2;
// The value of `next_page_token` returned by a previous call.
string page_token = 3;
}
// Response message for
// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
//
// Note: This is a private alpha release of Cloud Bigtable snapshots. This
// feature is not currently available to most Cloud Bigtable customers. This
// feature might be changed in backward-incompatible ways and is not recommended
// for production use. It is not subject to any SLA or deprecation policy.
message ListSnapshotsResponse {
// The snapshots present in the requested cluster.
repeated Snapshot snapshots = 1;
// Set if not all snapshots could be returned in a single response.
// Pass this value to `page_token` in another request to get the next
// page of results.
string next_page_token = 2;
}
// Request message for
// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot]
//
// Note: This is a private alpha release of Cloud Bigtable snapshots. This
// feature is not currently available to most Cloud Bigtable customers. This
// feature might be changed in backward-incompatible ways and is not recommended
// for production use. It is not subject to any SLA or deprecation policy.
message DeleteSnapshotRequest {
// The unique name of the snapshot to be deleted.
// Values are of the form
// `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`.
string name = 1;
}
// The metadata for the Operation returned by SnapshotTable.
//
// Note: This is a private alpha release of Cloud Bigtable snapshots. This
// feature is not currently available to most Cloud Bigtable customers. This
// feature might be changed in backward-incompatible ways and is not recommended
// for production use. It is not subject to any SLA or deprecation policy.
message SnapshotTableMetadata {
// The request that prompted the initiation of this SnapshotTable operation.
SnapshotTableRequest original_request = 1;
// The time at which the original request was received.
google.protobuf.Timestamp request_time = 2;
// The time at which the operation failed or was completed successfully.
google.protobuf.Timestamp finish_time = 3;
}
// The metadata for the Operation returned by CreateTableFromSnapshot.
//
// Note: This is a private alpha release of Cloud Bigtable snapshots. This
// feature is not currently available to most Cloud Bigtable customers. This
// feature might be changed in backward-incompatible ways and is not recommended
// for production use. It is not subject to any SLA or deprecation policy.
message CreateTableFromSnapshotMetadata {
// The request that prompted the initiation of this CreateTableFromSnapshot
// operation.
CreateTableFromSnapshotRequest original_request = 1;
// The time at which the original request was received.
google.protobuf.Timestamp request_time = 2;
// The time at which the operation failed or was completed successfully.
google.protobuf.Timestamp finish_time = 3;
}