1- // Copyright 2020 Google LLC
1+ // Copyright 2022 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -108,6 +108,19 @@ service BigtableTableAdmin {
108108 option (google.api.method_signature ) = "name" ;
109109 }
110110
111+ // Restores a specified table which was accidentally deleted.
112+ rpc UndeleteTable (UndeleteTableRequest ) returns (google.longrunning.Operation ) {
113+ option (google.api.http ) = {
114+ post : "/v2/{name=projects/*/instances/*/tables/*}:undelete"
115+ body : "*"
116+ };
117+ option (google.api.method_signature ) = "name" ;
118+ option (google.longrunning.operation_info ) = {
119+ response_type : "Table"
120+ metadata_type : "UndeleteTableMetadata"
121+ };
122+ }
123+
111124 // Performs a series of column family modifications on the specified table.
112125 // Either all or none of the modifications will occur before this method
113126 // returns, but data requests received prior to that point may see a table
@@ -580,6 +593,33 @@ message DeleteTableRequest {
580593 ];
581594}
582595
596+ // Request message for
597+ // [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]
598+ message UndeleteTableRequest {
599+ // Required. The unique name of the table to be restored.
600+ // Values are of the form
601+ // `projects/{project}/instances/{instance}/tables/{table}`.
602+ string name = 1 [
603+ (google.api.field_behavior ) = REQUIRED ,
604+ (google.api.resource_reference ) = {
605+ type : "bigtableadmin.googleapis.com/Table"
606+ }
607+ ];
608+ }
609+
610+ // Metadata type for the operation returned by
611+ // [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable].
612+ message UndeleteTableMetadata {
613+ // The name of the table being restored.
614+ string name = 1 ;
615+
616+ // The time at which this operation started.
617+ google.protobuf.Timestamp start_time = 2 ;
618+
619+ // If set, the time at which this operation finished or was cancelled.
620+ google.protobuf.Timestamp end_time = 3 ;
621+ }
622+
583623// Request message for
584624// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]
585625message ModifyColumnFamiliesRequest {
@@ -588,7 +628,7 @@ message ModifyColumnFamiliesRequest {
588628 // The ID of the column family to be modified.
589629 string id = 1 ;
590630
591- // Column familiy modifications.
631+ // Column family modifications.
592632 oneof mod {
593633 // Create a new column family with the specified schema, or fail if
594634 // one already exists with the given ID.
0 commit comments