1// Copyright 2023 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 15syntax = "proto3"; 16 17package google.spanner.admin.database.v1; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/api/resource.proto"; 23import "google/iam/v1/iam_policy.proto"; 24import "google/iam/v1/policy.proto"; 25import "google/longrunning/operations.proto"; 26import "google/protobuf/empty.proto"; 27import "google/protobuf/field_mask.proto"; 28import "google/protobuf/timestamp.proto"; 29import "google/spanner/admin/database/v1/backup.proto"; 30import "google/spanner/admin/database/v1/common.proto"; 31 32option csharp_namespace = "Google.Cloud.Spanner.Admin.Database.V1"; 33option go_package = "cloud.google.com/go/spanner/admin/database/apiv1/databasepb;databasepb"; 34option java_multiple_files = true; 35option java_outer_classname = "SpannerDatabaseAdminProto"; 36option java_package = "com.google.spanner.admin.database.v1"; 37option php_namespace = "Google\\Cloud\\Spanner\\Admin\\Database\\V1"; 38option ruby_package = "Google::Cloud::Spanner::Admin::Database::V1"; 39option (google.api.resource_definition) = { 40 type: "spanner.googleapis.com/Instance" 41 pattern: "projects/{project}/instances/{instance}" 42}; 43 44// Cloud Spanner Database Admin API 45// 46// The Cloud Spanner Database Admin API can be used to: 47// * create, drop, and list databases 48// * update the schema of pre-existing databases 49// * create, delete and list backups for a database 50// * restore a database from an existing backup 51service DatabaseAdmin { 52 option (google.api.default_host) = "spanner.googleapis.com"; 53 option (google.api.oauth_scopes) = 54 "https://www.googleapis.com/auth/cloud-platform," 55 "https://www.googleapis.com/auth/spanner.admin"; 56 57 // Lists Cloud Spanner databases. 58 rpc ListDatabases(ListDatabasesRequest) returns (ListDatabasesResponse) { 59 option (google.api.http) = { 60 get: "/v1/{parent=projects/*/instances/*}/databases" 61 }; 62 option (google.api.method_signature) = "parent"; 63 } 64 65 // Creates a new Cloud Spanner database and starts to prepare it for serving. 66 // The returned [long-running operation][google.longrunning.Operation] will 67 // have a name of the format `<database_name>/operations/<operation_id>` and 68 // can be used to track preparation of the database. The 69 // [metadata][google.longrunning.Operation.metadata] field type is 70 // [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The 71 // [response][google.longrunning.Operation.response] field type is 72 // [Database][google.spanner.admin.database.v1.Database], if successful. 73 rpc CreateDatabase(CreateDatabaseRequest) returns (google.longrunning.Operation) { 74 option (google.api.http) = { 75 post: "/v1/{parent=projects/*/instances/*}/databases" 76 body: "*" 77 }; 78 option (google.api.method_signature) = "parent,create_statement"; 79 option (google.longrunning.operation_info) = { 80 response_type: "google.spanner.admin.database.v1.Database" 81 metadata_type: "google.spanner.admin.database.v1.CreateDatabaseMetadata" 82 }; 83 } 84 85 // Gets the state of a Cloud Spanner database. 86 rpc GetDatabase(GetDatabaseRequest) returns (Database) { 87 option (google.api.http) = { 88 get: "/v1/{name=projects/*/instances/*/databases/*}" 89 }; 90 option (google.api.method_signature) = "name"; 91 } 92 93 // Updates a Cloud Spanner database. The returned 94 // [long-running operation][google.longrunning.Operation] can be used to track 95 // the progress of updating the database. If the named database does not 96 // exist, returns `NOT_FOUND`. 97 // 98 // While the operation is pending: 99 // 100 // * The database's 101 // [reconciling][google.spanner.admin.database.v1.Database.reconciling] 102 // field is set to true. 103 // * Cancelling the operation is best-effort. If the cancellation succeeds, 104 // the operation metadata's 105 // [cancel_time][google.spanner.admin.database.v1.UpdateDatabaseMetadata.cancel_time] 106 // is set, the updates are reverted, and the operation terminates with a 107 // `CANCELLED` status. 108 // * New UpdateDatabase requests will return a `FAILED_PRECONDITION` error 109 // until the pending operation is done (returns successfully or with 110 // error). 111 // * Reading the database via the API continues to give the pre-request 112 // values. 113 // 114 // Upon completion of the returned operation: 115 // 116 // * The new values are in effect and readable via the API. 117 // * The database's 118 // [reconciling][google.spanner.admin.database.v1.Database.reconciling] 119 // field becomes false. 120 // 121 // The returned [long-running operation][google.longrunning.Operation] will 122 // have a name of the format 123 // `projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>` 124 // and can be used to track the database modification. The 125 // [metadata][google.longrunning.Operation.metadata] field type is 126 // [UpdateDatabaseMetadata][google.spanner.admin.database.v1.UpdateDatabaseMetadata]. 127 // The [response][google.longrunning.Operation.response] field type is 128 // [Database][google.spanner.admin.database.v1.Database], if successful. 129 rpc UpdateDatabase(UpdateDatabaseRequest) 130 returns (google.longrunning.Operation) { 131 option (google.api.http) = { 132 patch: "/v1/{database.name=projects/*/instances/*/databases/*}" 133 body: "database" 134 }; 135 option (google.api.method_signature) = "database,update_mask"; 136 option (google.longrunning.operation_info) = { 137 response_type: "Database" 138 metadata_type: "UpdateDatabaseMetadata" 139 }; 140 } 141 142 // Updates the schema of a Cloud Spanner database by 143 // creating/altering/dropping tables, columns, indexes, etc. The returned 144 // [long-running operation][google.longrunning.Operation] will have a name of 145 // the format `<database_name>/operations/<operation_id>` and can be used to 146 // track execution of the schema change(s). The 147 // [metadata][google.longrunning.Operation.metadata] field type is 148 // [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response. 149 rpc UpdateDatabaseDdl(UpdateDatabaseDdlRequest) returns (google.longrunning.Operation) { 150 option (google.api.http) = { 151 patch: "/v1/{database=projects/*/instances/*/databases/*}/ddl" 152 body: "*" 153 }; 154 option (google.api.method_signature) = "database,statements"; 155 option (google.longrunning.operation_info) = { 156 response_type: "google.protobuf.Empty" 157 metadata_type: "google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata" 158 }; 159 } 160 161 // Drops (aka deletes) a Cloud Spanner database. 162 // Completed backups for the database will be retained according to their 163 // `expire_time`. 164 // Note: Cloud Spanner might continue to accept requests for a few seconds 165 // after the database has been deleted. 166 rpc DropDatabase(DropDatabaseRequest) returns (google.protobuf.Empty) { 167 option (google.api.http) = { 168 delete: "/v1/{database=projects/*/instances/*/databases/*}" 169 }; 170 option (google.api.method_signature) = "database"; 171 } 172 173 // Returns the schema of a Cloud Spanner database as a list of formatted 174 // DDL statements. This method does not show pending schema updates, those may 175 // be queried using the [Operations][google.longrunning.Operations] API. 176 rpc GetDatabaseDdl(GetDatabaseDdlRequest) returns (GetDatabaseDdlResponse) { 177 option (google.api.http) = { 178 get: "/v1/{database=projects/*/instances/*/databases/*}/ddl" 179 }; 180 option (google.api.method_signature) = "database"; 181 } 182 183 // Sets the access control policy on a database or backup resource. 184 // Replaces any existing policy. 185 // 186 // Authorization requires `spanner.databases.setIamPolicy` 187 // permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. 188 // For backups, authorization requires `spanner.backups.setIamPolicy` 189 // permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. 190 rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { 191 option (google.api.http) = { 192 post: "/v1/{resource=projects/*/instances/*/databases/*}:setIamPolicy" 193 body: "*" 194 additional_bindings { 195 post: "/v1/{resource=projects/*/instances/*/backups/*}:setIamPolicy" 196 body: "*" 197 } 198 }; 199 option (google.api.method_signature) = "resource,policy"; 200 } 201 202 // Gets the access control policy for a database or backup resource. 203 // Returns an empty policy if a database or backup exists but does not have a 204 // policy set. 205 // 206 // Authorization requires `spanner.databases.getIamPolicy` permission on 207 // [resource][google.iam.v1.GetIamPolicyRequest.resource]. 208 // For backups, authorization requires `spanner.backups.getIamPolicy` 209 // permission on [resource][google.iam.v1.GetIamPolicyRequest.resource]. 210 rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { 211 option (google.api.http) = { 212 post: "/v1/{resource=projects/*/instances/*/databases/*}:getIamPolicy" 213 body: "*" 214 additional_bindings { 215 post: "/v1/{resource=projects/*/instances/*/backups/*}:getIamPolicy" 216 body: "*" 217 } 218 }; 219 option (google.api.method_signature) = "resource"; 220 } 221 222 // Returns permissions that the caller has on the specified database or backup 223 // resource. 224 // 225 // Attempting this RPC on a non-existent Cloud Spanner database will 226 // result in a NOT_FOUND error if the user has 227 // `spanner.databases.list` permission on the containing Cloud 228 // Spanner instance. Otherwise returns an empty set of permissions. 229 // Calling this method on a backup that does not exist will 230 // result in a NOT_FOUND error if the user has 231 // `spanner.backups.list` permission on the containing instance. 232 rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { 233 option (google.api.http) = { 234 post: "/v1/{resource=projects/*/instances/*/databases/*}:testIamPermissions" 235 body: "*" 236 additional_bindings { 237 post: "/v1/{resource=projects/*/instances/*/backups/*}:testIamPermissions" 238 body: "*" 239 } 240 additional_bindings { 241 post: "/v1/{resource=projects/*/instances/*/databases/*/databaseRoles/*}:testIamPermissions" 242 body: "*" 243 } 244 }; 245 option (google.api.method_signature) = "resource,permissions"; 246 } 247 248 // Starts creating a new Cloud Spanner Backup. 249 // The returned backup [long-running operation][google.longrunning.Operation] 250 // will have a name of the format 251 // `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>` 252 // and can be used to track creation of the backup. The 253 // [metadata][google.longrunning.Operation.metadata] field type is 254 // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. The 255 // [response][google.longrunning.Operation.response] field type is 256 // [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the 257 // creation and delete the backup. 258 // There can be only one pending backup creation per database. Backup creation 259 // of different databases can run concurrently. 260 rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) { 261 option (google.api.http) = { 262 post: "/v1/{parent=projects/*/instances/*}/backups" 263 body: "backup" 264 }; 265 option (google.api.method_signature) = "parent,backup,backup_id"; 266 option (google.longrunning.operation_info) = { 267 response_type: "google.spanner.admin.database.v1.Backup" 268 metadata_type: "google.spanner.admin.database.v1.CreateBackupMetadata" 269 }; 270 } 271 272 // Starts copying a Cloud Spanner Backup. 273 // The returned backup [long-running operation][google.longrunning.Operation] 274 // will have a name of the format 275 // `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>` 276 // and can be used to track copying of the backup. The operation is associated 277 // with the destination backup. 278 // The [metadata][google.longrunning.Operation.metadata] field type is 279 // [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. 280 // The [response][google.longrunning.Operation.response] field type is 281 // [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the 282 // copying and delete the backup. 283 // Concurrent CopyBackup requests can run on the same source backup. 284 rpc CopyBackup(CopyBackupRequest) returns (google.longrunning.Operation) { 285 option (google.api.http) = { 286 post: "/v1/{parent=projects/*/instances/*}/backups:copy" 287 body: "*" 288 }; 289 option (google.api.method_signature) = "parent,backup_id,source_backup,expire_time"; 290 option (google.longrunning.operation_info) = { 291 response_type: "google.spanner.admin.database.v1.Backup" 292 metadata_type: "google.spanner.admin.database.v1.CopyBackupMetadata" 293 }; 294 } 295 296 // Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. 297 rpc GetBackup(GetBackupRequest) returns (Backup) { 298 option (google.api.http) = { 299 get: "/v1/{name=projects/*/instances/*/backups/*}" 300 }; 301 option (google.api.method_signature) = "name"; 302 } 303 304 // Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. 305 rpc UpdateBackup(UpdateBackupRequest) returns (Backup) { 306 option (google.api.http) = { 307 patch: "/v1/{backup.name=projects/*/instances/*/backups/*}" 308 body: "backup" 309 }; 310 option (google.api.method_signature) = "backup,update_mask"; 311 } 312 313 // Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. 314 rpc DeleteBackup(DeleteBackupRequest) returns (google.protobuf.Empty) { 315 option (google.api.http) = { 316 delete: "/v1/{name=projects/*/instances/*/backups/*}" 317 }; 318 option (google.api.method_signature) = "name"; 319 } 320 321 // Lists completed and pending backups. 322 // Backups returned are ordered by `create_time` in descending order, 323 // starting from the most recent `create_time`. 324 rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { 325 option (google.api.http) = { 326 get: "/v1/{parent=projects/*/instances/*}/backups" 327 }; 328 option (google.api.method_signature) = "parent"; 329 } 330 331 // Create a new database by restoring from a completed backup. The new 332 // database must be in the same project and in an instance with the same 333 // instance configuration as the instance containing 334 // the backup. The returned database [long-running 335 // operation][google.longrunning.Operation] has a name of the format 336 // `projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>`, 337 // and can be used to track the progress of the operation, and to cancel it. 338 // The [metadata][google.longrunning.Operation.metadata] field type is 339 // [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. 340 // The [response][google.longrunning.Operation.response] type 341 // is [Database][google.spanner.admin.database.v1.Database], if 342 // successful. Cancelling the returned operation will stop the restore and 343 // delete the database. 344 // There can be only one database being restored into an instance at a time. 345 // Once the restore operation completes, a new restore operation can be 346 // initiated, without waiting for the optimize operation associated with the 347 // first restore to complete. 348 rpc RestoreDatabase(RestoreDatabaseRequest) returns (google.longrunning.Operation) { 349 option (google.api.http) = { 350 post: "/v1/{parent=projects/*/instances/*}/databases:restore" 351 body: "*" 352 }; 353 option (google.api.method_signature) = "parent,database_id,backup"; 354 option (google.longrunning.operation_info) = { 355 response_type: "google.spanner.admin.database.v1.Database" 356 metadata_type: "google.spanner.admin.database.v1.RestoreDatabaseMetadata" 357 }; 358 } 359 360 // Lists database [longrunning-operations][google.longrunning.Operation]. 361 // A database operation has a name of the form 362 // `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`. 363 // The long-running operation 364 // [metadata][google.longrunning.Operation.metadata] field type 365 // `metadata.type_url` describes the type of the metadata. Operations returned 366 // include those that have completed/failed/canceled within the last 7 days, 367 // and pending operations. 368 rpc ListDatabaseOperations(ListDatabaseOperationsRequest) returns (ListDatabaseOperationsResponse) { 369 option (google.api.http) = { 370 get: "/v1/{parent=projects/*/instances/*}/databaseOperations" 371 }; 372 option (google.api.method_signature) = "parent"; 373 } 374 375 // Lists the backup [long-running operations][google.longrunning.Operation] in 376 // the given instance. A backup operation has a name of the form 377 // `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation>`. 378 // The long-running operation 379 // [metadata][google.longrunning.Operation.metadata] field type 380 // `metadata.type_url` describes the type of the metadata. Operations returned 381 // include those that have completed/failed/canceled within the last 7 days, 382 // and pending operations. Operations returned are ordered by 383 // `operation.metadata.value.progress.start_time` in descending order starting 384 // from the most recently started operation. 385 rpc ListBackupOperations(ListBackupOperationsRequest) returns (ListBackupOperationsResponse) { 386 option (google.api.http) = { 387 get: "/v1/{parent=projects/*/instances/*}/backupOperations" 388 }; 389 option (google.api.method_signature) = "parent"; 390 } 391 392 // Lists Cloud Spanner database roles. 393 rpc ListDatabaseRoles(ListDatabaseRolesRequest) returns (ListDatabaseRolesResponse) { 394 option (google.api.http) = { 395 get: "/v1/{parent=projects/*/instances/*/databases/*}/databaseRoles" 396 }; 397 option (google.api.method_signature) = "parent"; 398 } 399} 400 401// Information about the database restore. 402message RestoreInfo { 403 // The type of the restore source. 404 RestoreSourceType source_type = 1; 405 406 // Information about the source used to restore the database. 407 oneof source_info { 408 // Information about the backup used to restore the database. The backup 409 // may no longer exist. 410 BackupInfo backup_info = 2; 411 } 412} 413 414// A Cloud Spanner database. 415message Database { 416 option (google.api.resource) = { 417 type: "spanner.googleapis.com/Database" 418 pattern: "projects/{project}/instances/{instance}/databases/{database}" 419 }; 420 421 // Indicates the current state of the database. 422 enum State { 423 // Not specified. 424 STATE_UNSPECIFIED = 0; 425 426 // The database is still being created. Operations on the database may fail 427 // with `FAILED_PRECONDITION` in this state. 428 CREATING = 1; 429 430 // The database is fully created and ready for use. 431 READY = 2; 432 433 // The database is fully created and ready for use, but is still 434 // being optimized for performance and cannot handle full load. 435 // 436 // In this state, the database still references the backup 437 // it was restore from, preventing the backup 438 // from being deleted. When optimizations are complete, the full performance 439 // of the database will be restored, and the database will transition to 440 // `READY` state. 441 READY_OPTIMIZING = 3; 442 } 443 444 // Required. The name of the database. Values are of the form 445 // `projects/<project>/instances/<instance>/databases/<database>`, 446 // where `<database>` is as specified in the `CREATE DATABASE` 447 // statement. This name can be passed to other API methods to 448 // identify the database. 449 string name = 1 [(google.api.field_behavior) = REQUIRED]; 450 451 // Output only. The current database state. 452 State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 453 454 // Output only. If exists, the time at which the database creation started. 455 google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 456 457 // Output only. Applicable only for restored databases. Contains information 458 // about the restore source. 459 RestoreInfo restore_info = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 460 461 // Output only. For databases that are using customer managed encryption, this 462 // field contains the encryption configuration for the database. 463 // For databases that are using Google default or other types of encryption, 464 // this field is empty. 465 EncryptionConfig encryption_config = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 466 467 // Output only. For databases that are using customer managed encryption, this 468 // field contains the encryption information for the database, such as 469 // encryption state and the Cloud KMS key versions that are in use. 470 // 471 // For databases that are using Google default or other types of encryption, 472 // this field is empty. 473 // 474 // This field is propagated lazily from the backend. There might be a delay 475 // from when a key version is being used and when it appears in this field. 476 repeated EncryptionInfo encryption_info = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; 477 478 // Output only. The period in which Cloud Spanner retains all versions of data 479 // for the database. This is the same as the value of version_retention_period 480 // database option set using 481 // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. Defaults to 1 hour, 482 // if not set. 483 string version_retention_period = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; 484 485 // Output only. Earliest timestamp at which older versions of the data can be 486 // read. This value is continuously updated by Cloud Spanner and becomes stale 487 // the moment it is queried. If you are using this value to recover data, make 488 // sure to account for the time from the moment when the value is queried to 489 // the moment when you initiate the recovery. 490 google.protobuf.Timestamp earliest_version_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; 491 492 // Output only. The read-write region which contains the database's leader 493 // replicas. 494 // 495 // This is the same as the value of default_leader 496 // database option set using DatabaseAdmin.CreateDatabase or 497 // DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty. 498 string default_leader = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; 499 500 // Output only. The dialect of the Cloud Spanner Database. 501 DatabaseDialect database_dialect = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; 502 503 // Whether drop protection is enabled for this database. Defaults to false, 504 // if not set. 505 bool enable_drop_protection = 11; 506 507 // Output only. If true, the database is being updated. If false, there are no 508 // ongoing update operations for the database. 509 bool reconciling = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; 510} 511 512// The request for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]. 513message ListDatabasesRequest { 514 // Required. The instance whose databases should be listed. 515 // Values are of the form `projects/<project>/instances/<instance>`. 516 string parent = 1 [ 517 (google.api.field_behavior) = REQUIRED, 518 (google.api.resource_reference) = { 519 type: "spanner.googleapis.com/Instance" 520 } 521 ]; 522 523 // Number of databases to be returned in the response. If 0 or less, 524 // defaults to the server's maximum allowed page size. 525 int32 page_size = 3; 526 527 // If non-empty, `page_token` should contain a 528 // [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] from a 529 // previous [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse]. 530 string page_token = 4; 531} 532 533// The response for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]. 534message ListDatabasesResponse { 535 // Databases that matched the request. 536 repeated Database databases = 1; 537 538 // `next_page_token` can be sent in a subsequent 539 // [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] call to fetch more 540 // of the matching databases. 541 string next_page_token = 2; 542} 543 544// The request for [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase]. 545message CreateDatabaseRequest { 546 // Required. The name of the instance that will serve the new database. 547 // Values are of the form `projects/<project>/instances/<instance>`. 548 string parent = 1 [ 549 (google.api.field_behavior) = REQUIRED, 550 (google.api.resource_reference) = { 551 type: "spanner.googleapis.com/Instance" 552 } 553 ]; 554 555 // Required. A `CREATE DATABASE` statement, which specifies the ID of the 556 // new database. The database ID must conform to the regular expression 557 // `[a-z][a-z0-9_\-]*[a-z0-9]` and be between 2 and 30 characters in length. 558 // If the database ID is a reserved word or if it contains a hyphen, the 559 // database ID must be enclosed in backticks (`` ` ``). 560 string create_statement = 2 [(google.api.field_behavior) = REQUIRED]; 561 562 // Optional. A list of DDL statements to run inside the newly created 563 // database. Statements can create tables, indexes, etc. These 564 // statements execute atomically with the creation of the database: 565 // if there is an error in any statement, the database is not created. 566 repeated string extra_statements = 3 [(google.api.field_behavior) = OPTIONAL]; 567 568 // Optional. The encryption configuration for the database. If this field is not 569 // specified, Cloud Spanner will encrypt/decrypt all data at rest using 570 // Google default encryption. 571 EncryptionConfig encryption_config = 4 [(google.api.field_behavior) = OPTIONAL]; 572 573 // Optional. The dialect of the Cloud Spanner Database. 574 DatabaseDialect database_dialect = 5 [(google.api.field_behavior) = OPTIONAL]; 575 576 // Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements in 577 // 'extra_statements' above. 578 // Contains a protobuf-serialized 579 // [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). 580 // To generate it, [install](https://grpc.io/docs/protoc-installation/) and 581 // run `protoc` with --include_imports and --descriptor_set_out. For example, 582 // to generate for moon/shot/app.proto, run 583 // ``` 584 // $protoc --proto_path=/app_path --proto_path=/lib_path \ 585 // --include_imports \ 586 // --descriptor_set_out=descriptors.data \ 587 // moon/shot/app.proto 588 // ``` 589 // For more details, see protobuffer [self 590 // description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). 591 bytes proto_descriptors = 6 [(google.api.field_behavior) = OPTIONAL]; 592} 593 594// Metadata type for the operation returned by 595// [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase]. 596message CreateDatabaseMetadata { 597 // The database being created. 598 string database = 1 [(google.api.resource_reference) = { 599 type: "spanner.googleapis.com/Database" 600 }]; 601} 602 603// The request for [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase]. 604message GetDatabaseRequest { 605 // Required. The name of the requested database. Values are of the form 606 // `projects/<project>/instances/<instance>/databases/<database>`. 607 string name = 1 [ 608 (google.api.field_behavior) = REQUIRED, 609 (google.api.resource_reference) = { 610 type: "spanner.googleapis.com/Database" 611 } 612 ]; 613} 614 615// The request for 616// [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. 617message UpdateDatabaseRequest { 618 // Required. The database to update. 619 // The `name` field of the database is of the form 620 // `projects/<project>/instances/<instance>/databases/<database>`. 621 Database database = 1 [(google.api.field_behavior) = REQUIRED]; 622 623 // Required. The list of fields to update. Currently, only 624 // `enable_drop_protection` field can be updated. 625 google.protobuf.FieldMask update_mask = 2 626 [(google.api.field_behavior) = REQUIRED]; 627} 628 629// Metadata type for the operation returned by 630// [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. 631message UpdateDatabaseMetadata { 632 // The request for 633 // [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. 634 UpdateDatabaseRequest request = 1; 635 636 // The progress of the 637 // [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase] 638 // operation. 639 OperationProgress progress = 2; 640 641 // The time at which this operation was cancelled. If set, this operation is 642 // in the process of undoing itself (which is best-effort). 643 google.protobuf.Timestamp cancel_time = 3; 644} 645 646// Enqueues the given DDL statements to be applied, in order but not 647// necessarily all at once, to the database schema at some point (or 648// points) in the future. The server checks that the statements 649// are executable (syntactically valid, name tables that exist, etc.) 650// before enqueueing them, but they may still fail upon 651// later execution (e.g., if a statement from another batch of 652// statements is applied first and it conflicts in some way, or if 653// there is some data-related problem like a `NULL` value in a column to 654// which `NOT NULL` would be added). If a statement fails, all 655// subsequent statements in the batch are automatically cancelled. 656// 657// Each batch of statements is assigned a name which can be used with 658// the [Operations][google.longrunning.Operations] API to monitor 659// progress. See the 660// [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id] field for more 661// details. 662message UpdateDatabaseDdlRequest { 663 // Required. The database to update. 664 string database = 1 [ 665 (google.api.field_behavior) = REQUIRED, 666 (google.api.resource_reference) = { 667 type: "spanner.googleapis.com/Database" 668 } 669 ]; 670 671 // Required. DDL statements to be applied to the database. 672 repeated string statements = 2 [(google.api.field_behavior) = REQUIRED]; 673 674 // If empty, the new update request is assigned an 675 // automatically-generated operation ID. Otherwise, `operation_id` 676 // is used to construct the name of the resulting 677 // [Operation][google.longrunning.Operation]. 678 // 679 // Specifying an explicit operation ID simplifies determining 680 // whether the statements were executed in the event that the 681 // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed, 682 // or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and 683 // `operation_id` fields can be combined to form the 684 // [name][google.longrunning.Operation.name] of the resulting 685 // [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`. 686 // 687 // `operation_id` should be unique within the database, and must be 688 // a valid identifier: `[a-z][a-z0-9_]*`. Note that 689 // automatically-generated operation IDs always begin with an 690 // underscore. If the named operation already exists, 691 // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns 692 // `ALREADY_EXISTS`. 693 string operation_id = 3; 694 695 // Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements. 696 // Contains a protobuf-serialized 697 // [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). 698 // To generate it, [install](https://grpc.io/docs/protoc-installation/) and 699 // run `protoc` with --include_imports and --descriptor_set_out. For example, 700 // to generate for moon/shot/app.proto, run 701 // ``` 702 // $protoc --proto_path=/app_path --proto_path=/lib_path \ 703 // --include_imports \ 704 // --descriptor_set_out=descriptors.data \ 705 // moon/shot/app.proto 706 // ``` 707 // For more details, see protobuffer [self 708 // description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). 709 bytes proto_descriptors = 4 [(google.api.field_behavior) = OPTIONAL]; 710} 711 712// Action information extracted from a DDL statement. This proto is used to 713// display the brief info of the DDL statement for the operation 714// [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. 715message DdlStatementActionInfo { 716 // The action for the DDL statement, e.g. CREATE, ALTER, DROP, GRANT, etc. 717 // This field is a non-empty string. 718 string action = 1; 719 720 // The entity type for the DDL statement, e.g. TABLE, INDEX, VIEW, etc. 721 // This field can be empty string for some DDL statement, 722 // e.g. for statement "ANALYZE", `entity_type` = "". 723 string entity_type = 2; 724 725 // The entity name(s) being operated on the DDL statement. 726 // E.g. 727 // 1. For statement "CREATE TABLE t1(...)", `entity_names` = ["t1"]. 728 // 2. For statement "GRANT ROLE r1, r2 ...", `entity_names` = ["r1", "r2"]. 729 // 3. For statement "ANALYZE", `entity_names` = []. 730 repeated string entity_names = 3; 731} 732 733// Metadata type for the operation returned by 734// [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. 735message UpdateDatabaseDdlMetadata { 736 // The database being modified. 737 string database = 1 [(google.api.resource_reference) = { 738 type: "spanner.googleapis.com/Database" 739 }]; 740 741 // For an update this list contains all the statements. For an 742 // individual statement, this list contains only that statement. 743 repeated string statements = 2; 744 745 // Reports the commit timestamps of all statements that have 746 // succeeded so far, where `commit_timestamps[i]` is the commit 747 // timestamp for the statement `statements[i]`. 748 repeated google.protobuf.Timestamp commit_timestamps = 3; 749 750 // Output only. When true, indicates that the operation is throttled e.g. 751 // due to resource constraints. When resources become available the operation 752 // will resume and this field will be false again. 753 bool throttled = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 754 755 // The progress of the 756 // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] 757 // operations. All DDL statements will have continuously updating progress, 758 // and `progress[i]` is the operation progress for `statements[i]`. Also, 759 // `progress[i]` will have start time and end time populated with commit 760 // timestamp of operation, as well as a progress of 100% once the operation 761 // has completed. 762 repeated OperationProgress progress = 5; 763 764 // The brief action info for the DDL statements. 765 // `actions[i]` is the brief info for `statements[i]`. 766 repeated DdlStatementActionInfo actions = 6; 767} 768 769// The request for [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase]. 770message DropDatabaseRequest { 771 // Required. The database to be dropped. 772 string database = 1 [ 773 (google.api.field_behavior) = REQUIRED, 774 (google.api.resource_reference) = { 775 type: "spanner.googleapis.com/Database" 776 } 777 ]; 778} 779 780// The request for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl]. 781message GetDatabaseDdlRequest { 782 // Required. The database whose schema we wish to get. 783 // Values are of the form 784 // `projects/<project>/instances/<instance>/databases/<database>` 785 string database = 1 [ 786 (google.api.field_behavior) = REQUIRED, 787 (google.api.resource_reference) = { 788 type: "spanner.googleapis.com/Database" 789 } 790 ]; 791} 792 793// The response for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl]. 794message GetDatabaseDdlResponse { 795 // A list of formatted DDL statements defining the schema of the database 796 // specified in the request. 797 repeated string statements = 1; 798 799 // Proto descriptors stored in the database. 800 // Contains a protobuf-serialized 801 // [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). 802 // For more details, see protobuffer [self 803 // description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). 804 bytes proto_descriptors = 2; 805} 806 807// The request for 808// [ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations]. 809message ListDatabaseOperationsRequest { 810 // Required. The instance of the database operations. 811 // Values are of the form `projects/<project>/instances/<instance>`. 812 string parent = 1 [ 813 (google.api.field_behavior) = REQUIRED, 814 (google.api.resource_reference) = { 815 type: "spanner.googleapis.com/Instance" 816 } 817 ]; 818 819 // An expression that filters the list of returned operations. 820 // 821 // A filter expression consists of a field name, a 822 // comparison operator, and a value for filtering. 823 // The value must be a string, a number, or a boolean. The comparison operator 824 // must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. 825 // Colon `:` is the contains operator. Filter rules are not case sensitive. 826 // 827 // The following fields in the [Operation][google.longrunning.Operation] 828 // are eligible for filtering: 829 // 830 // * `name` - The name of the long-running operation 831 // * `done` - False if the operation is in progress, else true. 832 // * `metadata.@type` - the type of metadata. For example, the type string 833 // for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is 834 // `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. 835 // * `metadata.<field_name>` - any field in metadata.value. 836 // `metadata.@type` must be specified first, if filtering on metadata 837 // fields. 838 // * `error` - Error associated with the long-running operation. 839 // * `response.@type` - the type of response. 840 // * `response.<field_name>` - any field in response.value. 841 // 842 // You can combine multiple expressions by enclosing each expression in 843 // parentheses. By default, expressions are combined with AND logic. However, 844 // you can specify AND, OR, and NOT logic explicitly. 845 // 846 // Here are a few examples: 847 // 848 // * `done:true` - The operation is complete. 849 // * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ 850 // `(metadata.source_type:BACKUP) AND` \ 851 // `(metadata.backup_info.backup:backup_howl) AND` \ 852 // `(metadata.name:restored_howl) AND` \ 853 // `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ 854 // `(error:*)` - Return operations where: 855 // * The operation's metadata type is [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. 856 // * The database is restored from a backup. 857 // * The backup name contains "backup_howl". 858 // * The restored database's name contains "restored_howl". 859 // * The operation started before 2018-03-28T14:50:00Z. 860 // * The operation resulted in an error. 861 string filter = 2; 862 863 // Number of operations to be returned in the response. If 0 or 864 // less, defaults to the server's maximum allowed page size. 865 int32 page_size = 3; 866 867 // If non-empty, `page_token` should contain a 868 // [next_page_token][google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token] 869 // from a previous [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse] to the 870 // same `parent` and with the same `filter`. 871 string page_token = 4; 872} 873 874// The response for 875// [ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations]. 876message ListDatabaseOperationsResponse { 877 // The list of matching database [long-running 878 // operations][google.longrunning.Operation]. Each operation's name will be 879 // prefixed by the database's name. The operation's 880 // [metadata][google.longrunning.Operation.metadata] field type 881 // `metadata.type_url` describes the type of the metadata. 882 repeated google.longrunning.Operation operations = 1; 883 884 // `next_page_token` can be sent in a subsequent 885 // [ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations] 886 // call to fetch more of the matching metadata. 887 string next_page_token = 2; 888} 889 890// The request for 891// [RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase]. 892message RestoreDatabaseRequest { 893 // Required. The name of the instance in which to create the 894 // restored database. This instance must be in the same project and 895 // have the same instance configuration as the instance containing 896 // the source backup. Values are of the form 897 // `projects/<project>/instances/<instance>`. 898 string parent = 1 [ 899 (google.api.field_behavior) = REQUIRED, 900 (google.api.resource_reference) = { 901 type: "spanner.googleapis.com/Instance" 902 } 903 ]; 904 905 // Required. The id of the database to create and restore to. This 906 // database must not already exist. The `database_id` appended to 907 // `parent` forms the full database name of the form 908 // `projects/<project>/instances/<instance>/databases/<database_id>`. 909 string database_id = 2 [(google.api.field_behavior) = REQUIRED]; 910 911 // Required. The source from which to restore. 912 oneof source { 913 // Name of the backup from which to restore. Values are of the form 914 // `projects/<project>/instances/<instance>/backups/<backup>`. 915 string backup = 3 [(google.api.resource_reference) = { 916 type: "spanner.googleapis.com/Backup" 917 }]; 918 } 919 920 // Optional. An encryption configuration describing the encryption type and key 921 // resources in Cloud KMS used to encrypt/decrypt the database to restore to. 922 // If this field is not specified, the restored database will use 923 // the same encryption configuration as the backup by default, namely 924 // [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type] = 925 // `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. 926 RestoreDatabaseEncryptionConfig encryption_config = 4 [(google.api.field_behavior) = OPTIONAL]; 927} 928 929// Encryption configuration for the restored database. 930message RestoreDatabaseEncryptionConfig { 931 // Encryption types for the database to be restored. 932 enum EncryptionType { 933 // Unspecified. Do not use. 934 ENCRYPTION_TYPE_UNSPECIFIED = 0; 935 936 // This is the default option when 937 // [encryption_config][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig] is not specified. 938 USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION = 1; 939 940 // Use Google default encryption. 941 GOOGLE_DEFAULT_ENCRYPTION = 2; 942 943 // Use customer managed encryption. If specified, `kms_key_name` must 944 // must contain a valid Cloud KMS key. 945 CUSTOMER_MANAGED_ENCRYPTION = 3; 946 } 947 948 // Required. The encryption type of the restored database. 949 EncryptionType encryption_type = 1 [(google.api.field_behavior) = REQUIRED]; 950 951 // Optional. The Cloud KMS key that will be used to encrypt/decrypt the restored 952 // database. This field should be set only when 953 // [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type] is 954 // `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form 955 // `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`. 956 string kms_key_name = 2 [ 957 (google.api.field_behavior) = OPTIONAL, 958 (google.api.resource_reference) = { 959 type: "cloudkms.googleapis.com/CryptoKey" 960 } 961 ]; 962} 963 964// Metadata type for the long-running operation returned by 965// [RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase]. 966message RestoreDatabaseMetadata { 967 // Name of the database being created and restored to. 968 string name = 1 [(google.api.resource_reference) = { 969 type: "spanner.googleapis.com/Database" 970 }]; 971 972 // The type of the restore source. 973 RestoreSourceType source_type = 2; 974 975 // Information about the source used to restore the database, as specified by 976 // `source` in [RestoreDatabaseRequest][google.spanner.admin.database.v1.RestoreDatabaseRequest]. 977 oneof source_info { 978 // Information about the backup used to restore the database. 979 BackupInfo backup_info = 3; 980 } 981 982 // The progress of the 983 // [RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase] 984 // operation. 985 OperationProgress progress = 4; 986 987 // The time at which cancellation of this operation was received. 988 // [Operations.CancelOperation][google.longrunning.Operations.CancelOperation] 989 // starts asynchronous cancellation on a long-running operation. The server 990 // makes a best effort to cancel the operation, but success is not guaranteed. 991 // Clients can use 992 // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or 993 // other methods to check whether the cancellation succeeded or whether the 994 // operation completed despite cancellation. On successful cancellation, 995 // the operation is not deleted; instead, it becomes an operation with 996 // an [Operation.error][google.longrunning.Operation.error] value with a 997 // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`. 998 google.protobuf.Timestamp cancel_time = 5; 999 1000 // If exists, the name of the long-running operation that will be used to 1001 // track the post-restore optimization process to optimize the performance of 1002 // the restored database, and remove the dependency on the restore source. 1003 // The name is of the form 1004 // `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>` 1005 // where the <database> is the name of database being created and restored to. 1006 // The metadata type of the long-running operation is 1007 // [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata]. This long-running operation will be 1008 // automatically created by the system after the RestoreDatabase long-running 1009 // operation completes successfully. This operation will not be created if the 1010 // restore was not successful. 1011 string optimize_database_operation_name = 6; 1012} 1013 1014// Metadata type for the long-running operation used to track the progress 1015// of optimizations performed on a newly restored database. This long-running 1016// operation is automatically created by the system after the successful 1017// completion of a database restore, and cannot be cancelled. 1018message OptimizeRestoredDatabaseMetadata { 1019 // Name of the restored database being optimized. 1020 string name = 1 [(google.api.resource_reference) = { 1021 type: "spanner.googleapis.com/Database" 1022 }]; 1023 1024 // The progress of the post-restore optimizations. 1025 OperationProgress progress = 2; 1026} 1027 1028// Indicates the type of the restore source. 1029enum RestoreSourceType { 1030 // No restore associated. 1031 TYPE_UNSPECIFIED = 0; 1032 1033 // A backup was used as the source of the restore. 1034 BACKUP = 1; 1035} 1036 1037// A Cloud Spanner database role. 1038message DatabaseRole { 1039 option (google.api.resource) = { 1040 type: "spanner.googleapis.com/DatabaseRole" 1041 pattern: "projects/{project}/instances/{instance}/databases/{database}/databaseRoles/{role}" 1042 }; 1043 1044 // Required. The name of the database role. Values are of the form 1045 // `projects/<project>/instances/<instance>/databases/<database>/databaseRoles/ 1046 // {role}`, where `<role>` is as specified in the `CREATE ROLE` 1047 // DDL statement. This name can be passed to Get/Set IAMPolicy methods to 1048 // identify the database role. 1049 string name = 1 [(google.api.field_behavior) = REQUIRED]; 1050} 1051 1052// The request for [ListDatabaseRoles][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseRoles]. 1053message ListDatabaseRolesRequest { 1054 // Required. The database whose roles should be listed. 1055 // Values are of the form 1056 // `projects/<project>/instances/<instance>/databases/<database>/databaseRoles`. 1057 string parent = 1 [ 1058 (google.api.field_behavior) = REQUIRED, 1059 (google.api.resource_reference) = { 1060 type: "spanner.googleapis.com/Database" 1061 } 1062 ]; 1063 1064 // Number of database roles to be returned in the response. If 0 or less, 1065 // defaults to the server's maximum allowed page size. 1066 int32 page_size = 2; 1067 1068 // If non-empty, `page_token` should contain a 1069 // [next_page_token][google.spanner.admin.database.v1.ListDatabaseRolesResponse.next_page_token] from a 1070 // previous [ListDatabaseRolesResponse][google.spanner.admin.database.v1.ListDatabaseRolesResponse]. 1071 string page_token = 3; 1072} 1073 1074// The response for [ListDatabaseRoles][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseRoles]. 1075message ListDatabaseRolesResponse { 1076 // Database roles that matched the request. 1077 repeated DatabaseRole database_roles = 1; 1078 1079 // `next_page_token` can be sent in a subsequent 1080 // [ListDatabaseRoles][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseRoles] 1081 // call to fetch more of the matching roles. 1082 string next_page_token = 2; 1083} 1084