feat(spanner): UpdateDatabaseMetadata & UpdateDatabaseRequest
diff --git a/google/spanner/admin/database/v1/spanner_database_admin.proto b/google/spanner/admin/database/v1/spanner_database_admin.proto
index e2469e4..269acc0 100644
--- a/google/spanner/admin/database/v1/spanner_database_admin.proto
+++ b/google/spanner/admin/database/v1/spanner_database_admin.proto
@@ -463,6 +463,12 @@
// Output only. The dialect of the Cloud Spanner Database.
DatabaseDialect database_dialect = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Whether drop protection is enabled for this database. Defaults to false, if not set.
+ bool enable_drop_protection = 11;
+
+ // If true, the database is being updated. If false, there are no ongoing update operations for the database.
+ bool reconciling = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// The request for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
@@ -551,6 +557,37 @@
];
}
+// The request for [UpdateDatabase][DatabaseAdmin.UpdateDatabase].
+message UpdateDatabaseRequest {
+ // Required. The database to update.
+ // The `name` field of the database is of the form
+ // `projects/<project>/instances/<instance>/databases/<database>`.
+ Database database = 1 [
+ (google.api.field_behavior) = REQUIRED
+ ];
+
+ // Required. The list of fields to update. Currently, only
+ // `enable_drop_protection` field can be updated.
+ google.protobuf.FieldMask update_mask = 2 [
+ (google.api.field_behavior) = REQUIRED
+ ];
+}
+
+// Metadata type for the operation returned by
+// [UpdateDatabase][DatabaseAdmin.UpdateDatabase].
+message UpdateDatabaseMetadata {
+ // The request for [UpdateDatabase][DatabaseAdmin.UpdateDatabase].
+ UpdateDatabaseRequest request = 1;
+
+ // The progress of the [UpdateDatabase][DatabaseAdmin.UpdateDatabase]
+ // operation.
+ OperationProgress progress = 2;
+
+ // The time at which this operation was cancelled. If set, this operation is
+ // in the process of undoing itself (which is best-effort).
+ google.protobuf.Timestamp cancel_time = 3;
+}
+
// Enqueues the given DDL statements to be applied, in order but not
// necessarily all at once, to the database schema at some point (or
// points) in the future. The server checks that the statements