bigtable_table_admin.proto 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003
  1. // Copyright 2020 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. syntax = "proto3";
  15. package google.bigtable.admin.v2;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/bigtable/admin/v2/common.proto";
  21. import "google/bigtable/admin/v2/table.proto";
  22. import "google/iam/v1/iam_policy.proto";
  23. import "google/iam/v1/policy.proto";
  24. import "google/longrunning/operations.proto";
  25. import "google/protobuf/duration.proto";
  26. import "google/protobuf/empty.proto";
  27. import "google/protobuf/field_mask.proto";
  28. import "google/protobuf/timestamp.proto";
  29. option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2";
  30. option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin";
  31. option java_multiple_files = true;
  32. option java_outer_classname = "BigtableTableAdminProto";
  33. option java_package = "com.google.bigtable.admin.v2";
  34. option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2";
  35. option ruby_package = "Google::Cloud::Bigtable::Admin::V2";
  36. // Service for creating, configuring, and deleting Cloud Bigtable tables.
  37. //
  38. //
  39. // Provides access to the table schemas only, not the data stored within
  40. // the tables.
  41. service BigtableTableAdmin {
  42. option (google.api.default_host) = "bigtableadmin.googleapis.com";
  43. option (google.api.oauth_scopes) =
  44. "https://www.googleapis.com/auth/bigtable.admin,"
  45. "https://www.googleapis.com/auth/bigtable.admin.table,"
  46. "https://www.googleapis.com/auth/cloud-bigtable.admin,"
  47. "https://www.googleapis.com/auth/cloud-bigtable.admin.table,"
  48. "https://www.googleapis.com/auth/cloud-platform,"
  49. "https://www.googleapis.com/auth/cloud-platform.read-only";
  50. // Creates a new table in the specified instance.
  51. // The table can be created with a full set of initial column families,
  52. // specified in the request.
  53. rpc CreateTable(CreateTableRequest) returns (Table) {
  54. option (google.api.http) = {
  55. post: "/v2/{parent=projects/*/instances/*}/tables"
  56. body: "*"
  57. };
  58. option (google.api.method_signature) = "parent,table_id,table";
  59. }
  60. // Creates a new table from the specified snapshot. The target table must
  61. // not exist. The snapshot and the table must be in the same instance.
  62. //
  63. // Note: This is a private alpha release of Cloud Bigtable snapshots. This
  64. // feature is not currently available to most Cloud Bigtable customers. This
  65. // feature might be changed in backward-incompatible ways and is not
  66. // recommended for production use. It is not subject to any SLA or deprecation
  67. // policy.
  68. rpc CreateTableFromSnapshot(CreateTableFromSnapshotRequest) returns (google.longrunning.Operation) {
  69. option (google.api.http) = {
  70. post: "/v2/{parent=projects/*/instances/*}/tables:createFromSnapshot"
  71. body: "*"
  72. };
  73. option (google.api.method_signature) = "parent,table_id,source_snapshot";
  74. option (google.longrunning.operation_info) = {
  75. response_type: "Table"
  76. metadata_type: "CreateTableFromSnapshotMetadata"
  77. };
  78. }
  79. // Lists all tables served from a specified instance.
  80. rpc ListTables(ListTablesRequest) returns (ListTablesResponse) {
  81. option (google.api.http) = {
  82. get: "/v2/{parent=projects/*/instances/*}/tables"
  83. };
  84. option (google.api.method_signature) = "parent";
  85. }
  86. // Gets metadata information about the specified table.
  87. rpc GetTable(GetTableRequest) returns (Table) {
  88. option (google.api.http) = {
  89. get: "/v2/{name=projects/*/instances/*/tables/*}"
  90. };
  91. option (google.api.method_signature) = "name";
  92. }
  93. // Permanently deletes a specified table and all of its data.
  94. rpc DeleteTable(DeleteTableRequest) returns (google.protobuf.Empty) {
  95. option (google.api.http) = {
  96. delete: "/v2/{name=projects/*/instances/*/tables/*}"
  97. };
  98. option (google.api.method_signature) = "name";
  99. }
  100. // Performs a series of column family modifications on the specified table.
  101. // Either all or none of the modifications will occur before this method
  102. // returns, but data requests received prior to that point may see a table
  103. // where only some modifications have taken effect.
  104. rpc ModifyColumnFamilies(ModifyColumnFamiliesRequest) returns (Table) {
  105. option (google.api.http) = {
  106. post: "/v2/{name=projects/*/instances/*/tables/*}:modifyColumnFamilies"
  107. body: "*"
  108. };
  109. option (google.api.method_signature) = "name,modifications";
  110. }
  111. // Permanently drop/delete a row range from a specified table. The request can
  112. // specify whether to delete all rows in a table, or only those that match a
  113. // particular prefix.
  114. rpc DropRowRange(DropRowRangeRequest) returns (google.protobuf.Empty) {
  115. option (google.api.http) = {
  116. post: "/v2/{name=projects/*/instances/*/tables/*}:dropRowRange"
  117. body: "*"
  118. };
  119. }
  120. // Generates a consistency token for a Table, which can be used in
  121. // CheckConsistency to check whether mutations to the table that finished
  122. // before this call started have been replicated. The tokens will be available
  123. // for 90 days.
  124. rpc GenerateConsistencyToken(GenerateConsistencyTokenRequest) returns (GenerateConsistencyTokenResponse) {
  125. option (google.api.http) = {
  126. post: "/v2/{name=projects/*/instances/*/tables/*}:generateConsistencyToken"
  127. body: "*"
  128. };
  129. option (google.api.method_signature) = "name";
  130. }
  131. // Checks replication consistency based on a consistency token, that is, if
  132. // replication has caught up based on the conditions specified in the token
  133. // and the check request.
  134. rpc CheckConsistency(CheckConsistencyRequest) returns (CheckConsistencyResponse) {
  135. option (google.api.http) = {
  136. post: "/v2/{name=projects/*/instances/*/tables/*}:checkConsistency"
  137. body: "*"
  138. };
  139. option (google.api.method_signature) = "name,consistency_token";
  140. }
  141. // Creates a new snapshot in the specified cluster from the specified
  142. // source table. The cluster and the table must be in the same instance.
  143. //
  144. // Note: This is a private alpha release of Cloud Bigtable snapshots. This
  145. // feature is not currently available to most Cloud Bigtable customers. This
  146. // feature might be changed in backward-incompatible ways and is not
  147. // recommended for production use. It is not subject to any SLA or deprecation
  148. // policy.
  149. rpc SnapshotTable(SnapshotTableRequest) returns (google.longrunning.Operation) {
  150. option (google.api.http) = {
  151. post: "/v2/{name=projects/*/instances/*/tables/*}:snapshot"
  152. body: "*"
  153. };
  154. option (google.api.method_signature) = "name,cluster,snapshot_id,description";
  155. option (google.longrunning.operation_info) = {
  156. response_type: "Snapshot"
  157. metadata_type: "SnapshotTableMetadata"
  158. };
  159. }
  160. // Gets metadata information about the specified snapshot.
  161. //
  162. // Note: This is a private alpha release of Cloud Bigtable snapshots. This
  163. // feature is not currently available to most Cloud Bigtable customers. This
  164. // feature might be changed in backward-incompatible ways and is not
  165. // recommended for production use. It is not subject to any SLA or deprecation
  166. // policy.
  167. rpc GetSnapshot(GetSnapshotRequest) returns (Snapshot) {
  168. option (google.api.http) = {
  169. get: "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}"
  170. };
  171. option (google.api.method_signature) = "name";
  172. }
  173. // Lists all snapshots associated with the specified cluster.
  174. //
  175. // Note: This is a private alpha release of Cloud Bigtable snapshots. This
  176. // feature is not currently available to most Cloud Bigtable customers. This
  177. // feature might be changed in backward-incompatible ways and is not
  178. // recommended for production use. It is not subject to any SLA or deprecation
  179. // policy.
  180. rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) {
  181. option (google.api.http) = {
  182. get: "/v2/{parent=projects/*/instances/*/clusters/*}/snapshots"
  183. };
  184. option (google.api.method_signature) = "parent";
  185. }
  186. // Permanently deletes the specified snapshot.
  187. //
  188. // Note: This is a private alpha release of Cloud Bigtable snapshots. This
  189. // feature is not currently available to most Cloud Bigtable customers. This
  190. // feature might be changed in backward-incompatible ways and is not
  191. // recommended for production use. It is not subject to any SLA or deprecation
  192. // policy.
  193. rpc DeleteSnapshot(DeleteSnapshotRequest) returns (google.protobuf.Empty) {
  194. option (google.api.http) = {
  195. delete: "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}"
  196. };
  197. option (google.api.method_signature) = "name";
  198. }
  199. // Starts creating a new Cloud Bigtable Backup. The returned backup
  200. // [long-running operation][google.longrunning.Operation] can be used to
  201. // track creation of the backup. The
  202. // [metadata][google.longrunning.Operation.metadata] field type is
  203. // [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The
  204. // [response][google.longrunning.Operation.response] field type is
  205. // [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the returned operation will stop the
  206. // creation and delete the backup.
  207. rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) {
  208. option (google.api.http) = {
  209. post: "/v2/{parent=projects/*/instances/*/clusters/*}/backups"
  210. body: "backup"
  211. };
  212. option (google.api.method_signature) = "parent,backup_id,backup";
  213. option (google.longrunning.operation_info) = {
  214. response_type: "Backup"
  215. metadata_type: "CreateBackupMetadata"
  216. };
  217. }
  218. // Gets metadata on a pending or completed Cloud Bigtable Backup.
  219. rpc GetBackup(GetBackupRequest) returns (Backup) {
  220. option (google.api.http) = {
  221. get: "/v2/{name=projects/*/instances/*/clusters/*/backups/*}"
  222. };
  223. option (google.api.method_signature) = "name";
  224. }
  225. // Updates a pending or completed Cloud Bigtable Backup.
  226. rpc UpdateBackup(UpdateBackupRequest) returns (Backup) {
  227. option (google.api.http) = {
  228. patch: "/v2/{backup.name=projects/*/instances/*/clusters/*/backups/*}"
  229. body: "backup"
  230. };
  231. option (google.api.method_signature) = "backup,update_mask";
  232. }
  233. // Deletes a pending or completed Cloud Bigtable backup.
  234. rpc DeleteBackup(DeleteBackupRequest) returns (google.protobuf.Empty) {
  235. option (google.api.http) = {
  236. delete: "/v2/{name=projects/*/instances/*/clusters/*/backups/*}"
  237. };
  238. option (google.api.method_signature) = "name";
  239. }
  240. // Lists Cloud Bigtable backups. Returns both completed and pending
  241. // backups.
  242. rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) {
  243. option (google.api.http) = {
  244. get: "/v2/{parent=projects/*/instances/*/clusters/*}/backups"
  245. };
  246. option (google.api.method_signature) = "parent";
  247. }
  248. // Create a new table by restoring from a completed backup. The new table
  249. // must be in the same project as the instance containing the backup. The
  250. // returned table [long-running operation][google.longrunning.Operation] can
  251. // be used to track the progress of the operation, and to cancel it. The
  252. // [metadata][google.longrunning.Operation.metadata] field type is
  253. // [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
  254. // [response][google.longrunning.Operation.response] type is
  255. // [Table][google.bigtable.admin.v2.Table], if successful.
  256. rpc RestoreTable(RestoreTableRequest) returns (google.longrunning.Operation) {
  257. option (google.api.http) = {
  258. post: "/v2/{parent=projects/*/instances/*}/tables:restore"
  259. body: "*"
  260. };
  261. option (google.longrunning.operation_info) = {
  262. response_type: "Table"
  263. metadata_type: "RestoreTableMetadata"
  264. };
  265. }
  266. // Gets the access control policy for a Table or Backup resource.
  267. // Returns an empty policy if the resource exists but does not have a policy
  268. // set.
  269. rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
  270. option (google.api.http) = {
  271. post: "/v2/{resource=projects/*/instances/*/tables/*}:getIamPolicy"
  272. body: "*"
  273. additional_bindings {
  274. post: "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:getIamPolicy"
  275. body: "*"
  276. }
  277. };
  278. option (google.api.method_signature) = "resource";
  279. }
  280. // Sets the access control policy on a Table or Backup resource.
  281. // Replaces any existing policy.
  282. rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
  283. option (google.api.http) = {
  284. post: "/v2/{resource=projects/*/instances/*/tables/*}:setIamPolicy"
  285. body: "*"
  286. additional_bindings {
  287. post: "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:setIamPolicy"
  288. body: "*"
  289. }
  290. };
  291. option (google.api.method_signature) = "resource,policy";
  292. }
  293. // Returns permissions that the caller has on the specified Table or Backup resource.
  294. rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
  295. option (google.api.http) = {
  296. post: "/v2/{resource=projects/*/instances/*/tables/*}:testIamPermissions"
  297. body: "*"
  298. additional_bindings {
  299. post: "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:testIamPermissions"
  300. body: "*"
  301. }
  302. };
  303. option (google.api.method_signature) = "resource,permissions";
  304. }
  305. }
  306. // The request for
  307. // [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable].
  308. message RestoreTableRequest {
  309. // Required. The name of the instance in which to create the restored
  310. // table. This instance must be in the same project as the source backup.
  311. // Values are of the form `projects/<project>/instances/<instance>`.
  312. string parent = 1 [
  313. (google.api.field_behavior) = REQUIRED,
  314. (google.api.resource_reference) = {
  315. type: "bigtable.googleapis.com/Instance"
  316. }
  317. ];
  318. // Required. The id of the table to create and restore to. This
  319. // table must not already exist. The `table_id` appended to
  320. // `parent` forms the full table name of the form
  321. // `projects/<project>/instances/<instance>/tables/<table_id>`.
  322. string table_id = 2 [(google.api.field_behavior) = REQUIRED];
  323. // Required. The source from which to restore.
  324. oneof source {
  325. // Name of the backup from which to restore. Values are of the form
  326. // `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
  327. string backup = 3 [(google.api.resource_reference) = {
  328. type: "bigtable.googleapis.com/Backup"
  329. }];
  330. }
  331. }
  332. // Metadata type for the long-running operation returned by
  333. // [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable].
  334. message RestoreTableMetadata {
  335. // Name of the table being created and restored to.
  336. string name = 1;
  337. // The type of the restore source.
  338. RestoreSourceType source_type = 2;
  339. // Information about the source used to restore the table, as specified by
  340. // `source` in [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest].
  341. oneof source_info {
  342. BackupInfo backup_info = 3;
  343. }
  344. // If exists, the name of the long-running operation that will be used to
  345. // track the post-restore optimization process to optimize the performance of
  346. // the restored table. The metadata type of the long-running operation is
  347. // [OptimizeRestoreTableMetadata][]. The response type is
  348. // [Empty][google.protobuf.Empty]. This long-running operation may be
  349. // automatically created by the system if applicable after the
  350. // RestoreTable long-running operation completes successfully. This operation
  351. // may not be created if the table is already optimized or the restore was
  352. // not successful.
  353. string optimize_table_operation_name = 4;
  354. // The progress of the [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]
  355. // operation.
  356. OperationProgress progress = 5;
  357. }
  358. // Metadata type for the long-running operation used to track the progress
  359. // of optimizations performed on a newly restored table. This long-running
  360. // operation is automatically created by the system after the successful
  361. // completion of a table restore, and cannot be cancelled.
  362. message OptimizeRestoredTableMetadata {
  363. // Name of the restored table being optimized.
  364. string name = 1;
  365. // The progress of the post-restore optimizations.
  366. OperationProgress progress = 2;
  367. }
  368. // Request message for
  369. // [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable][google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]
  370. message CreateTableRequest {
  371. // An initial split point for a newly created table.
  372. message Split {
  373. // Row key to use as an initial tablet boundary.
  374. bytes key = 1;
  375. }
  376. // Required. The unique name of the instance in which to create the table.
  377. // Values are of the form `projects/{project}/instances/{instance}`.
  378. string parent = 1 [
  379. (google.api.field_behavior) = REQUIRED,
  380. (google.api.resource_reference) = {
  381. type: "bigtable.googleapis.com/Instance"
  382. }
  383. ];
  384. // Required. The name by which the new table should be referred to within the parent
  385. // instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
  386. // Maximum 50 characters.
  387. string table_id = 2 [(google.api.field_behavior) = REQUIRED];
  388. // Required. The Table to create.
  389. Table table = 3 [(google.api.field_behavior) = REQUIRED];
  390. // The optional list of row keys that will be used to initially split the
  391. // table into several tablets (tablets are similar to HBase regions).
  392. // Given two split keys, `s1` and `s2`, three tablets will be created,
  393. // spanning the key ranges: `[, s1), [s1, s2), [s2, )`.
  394. //
  395. // Example:
  396. //
  397. // * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",`
  398. // `"other", "zz"]`
  399. // * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]`
  400. // * Key assignment:
  401. // - Tablet 1 `[, apple) => {"a"}.`
  402. // - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.`
  403. // - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.`
  404. // - Tablet 4 `[customer_2, other) => {"customer_2"}.`
  405. // - Tablet 5 `[other, ) => {"other", "zz"}.`
  406. repeated Split initial_splits = 4;
  407. }
  408. // Request message for
  409. // [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot]
  410. //
  411. // Note: This is a private alpha release of Cloud Bigtable snapshots. This
  412. // feature is not currently available to most Cloud Bigtable customers. This
  413. // feature might be changed in backward-incompatible ways and is not recommended
  414. // for production use. It is not subject to any SLA or deprecation policy.
  415. message CreateTableFromSnapshotRequest {
  416. // Required. The unique name of the instance in which to create the table.
  417. // Values are of the form `projects/{project}/instances/{instance}`.
  418. string parent = 1 [
  419. (google.api.field_behavior) = REQUIRED,
  420. (google.api.resource_reference) = {
  421. type: "bigtable.googleapis.com/Instance"
  422. }
  423. ];
  424. // Required. The name by which the new table should be referred to within the parent
  425. // instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
  426. string table_id = 2 [(google.api.field_behavior) = REQUIRED];
  427. // Required. The unique name of the snapshot from which to restore the table. The
  428. // snapshot and the table must be in the same instance.
  429. // Values are of the form
  430. // `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
  431. string source_snapshot = 3 [
  432. (google.api.field_behavior) = REQUIRED,
  433. (google.api.resource_reference) = {
  434. type: "bigtable.googleapis.com/Snapshot"
  435. }
  436. ];
  437. }
  438. // Request message for
  439. // [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange][google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]
  440. message DropRowRangeRequest {
  441. // Required. The unique name of the table on which to drop a range of rows.
  442. // Values are of the form
  443. // `projects/{project}/instances/{instance}/tables/{table}`.
  444. string name = 1 [
  445. (google.api.field_behavior) = REQUIRED,
  446. (google.api.resource_reference) = {
  447. type: "bigtable.googleapis.com/Table"
  448. }
  449. ];
  450. // Delete all rows or by prefix.
  451. oneof target {
  452. // Delete all rows that start with this row key prefix. Prefix cannot be
  453. // zero length.
  454. bytes row_key_prefix = 2;
  455. // Delete all rows in the table. Setting this to false is a no-op.
  456. bool delete_all_data_from_table = 3;
  457. }
  458. }
  459. // Request message for
  460. // [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
  461. message ListTablesRequest {
  462. // Required. The unique name of the instance for which tables should be listed.
  463. // Values are of the form `projects/{project}/instances/{instance}`.
  464. string parent = 1 [
  465. (google.api.field_behavior) = REQUIRED,
  466. (google.api.resource_reference) = {
  467. type: "bigtable.googleapis.com/Instance"
  468. }
  469. ];
  470. // The view to be applied to the returned tables' fields.
  471. // Only NAME_ONLY view (default) and REPLICATION_VIEW are supported.
  472. Table.View view = 2;
  473. // Maximum number of results per page.
  474. //
  475. // A page_size of zero lets the server choose the number of items to return.
  476. // A page_size which is strictly positive will return at most that many items.
  477. // A negative page_size will cause an error.
  478. //
  479. // Following the first request, subsequent paginated calls are not required
  480. // to pass a page_size. If a page_size is set in subsequent calls, it must
  481. // match the page_size given in the first request.
  482. int32 page_size = 4;
  483. // The value of `next_page_token` returned by a previous call.
  484. string page_token = 3;
  485. }
  486. // Response message for
  487. // [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
  488. message ListTablesResponse {
  489. // The tables present in the requested instance.
  490. repeated Table tables = 1;
  491. // Set if not all tables could be returned in a single response.
  492. // Pass this value to `page_token` in another request to get the next
  493. // page of results.
  494. string next_page_token = 2;
  495. }
  496. // Request message for
  497. // [google.bigtable.admin.v2.BigtableTableAdmin.GetTable][google.bigtable.admin.v2.BigtableTableAdmin.GetTable]
  498. message GetTableRequest {
  499. // Required. The unique name of the requested table.
  500. // Values are of the form
  501. // `projects/{project}/instances/{instance}/tables/{table}`.
  502. string name = 1 [
  503. (google.api.field_behavior) = REQUIRED,
  504. (google.api.resource_reference) = {
  505. type: "bigtable.googleapis.com/Table"
  506. }
  507. ];
  508. // The view to be applied to the returned table's fields.
  509. // Defaults to `SCHEMA_VIEW` if unspecified.
  510. Table.View view = 2;
  511. }
  512. // Request message for
  513. // [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]
  514. message DeleteTableRequest {
  515. // Required. The unique name of the table to be deleted.
  516. // Values are of the form
  517. // `projects/{project}/instances/{instance}/tables/{table}`.
  518. string name = 1 [
  519. (google.api.field_behavior) = REQUIRED,
  520. (google.api.resource_reference) = {
  521. type: "bigtable.googleapis.com/Table"
  522. }
  523. ];
  524. }
  525. // Request message for
  526. // [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]
  527. message ModifyColumnFamiliesRequest {
  528. // A create, update, or delete of a particular column family.
  529. message Modification {
  530. // The ID of the column family to be modified.
  531. string id = 1;
  532. // Column familiy modifications.
  533. oneof mod {
  534. // Create a new column family with the specified schema, or fail if
  535. // one already exists with the given ID.
  536. ColumnFamily create = 2;
  537. // Update an existing column family to the specified schema, or fail
  538. // if no column family exists with the given ID.
  539. ColumnFamily update = 3;
  540. // Drop (delete) the column family with the given ID, or fail if no such
  541. // family exists.
  542. bool drop = 4;
  543. }
  544. }
  545. // Required. The unique name of the table whose families should be modified.
  546. // Values are of the form
  547. // `projects/{project}/instances/{instance}/tables/{table}`.
  548. string name = 1 [
  549. (google.api.field_behavior) = REQUIRED,
  550. (google.api.resource_reference) = {
  551. type: "bigtable.googleapis.com/Table"
  552. }
  553. ];
  554. // Required. Modifications to be atomically applied to the specified table's families.
  555. // Entries are applied in order, meaning that earlier modifications can be
  556. // masked by later ones (in the case of repeated updates to the same family,
  557. // for example).
  558. repeated Modification modifications = 2 [(google.api.field_behavior) = REQUIRED];
  559. }
  560. // Request message for
  561. // [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
  562. message GenerateConsistencyTokenRequest {
  563. // Required. The unique name of the Table for which to create a consistency token.
  564. // Values are of the form
  565. // `projects/{project}/instances/{instance}/tables/{table}`.
  566. string name = 1 [
  567. (google.api.field_behavior) = REQUIRED,
  568. (google.api.resource_reference) = {
  569. type: "bigtable.googleapis.com/Table"
  570. }
  571. ];
  572. }
  573. // Response message for
  574. // [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
  575. message GenerateConsistencyTokenResponse {
  576. // The generated consistency token.
  577. string consistency_token = 1;
  578. }
  579. // Request message for
  580. // [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
  581. message CheckConsistencyRequest {
  582. // Required. The unique name of the Table for which to check replication consistency.
  583. // Values are of the form
  584. // `projects/{project}/instances/{instance}/tables/{table}`.
  585. string name = 1 [
  586. (google.api.field_behavior) = REQUIRED,
  587. (google.api.resource_reference) = {
  588. type: "bigtable.googleapis.com/Table"
  589. }
  590. ];
  591. // Required. The token created using GenerateConsistencyToken for the Table.
  592. string consistency_token = 2 [(google.api.field_behavior) = REQUIRED];
  593. }
  594. // Response message for
  595. // [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
  596. message CheckConsistencyResponse {
  597. // True only if the token is consistent. A token is consistent if replication
  598. // has caught up with the restrictions specified in the request.
  599. bool consistent = 1;
  600. }
  601. // Request message for
  602. // [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable][google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable]
  603. //
  604. // Note: This is a private alpha release of Cloud Bigtable snapshots. This
  605. // feature is not currently available to most Cloud Bigtable customers. This
  606. // feature might be changed in backward-incompatible ways and is not recommended
  607. // for production use. It is not subject to any SLA or deprecation policy.
  608. message SnapshotTableRequest {
  609. // Required. The unique name of the table to have the snapshot taken.
  610. // Values are of the form
  611. // `projects/{project}/instances/{instance}/tables/{table}`.
  612. string name = 1 [
  613. (google.api.field_behavior) = REQUIRED,
  614. (google.api.resource_reference) = {
  615. type: "bigtable.googleapis.com/Table"
  616. }
  617. ];
  618. // Required. The name of the cluster where the snapshot will be created in.
  619. // Values are of the form
  620. // `projects/{project}/instances/{instance}/clusters/{cluster}`.
  621. string cluster = 2 [
  622. (google.api.field_behavior) = REQUIRED,
  623. (google.api.resource_reference) = {
  624. type: "bigtable.googleapis.com/Cluster"
  625. }
  626. ];
  627. // Required. The ID by which the new snapshot should be referred to within the parent
  628. // cluster, e.g., `mysnapshot` of the form: `[_a-zA-Z0-9][-_.a-zA-Z0-9]*`
  629. // rather than
  630. // `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
  631. string snapshot_id = 3 [(google.api.field_behavior) = REQUIRED];
  632. // The amount of time that the new snapshot can stay active after it is
  633. // created. Once 'ttl' expires, the snapshot will get deleted. The maximum
  634. // amount of time a snapshot can stay active is 7 days. If 'ttl' is not
  635. // specified, the default value of 24 hours will be used.
  636. google.protobuf.Duration ttl = 4;
  637. // Description of the snapshot.
  638. string description = 5;
  639. }
  640. // Request message for
  641. // [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot]
  642. //
  643. // Note: This is a private alpha release of Cloud Bigtable snapshots. This
  644. // feature is not currently available to most Cloud Bigtable customers. This
  645. // feature might be changed in backward-incompatible ways and is not recommended
  646. // for production use. It is not subject to any SLA or deprecation policy.
  647. message GetSnapshotRequest {
  648. // Required. The unique name of the requested snapshot.
  649. // Values are of the form
  650. // `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
  651. string name = 1 [
  652. (google.api.field_behavior) = REQUIRED,
  653. (google.api.resource_reference) = {
  654. type: "bigtable.googleapis.com/Snapshot"
  655. }
  656. ];
  657. }
  658. // Request message for
  659. // [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
  660. //
  661. // Note: This is a private alpha release of Cloud Bigtable snapshots. This
  662. // feature is not currently available to most Cloud Bigtable customers. This
  663. // feature might be changed in backward-incompatible ways and is not recommended
  664. // for production use. It is not subject to any SLA or deprecation policy.
  665. message ListSnapshotsRequest {
  666. // Required. The unique name of the cluster for which snapshots should be listed.
  667. // Values are of the form
  668. // `projects/{project}/instances/{instance}/clusters/{cluster}`.
  669. // Use `{cluster} = '-'` to list snapshots for all clusters in an instance,
  670. // e.g., `projects/{project}/instances/{instance}/clusters/-`.
  671. string parent = 1 [
  672. (google.api.field_behavior) = REQUIRED,
  673. (google.api.resource_reference) = {
  674. type: "bigtable.googleapis.com/Cluster"
  675. }
  676. ];
  677. // The maximum number of snapshots to return per page.
  678. // CURRENTLY UNIMPLEMENTED AND IGNORED.
  679. int32 page_size = 2;
  680. // The value of `next_page_token` returned by a previous call.
  681. string page_token = 3;
  682. }
  683. // Response message for
  684. // [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
  685. //
  686. // Note: This is a private alpha release of Cloud Bigtable snapshots. This
  687. // feature is not currently available to most Cloud Bigtable customers. This
  688. // feature might be changed in backward-incompatible ways and is not recommended
  689. // for production use. It is not subject to any SLA or deprecation policy.
  690. message ListSnapshotsResponse {
  691. // The snapshots present in the requested cluster.
  692. repeated Snapshot snapshots = 1;
  693. // Set if not all snapshots could be returned in a single response.
  694. // Pass this value to `page_token` in another request to get the next
  695. // page of results.
  696. string next_page_token = 2;
  697. }
  698. // Request message for
  699. // [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot]
  700. //
  701. // Note: This is a private alpha release of Cloud Bigtable snapshots. This
  702. // feature is not currently available to most Cloud Bigtable customers. This
  703. // feature might be changed in backward-incompatible ways and is not recommended
  704. // for production use. It is not subject to any SLA or deprecation policy.
  705. message DeleteSnapshotRequest {
  706. // Required. The unique name of the snapshot to be deleted.
  707. // Values are of the form
  708. // `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
  709. string name = 1 [
  710. (google.api.field_behavior) = REQUIRED,
  711. (google.api.resource_reference) = {
  712. type: "bigtable.googleapis.com/Snapshot"
  713. }
  714. ];
  715. }
  716. // The metadata for the Operation returned by SnapshotTable.
  717. //
  718. // Note: This is a private alpha release of Cloud Bigtable snapshots. This
  719. // feature is not currently available to most Cloud Bigtable customers. This
  720. // feature might be changed in backward-incompatible ways and is not recommended
  721. // for production use. It is not subject to any SLA or deprecation policy.
  722. message SnapshotTableMetadata {
  723. // The request that prompted the initiation of this SnapshotTable operation.
  724. SnapshotTableRequest original_request = 1;
  725. // The time at which the original request was received.
  726. google.protobuf.Timestamp request_time = 2;
  727. // The time at which the operation failed or was completed successfully.
  728. google.protobuf.Timestamp finish_time = 3;
  729. }
  730. // The metadata for the Operation returned by CreateTableFromSnapshot.
  731. //
  732. // Note: This is a private alpha release of Cloud Bigtable snapshots. This
  733. // feature is not currently available to most Cloud Bigtable customers. This
  734. // feature might be changed in backward-incompatible ways and is not recommended
  735. // for production use. It is not subject to any SLA or deprecation policy.
  736. message CreateTableFromSnapshotMetadata {
  737. // The request that prompted the initiation of this CreateTableFromSnapshot
  738. // operation.
  739. CreateTableFromSnapshotRequest original_request = 1;
  740. // The time at which the original request was received.
  741. google.protobuf.Timestamp request_time = 2;
  742. // The time at which the operation failed or was completed successfully.
  743. google.protobuf.Timestamp finish_time = 3;
  744. }
  745. // The request for [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup].
  746. message CreateBackupRequest {
  747. // Required. This must be one of the clusters in the instance in which this
  748. // table is located. The backup will be stored in this cluster. Values are
  749. // of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.
  750. string parent = 1 [
  751. (google.api.field_behavior) = REQUIRED,
  752. (google.api.resource_reference) = {
  753. type: "bigtable.googleapis.com/Cluster"
  754. }
  755. ];
  756. // Required. The id of the backup to be created. The `backup_id` along with
  757. // the parent `parent` are combined as {parent}/backups/{backup_id} to create
  758. // the full backup name, of the form:
  759. // `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
  760. // This string must be between 1 and 50 characters in length and match the
  761. // regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*.
  762. string backup_id = 2 [(google.api.field_behavior) = REQUIRED];
  763. // Required. The backup to create.
  764. Backup backup = 3 [(google.api.field_behavior) = REQUIRED];
  765. }
  766. // Metadata type for the operation returned by
  767. // [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup].
  768. message CreateBackupMetadata {
  769. // The name of the backup being created.
  770. string name = 1;
  771. // The name of the table the backup is created from.
  772. string source_table = 2;
  773. // The time at which this operation started.
  774. google.protobuf.Timestamp start_time = 3;
  775. // If set, the time at which this operation finished or was cancelled.
  776. google.protobuf.Timestamp end_time = 4;
  777. }
  778. // The request for [UpdateBackup][google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup].
  779. message UpdateBackupRequest {
  780. // Required. The backup to update. `backup.name`, and the fields to be updated
  781. // as specified by `update_mask` are required. Other fields are ignored.
  782. // Update is only supported for the following fields:
  783. // * `backup.expire_time`.
  784. Backup backup = 1 [(google.api.field_behavior) = REQUIRED];
  785. // Required. A mask specifying which fields (e.g. `expire_time`) in the
  786. // Backup resource should be updated. This mask is relative to the Backup
  787. // resource, not to the request message. The field mask must always be
  788. // specified; this prevents any future fields from being erased accidentally
  789. // by clients that do not know about them.
  790. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  791. }
  792. // The request for [GetBackup][google.bigtable.admin.v2.BigtableTableAdmin.GetBackup].
  793. message GetBackupRequest {
  794. // Required. Name of the backup.
  795. // Values are of the form
  796. // `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
  797. string name = 1 [
  798. (google.api.field_behavior) = REQUIRED,
  799. (google.api.resource_reference) = {
  800. type: "bigtable.googleapis.com/Backup"
  801. }
  802. ];
  803. }
  804. // The request for [DeleteBackup][google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup].
  805. message DeleteBackupRequest {
  806. // Required. Name of the backup to delete.
  807. // Values are of the form
  808. // `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
  809. string name = 1 [
  810. (google.api.field_behavior) = REQUIRED,
  811. (google.api.resource_reference) = {
  812. type: "bigtable.googleapis.com/Backup"
  813. }
  814. ];
  815. }
  816. // The request for [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups].
  817. message ListBackupsRequest {
  818. // Required. The cluster to list backups from. Values are of the
  819. // form `projects/{project}/instances/{instance}/clusters/{cluster}`.
  820. // Use `{cluster} = '-'` to list backups for all clusters in an instance,
  821. // e.g., `projects/{project}/instances/{instance}/clusters/-`.
  822. string parent = 1 [
  823. (google.api.field_behavior) = REQUIRED,
  824. (google.api.resource_reference) = {
  825. type: "bigtable.googleapis.com/Cluster"
  826. }
  827. ];
  828. // A filter expression that filters backups listed in the response.
  829. // The expression must specify the field name, a comparison operator,
  830. // and the value that you want to use for filtering. The value must be a
  831. // string, a number, or a boolean. The comparison operator must be
  832. // <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is
  833. // roughly synonymous with equality. Filter rules are case insensitive.
  834. //
  835. // The fields eligible for filtering are:
  836. // * `name`
  837. // * `source_table`
  838. // * `state`
  839. // * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
  840. // * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
  841. // * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
  842. // * `size_bytes`
  843. //
  844. // To filter on multiple expressions, provide each separate expression within
  845. // parentheses. By default, each expression is an AND expression. However,
  846. // you can include AND, OR, and NOT expressions explicitly.
  847. //
  848. // Some examples of using filters are:
  849. //
  850. // * `name:"exact"` --> The backup's name is the string "exact".
  851. // * `name:howl` --> The backup's name contains the string "howl".
  852. // * `source_table:prod`
  853. // --> The source_table's name contains the string "prod".
  854. // * `state:CREATING` --> The backup is pending creation.
  855. // * `state:READY` --> The backup is fully created and ready for use.
  856. // * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")`
  857. // --> The backup name contains the string "howl" and start_time
  858. // of the backup is before 2018-03-28T14:50:00Z.
  859. // * `size_bytes > 10000000000` --> The backup's size is greater than 10GB
  860. string filter = 2;
  861. // An expression for specifying the sort order of the results of the request.
  862. // The string value should specify one or more fields in [Backup][google.bigtable.admin.v2.Backup]. The full
  863. // syntax is described at https://aip.dev/132#ordering.
  864. //
  865. // Fields supported are:
  866. // * name
  867. // * source_table
  868. // * expire_time
  869. // * start_time
  870. // * end_time
  871. // * size_bytes
  872. // * state
  873. //
  874. // For example, "start_time". The default sorting order is ascending.
  875. // To specify descending order for the field, a suffix " desc" should
  876. // be appended to the field name. For example, "start_time desc".
  877. // Redundant space characters in the syntax are insigificant.
  878. //
  879. // If order_by is empty, results will be sorted by `start_time` in descending
  880. // order starting from the most recently created backup.
  881. string order_by = 3;
  882. // Number of backups to be returned in the response. If 0 or
  883. // less, defaults to the server's maximum allowed page size.
  884. int32 page_size = 4;
  885. // If non-empty, `page_token` should contain a
  886. // [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token] from a
  887. // previous [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the same `parent` and with the same
  888. // `filter`.
  889. string page_token = 5;
  890. }
  891. // The response for [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups].
  892. message ListBackupsResponse {
  893. // The list of matching backups.
  894. repeated Backup backups = 1;
  895. // `next_page_token` can be sent in a subsequent
  896. // [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call to fetch more
  897. // of the matching backups.
  898. string next_page_token = 2;
  899. }