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.cloud.alloydb.v1beta; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/api/resource.proto"; 23import "google/cloud/alloydb/v1beta/resources.proto"; 24import "google/longrunning/operations.proto"; 25import "google/protobuf/duration.proto"; 26import "google/protobuf/empty.proto"; 27import "google/protobuf/field_mask.proto"; 28import "google/protobuf/timestamp.proto"; 29import "google/rpc/status.proto"; 30 31option csharp_namespace = "Google.Cloud.AlloyDb.V1Beta"; 32option go_package = "cloud.google.com/go/alloydb/apiv1beta/alloydbpb;alloydbpb"; 33option java_multiple_files = true; 34option java_outer_classname = "ServiceProto"; 35option java_package = "com.google.cloud.alloydb.v1beta"; 36option php_namespace = "Google\\Cloud\\AlloyDb\\V1beta"; 37option ruby_package = "Google::Cloud::AlloyDB::V1beta"; 38 39// Service describing handlers for resources 40service AlloyDBAdmin { 41 option (google.api.default_host) = "alloydb.googleapis.com"; 42 option (google.api.oauth_scopes) = 43 "https://www.googleapis.com/auth/cloud-platform"; 44 45 // Lists Clusters in a given project and location. 46 rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) { 47 option (google.api.http) = { 48 get: "/v1beta/{parent=projects/*/locations/*}/clusters" 49 }; 50 option (google.api.method_signature) = "parent"; 51 } 52 53 // Gets details of a single Cluster. 54 rpc GetCluster(GetClusterRequest) returns (Cluster) { 55 option (google.api.http) = { 56 get: "/v1beta/{name=projects/*/locations/*/clusters/*}" 57 }; 58 option (google.api.method_signature) = "name"; 59 } 60 61 // Creates a new Cluster in a given project and location. 62 rpc CreateCluster(CreateClusterRequest) 63 returns (google.longrunning.Operation) { 64 option (google.api.http) = { 65 post: "/v1beta/{parent=projects/*/locations/*}/clusters" 66 body: "cluster" 67 }; 68 option (google.api.method_signature) = "parent,cluster,cluster_id"; 69 option (google.longrunning.operation_info) = { 70 response_type: "Cluster" 71 metadata_type: "OperationMetadata" 72 }; 73 } 74 75 // Updates the parameters of a single Cluster. 76 rpc UpdateCluster(UpdateClusterRequest) 77 returns (google.longrunning.Operation) { 78 option (google.api.http) = { 79 patch: "/v1beta/{cluster.name=projects/*/locations/*/clusters/*}" 80 body: "cluster" 81 }; 82 option (google.api.method_signature) = "cluster,update_mask"; 83 option (google.longrunning.operation_info) = { 84 response_type: "Cluster" 85 metadata_type: "OperationMetadata" 86 }; 87 } 88 89 // Deletes a single Cluster. 90 rpc DeleteCluster(DeleteClusterRequest) 91 returns (google.longrunning.Operation) { 92 option (google.api.http) = { 93 delete: "/v1beta/{name=projects/*/locations/*/clusters/*}" 94 }; 95 option (google.api.method_signature) = "name"; 96 option (google.longrunning.operation_info) = { 97 response_type: "google.protobuf.Empty" 98 metadata_type: "OperationMetadata" 99 }; 100 } 101 102 // Promotes a SECONDARY cluster. This turns down replication 103 // from the PRIMARY cluster and promotes a secondary cluster 104 // into its own standalone cluster. 105 // Imperative only. 106 rpc PromoteCluster(PromoteClusterRequest) 107 returns (google.longrunning.Operation) { 108 option (google.api.http) = { 109 post: "/v1beta/{name=projects/*/locations/*/clusters/*}:promote" 110 body: "*" 111 }; 112 option (google.api.method_signature) = "name"; 113 option (google.longrunning.operation_info) = { 114 response_type: "Cluster" 115 metadata_type: "OperationMetadata" 116 }; 117 } 118 119 // Creates a new Cluster in a given project and location, with a volume 120 // restored from the provided source, either a backup ID or a point-in-time 121 // and a source cluster. 122 rpc RestoreCluster(RestoreClusterRequest) 123 returns (google.longrunning.Operation) { 124 option (google.api.http) = { 125 post: "/v1beta/{parent=projects/*/locations/*}/clusters:restore" 126 body: "*" 127 }; 128 option (google.longrunning.operation_info) = { 129 response_type: "Cluster" 130 metadata_type: "OperationMetadata" 131 }; 132 } 133 134 // Creates a cluster of type SECONDARY in the given location using 135 // the primary cluster as the source. 136 rpc CreateSecondaryCluster(CreateSecondaryClusterRequest) 137 returns (google.longrunning.Operation) { 138 option (google.api.http) = { 139 post: "/v1beta/{parent=projects/*/locations/*}/clusters:createsecondary" 140 body: "cluster" 141 }; 142 option (google.api.method_signature) = "parent,cluster,cluster_id"; 143 option (google.longrunning.operation_info) = { 144 response_type: "Cluster" 145 metadata_type: "OperationMetadata" 146 }; 147 } 148 149 // Lists Instances in a given project and location. 150 rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) { 151 option (google.api.http) = { 152 get: "/v1beta/{parent=projects/*/locations/*/clusters/*}/instances" 153 }; 154 option (google.api.method_signature) = "parent"; 155 } 156 157 // Gets details of a single Instance. 158 rpc GetInstance(GetInstanceRequest) returns (Instance) { 159 option (google.api.http) = { 160 get: "/v1beta/{name=projects/*/locations/*/clusters/*/instances/*}" 161 }; 162 option (google.api.method_signature) = "name"; 163 } 164 165 // Creates a new Instance in a given project and location. 166 rpc CreateInstance(CreateInstanceRequest) 167 returns (google.longrunning.Operation) { 168 option (google.api.http) = { 169 post: "/v1beta/{parent=projects/*/locations/*/clusters/*}/instances" 170 body: "instance" 171 }; 172 option (google.api.method_signature) = "parent,instance,instance_id"; 173 option (google.longrunning.operation_info) = { 174 response_type: "Instance" 175 metadata_type: "OperationMetadata" 176 }; 177 } 178 179 // Creates a new SECONDARY Instance in a given project and location. 180 rpc CreateSecondaryInstance(CreateSecondaryInstanceRequest) 181 returns (google.longrunning.Operation) { 182 option (google.api.http) = { 183 post: "/v1beta/{parent=projects/*/locations/*/clusters/*}/instances:createsecondary" 184 body: "instance" 185 }; 186 option (google.api.method_signature) = "parent,instance,instance_id"; 187 option (google.longrunning.operation_info) = { 188 response_type: "Instance" 189 metadata_type: "OperationMetadata" 190 }; 191 } 192 193 // Creates new instances under the given project, location and cluster. 194 // There can be only one primary instance in a cluster. If the primary 195 // instance exists in the cluster as well as this request, then API will 196 // throw an error. 197 // The primary instance should exist before any read pool instance is 198 // created. If the primary instance is a part of the request payload, then 199 // the API will take care of creating instances in the correct order. 200 // This method is here to support Google-internal use cases, and is not meant 201 // for external customers to consume. Please do not start relying on it; its 202 // behavior is subject to change without notice. 203 rpc BatchCreateInstances(BatchCreateInstancesRequest) 204 returns (google.longrunning.Operation) { 205 option (google.api.http) = { 206 post: "/v1beta/{parent=projects/*/locations/*/clusters/*}/instances:batchCreate" 207 body: "requests" 208 }; 209 option (google.longrunning.operation_info) = { 210 response_type: "BatchCreateInstancesResponse" 211 metadata_type: "OperationMetadata" 212 }; 213 } 214 215 // Updates the parameters of a single Instance. 216 rpc UpdateInstance(UpdateInstanceRequest) 217 returns (google.longrunning.Operation) { 218 option (google.api.http) = { 219 patch: "/v1beta/{instance.name=projects/*/locations/*/clusters/*/instances/*}" 220 body: "instance" 221 }; 222 option (google.api.method_signature) = "instance,update_mask"; 223 option (google.longrunning.operation_info) = { 224 response_type: "Instance" 225 metadata_type: "OperationMetadata" 226 }; 227 } 228 229 // Deletes a single Instance. 230 rpc DeleteInstance(DeleteInstanceRequest) 231 returns (google.longrunning.Operation) { 232 option (google.api.http) = { 233 delete: "/v1beta/{name=projects/*/locations/*/clusters/*/instances/*}" 234 }; 235 option (google.api.method_signature) = "name"; 236 option (google.longrunning.operation_info) = { 237 response_type: "google.protobuf.Empty" 238 metadata_type: "OperationMetadata" 239 }; 240 } 241 242 // Forces a Failover for a highly available instance. 243 // Failover promotes the HA standby instance as the new primary. 244 // Imperative only. 245 rpc FailoverInstance(FailoverInstanceRequest) 246 returns (google.longrunning.Operation) { 247 option (google.api.http) = { 248 post: "/v1beta/{name=projects/*/locations/*/clusters/*/instances/*}:failover" 249 body: "*" 250 }; 251 option (google.api.method_signature) = "name"; 252 option (google.longrunning.operation_info) = { 253 response_type: "Instance" 254 metadata_type: "OperationMetadata" 255 }; 256 } 257 258 // Injects fault in an instance. 259 // Imperative only. 260 rpc InjectFault(InjectFaultRequest) returns (google.longrunning.Operation) { 261 option (google.api.http) = { 262 post: "/v1beta/{name=projects/*/locations/*/clusters/*/instances/*}:injectFault" 263 body: "*" 264 }; 265 option (google.api.method_signature) = "fault_type,name"; 266 option (google.longrunning.operation_info) = { 267 response_type: "Instance" 268 metadata_type: "OperationMetadata" 269 }; 270 } 271 272 // Restart an Instance in a cluster. 273 // Imperative only. 274 rpc RestartInstance(RestartInstanceRequest) 275 returns (google.longrunning.Operation) { 276 option (google.api.http) = { 277 post: "/v1beta/{name=projects/*/locations/*/clusters/*/instances/*}:restart" 278 body: "*" 279 }; 280 option (google.api.method_signature) = "name"; 281 option (google.longrunning.operation_info) = { 282 response_type: "Instance" 283 metadata_type: "OperationMetadata" 284 }; 285 } 286 287 // Lists Backups in a given project and location. 288 rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { 289 option (google.api.http) = { 290 get: "/v1beta/{parent=projects/*/locations/*}/backups" 291 }; 292 option (google.api.method_signature) = "parent"; 293 } 294 295 // Gets details of a single Backup. 296 rpc GetBackup(GetBackupRequest) returns (Backup) { 297 option (google.api.http) = { 298 get: "/v1beta/{name=projects/*/locations/*/backups/*}" 299 }; 300 option (google.api.method_signature) = "name"; 301 } 302 303 // Creates a new Backup in a given project and location. 304 rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) { 305 option (google.api.http) = { 306 post: "/v1beta/{parent=projects/*/locations/*}/backups" 307 body: "backup" 308 }; 309 option (google.api.method_signature) = "parent,backup,backup_id"; 310 option (google.longrunning.operation_info) = { 311 response_type: "Backup" 312 metadata_type: "OperationMetadata" 313 }; 314 } 315 316 // Updates the parameters of a single Backup. 317 rpc UpdateBackup(UpdateBackupRequest) returns (google.longrunning.Operation) { 318 option (google.api.http) = { 319 patch: "/v1beta/{backup.name=projects/*/locations/*/backups/*}" 320 body: "backup" 321 }; 322 option (google.api.method_signature) = "backup,update_mask"; 323 option (google.longrunning.operation_info) = { 324 response_type: "Backup" 325 metadata_type: "OperationMetadata" 326 }; 327 } 328 329 // Deletes a single Backup. 330 rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { 331 option (google.api.http) = { 332 delete: "/v1beta/{name=projects/*/locations/*/backups/*}" 333 }; 334 option (google.api.method_signature) = "name"; 335 option (google.longrunning.operation_info) = { 336 response_type: "google.protobuf.Empty" 337 metadata_type: "OperationMetadata" 338 }; 339 } 340 341 // Lists SupportedDatabaseFlags for a given project and location. 342 rpc ListSupportedDatabaseFlags(ListSupportedDatabaseFlagsRequest) 343 returns (ListSupportedDatabaseFlagsResponse) { 344 option (google.api.http) = { 345 get: "/v1beta/{parent=projects/*/locations/*}/supportedDatabaseFlags" 346 }; 347 option (google.api.method_signature) = "parent"; 348 } 349 350 // Generate a client certificate signed by a Cluster CA. 351 // The sole purpose of this endpoint is to support AlloyDB connectors and the 352 // Auth Proxy client. The endpoint's behavior is subject to change without 353 // notice, so do not rely on its behavior remaining constant. Future changes 354 // will not break AlloyDB connectors or the Auth Proxy client. 355 rpc GenerateClientCertificate(GenerateClientCertificateRequest) 356 returns (GenerateClientCertificateResponse) { 357 option (google.api.http) = { 358 post: "/v1beta/{parent=projects/*/locations/*/clusters/*}:generateClientCertificate" 359 body: "*" 360 }; 361 option (google.api.method_signature) = "parent"; 362 } 363 364 // Get instance metadata used for a connection. 365 rpc GetConnectionInfo(GetConnectionInfoRequest) returns (ConnectionInfo) { 366 option (google.api.http) = { 367 get: "/v1beta/{parent=projects/*/locations/*/clusters/*/instances/*}/connectionInfo" 368 }; 369 option (google.api.method_signature) = "parent"; 370 } 371 372 // Lists Users in a given project and location. 373 rpc ListUsers(ListUsersRequest) returns (ListUsersResponse) { 374 option (google.api.http) = { 375 get: "/v1beta/{parent=projects/*/locations/*/clusters/*}/users" 376 }; 377 option (google.api.method_signature) = "parent"; 378 } 379 380 // Gets details of a single User. 381 rpc GetUser(GetUserRequest) returns (User) { 382 option (google.api.http) = { 383 get: "/v1beta/{name=projects/*/locations/*/clusters/*/users/*}" 384 }; 385 option (google.api.method_signature) = "name"; 386 } 387 388 // Creates a new User in a given project, location, and cluster. 389 rpc CreateUser(CreateUserRequest) returns (User) { 390 option (google.api.http) = { 391 post: "/v1beta/{parent=projects/*/locations/*/clusters/*}/users" 392 body: "user" 393 }; 394 option (google.api.method_signature) = "parent,user,user_id"; 395 } 396 397 // Updates the parameters of a single User. 398 rpc UpdateUser(UpdateUserRequest) returns (User) { 399 option (google.api.http) = { 400 patch: "/v1beta/{user.name=projects/*/locations/*/clusters/*/users/*}" 401 body: "user" 402 }; 403 option (google.api.method_signature) = "user,update_mask"; 404 } 405 406 // Deletes a single User. 407 rpc DeleteUser(DeleteUserRequest) returns (google.protobuf.Empty) { 408 option (google.api.http) = { 409 delete: "/v1beta/{name=projects/*/locations/*/clusters/*/users/*}" 410 }; 411 option (google.api.method_signature) = "name"; 412 } 413 414 // Lists Databases in a given project and location. 415 rpc ListDatabases(ListDatabasesRequest) returns (ListDatabasesResponse) { 416 option (google.api.http) = { 417 get: "/v1beta/{parent=projects/*/locations/*/clusters/*}/databases" 418 }; 419 option (google.api.method_signature) = "parent"; 420 } 421} 422 423// Message for requesting list of Clusters 424message ListClustersRequest { 425 // Required. The name of the parent resource. For the required format, see the 426 // comment on the Cluster.name field. Additionally, you can perform an 427 // aggregated list operation by specifying a value with the following format: 428 // * projects/{project}/locations/- 429 string parent = 1 [ 430 (google.api.field_behavior) = REQUIRED, 431 (google.api.resource_reference) = { 432 child_type: "alloydb.googleapis.com/Cluster" 433 } 434 ]; 435 436 // Optional. Requested page size. Server may return fewer items than 437 // requested. If unspecified, server will pick an appropriate default. 438 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 439 440 // A token identifying a page of results the server should return. 441 string page_token = 3; 442 443 // Optional. Filtering results 444 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 445 446 // Optional. Hint for how to order the results 447 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 448} 449 450// Message for response to listing Clusters 451message ListClustersResponse { 452 // The list of Cluster 453 repeated Cluster clusters = 1; 454 455 // A token identifying a page of results the server should return. 456 string next_page_token = 2; 457 458 // Locations that could not be reached. 459 repeated string unreachable = 3; 460} 461 462// Message for getting a Cluster 463message GetClusterRequest { 464 // Required. The name of the resource. For the required format, see the 465 // comment on the Cluster.name field. 466 string name = 1 [ 467 (google.api.field_behavior) = REQUIRED, 468 (google.api.resource_reference) = { type: "alloydb.googleapis.com/Cluster" } 469 ]; 470 471 // Optional. The view of the cluster to return. Returns all default fields if 472 // not set. 473 ClusterView view = 2 [(google.api.field_behavior) = OPTIONAL]; 474} 475 476message CreateSecondaryClusterRequest { 477 // Required. The location of the new cluster. For the required 478 // format, see the comment on the Cluster.name field. 479 string parent = 1 [ 480 (google.api.field_behavior) = REQUIRED, 481 (google.api.resource_reference) = { 482 child_type: "alloydb.googleapis.com/Cluster" 483 } 484 ]; 485 486 // Required. ID of the requesting object (the secondary cluster). 487 string cluster_id = 2 [(google.api.field_behavior) = REQUIRED]; 488 489 // Required. Configuration of the requesting object (the secondary cluster). 490 Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED]; 491 492 // Optional. An optional request ID to identify requests. Specify a unique 493 // request ID so that if you must retry your request, the server will know to 494 // ignore the request if it has already been completed. The server will 495 // guarantee that for at least 60 minutes since the first request. 496 // 497 // For example, consider a situation where you make an initial request and 498 // the request times out. If you make the request again with the same request 499 // ID, the server can check if original operation with the same request ID 500 // was received, and if so, will ignore the second request. This prevents 501 // clients from accidentally creating duplicate commitments. 502 // 503 // The request ID must be a valid UUID with the exception that zero UUID is 504 // not supported (00000000-0000-0000-0000-000000000000). 505 string request_id = 5 [(google.api.field_behavior) = OPTIONAL]; 506 507 // Optional. If set, performs request validation (e.g. permission checks and 508 // any other type of validation), but do not actually execute the create 509 // request. 510 bool validate_only = 6 [(google.api.field_behavior) = OPTIONAL]; 511} 512 513// Message for creating a Cluster 514message CreateClusterRequest { 515 // Required. The location of the new cluster. For the required format, see the 516 // comment on the Cluster.name field. 517 string parent = 1 [ 518 (google.api.field_behavior) = REQUIRED, 519 (google.api.resource_reference) = { 520 child_type: "alloydb.googleapis.com/Cluster" 521 } 522 ]; 523 524 // Required. ID of the requesting object. 525 string cluster_id = 2 [(google.api.field_behavior) = REQUIRED]; 526 527 // Required. The resource being created 528 Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED]; 529 530 // Optional. An optional request ID to identify requests. Specify a unique 531 // request ID so that if you must retry your request, the server will know to 532 // ignore the request if it has already been completed. The server will 533 // guarantee that for at least 60 minutes since the first request. 534 // 535 // For example, consider a situation where you make an initial request and 536 // the request times out. If you make the request again with the same request 537 // ID, the server can check if original operation with the same request ID 538 // was received, and if so, will ignore the second request. This prevents 539 // clients from accidentally creating duplicate commitments. 540 // 541 // The request ID must be a valid UUID with the exception that zero UUID is 542 // not supported (00000000-0000-0000-0000-000000000000). 543 string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; 544 545 // Optional. If set, performs request validation (e.g. permission checks and 546 // any other type of validation), but do not actually execute the create 547 // request. 548 bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; 549} 550 551// Message for updating a Cluster 552message UpdateClusterRequest { 553 // Optional. Field mask is used to specify the fields to be overwritten in the 554 // Cluster resource by the update. 555 // The fields specified in the update_mask are relative to the resource, not 556 // the full request. A field will be overwritten if it is in the mask. If the 557 // user does not provide a mask then all fields will be overwritten. 558 google.protobuf.FieldMask update_mask = 1 559 [(google.api.field_behavior) = OPTIONAL]; 560 561 // Required. The resource being updated 562 Cluster cluster = 2 [(google.api.field_behavior) = REQUIRED]; 563 564 // Optional. An optional request ID to identify requests. Specify a unique 565 // request ID so that if you must retry your request, the server will know to 566 // ignore the request if it has already been completed. The server will 567 // guarantee that for at least 60 minutes since the first request. 568 // 569 // For example, consider a situation where you make an initial request and 570 // the request times out. If you make the request again with the same request 571 // ID, the server can check if original operation with the same request ID 572 // was received, and if so, will ignore the second request. This prevents 573 // clients from accidentally creating duplicate commitments. 574 // 575 // The request ID must be a valid UUID with the exception that zero UUID is 576 // not supported (00000000-0000-0000-0000-000000000000). 577 string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; 578 579 // Optional. If set, performs request validation (e.g. permission checks and 580 // any other type of validation), but do not actually execute the update 581 // request. 582 bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; 583 584 // Optional. If set to true, update succeeds even if cluster is not found. In 585 // that case, a new cluster is created and `update_mask` is ignored. 586 bool allow_missing = 5 [(google.api.field_behavior) = OPTIONAL]; 587} 588 589// Message for deleting a Cluster 590message DeleteClusterRequest { 591 // Required. The name of the resource. For the required format, see the 592 // comment on the Cluster.name field. 593 string name = 1 [ 594 (google.api.field_behavior) = REQUIRED, 595 (google.api.resource_reference) = { type: "alloydb.googleapis.com/Cluster" } 596 ]; 597 598 // Optional. An optional request ID to identify requests. Specify a unique 599 // request ID so that if you must retry your request, the server will know to 600 // ignore the request if it has already been completed. The server will 601 // guarantee that for at least 60 minutes after the first request. 602 // 603 // For example, consider a situation where you make an initial request and 604 // the request times out. If you make the request again with the same request 605 // ID, the server can check if original operation with the same request ID 606 // was received, and if so, will ignore the second request. This prevents 607 // clients from accidentally creating duplicate commitments. 608 // 609 // The request ID must be a valid UUID with the exception that zero UUID is 610 // not supported (00000000-0000-0000-0000-000000000000). 611 string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; 612 613 // Optional. The current etag of the Cluster. 614 // If an etag is provided and does not match the current etag of the Cluster, 615 // deletion will be blocked and an ABORTED error will be returned. 616 string etag = 3 [(google.api.field_behavior) = OPTIONAL]; 617 618 // Optional. If set, performs request validation (e.g. permission checks and 619 // any other type of validation), but do not actually execute the delete. 620 bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; 621 622 // Optional. Whether to cascade delete child instances for given cluster. 623 bool force = 5 [(google.api.field_behavior) = OPTIONAL]; 624} 625 626// Message for promoting a Cluster 627message PromoteClusterRequest { 628 // Required. The name of the resource. For the required format, see the 629 // comment on the Cluster.name field 630 string name = 1 [ 631 (google.api.field_behavior) = REQUIRED, 632 (google.api.resource_reference) = { type: "alloydb.googleapis.com/Cluster" } 633 ]; 634 635 // Optional. An optional request ID to identify requests. Specify a unique 636 // request ID so that if you must retry your request, the server will know to 637 // ignore the request if it has already been completed. The server will 638 // guarantee that for at least 60 minutes after the first request. 639 // 640 // For example, consider a situation where you make an initial request and 641 // the request times out. If you make the request again with the same request 642 // ID, the server can check if original operation with the same request ID 643 // was received, and if so, will ignore the second request. This prevents 644 // clients from accidentally creating duplicate commitments. 645 // 646 // The request ID must be a valid UUID with the exception that zero UUID is 647 // not supported (00000000-0000-0000-0000-000000000000). 648 string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; 649 650 // Optional. The current etag of the Cluster. 651 // If an etag is provided and does not match the current etag of the Cluster, 652 // deletion will be blocked and an ABORTED error will be returned. 653 string etag = 3 [(google.api.field_behavior) = OPTIONAL]; 654 655 // Optional. If set, performs request validation (e.g. permission checks and 656 // any other type of validation), but do not actually execute the delete. 657 bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; 658} 659 660// Message for restoring a Cluster from a backup or another cluster at a given 661// point in time. 662message RestoreClusterRequest { 663 // Required. 664 // The source to import from. 665 oneof source { 666 // Backup source. 667 BackupSource backup_source = 4; 668 669 // ContinuousBackup source. Continuous backup needs to be enabled in the 670 // source cluster for this operation to succeed. 671 ContinuousBackupSource continuous_backup_source = 8; 672 } 673 674 // Required. The name of the parent resource. For the required format, see the 675 // comment on the Cluster.name field. 676 string parent = 1 [ 677 (google.api.field_behavior) = REQUIRED, 678 (google.api.resource_reference) = { 679 child_type: "alloydb.googleapis.com/Cluster" 680 } 681 ]; 682 683 // Required. ID of the requesting object. 684 string cluster_id = 2 [(google.api.field_behavior) = REQUIRED]; 685 686 // Required. The resource being created 687 Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED]; 688 689 // Optional. An optional request ID to identify requests. Specify a unique 690 // request ID so that if you must retry your request, the server will know to 691 // ignore the request if it has already been completed. The server will 692 // guarantee that for at least 60 minutes since the first request. 693 // 694 // For example, consider a situation where you make an initial request and 695 // the request times out. If you make the request again with the same request 696 // ID, the server can check if original operation with the same request ID 697 // was received, and if so, will ignore the second request. This prevents 698 // clients from accidentally creating duplicate commitments. 699 // 700 // The request ID must be a valid UUID with the exception that zero UUID is 701 // not supported (00000000-0000-0000-0000-000000000000). 702 string request_id = 5 [(google.api.field_behavior) = OPTIONAL]; 703 704 // Optional. If set, performs request validation (e.g. permission checks and 705 // any other type of validation), but do not actually execute the import 706 // request. 707 bool validate_only = 6 [(google.api.field_behavior) = OPTIONAL]; 708} 709 710// Message for requesting list of Instances 711message ListInstancesRequest { 712 // Required. The name of the parent resource. For the required format, see the 713 // comment on the Instance.name field. Additionally, you can perform an 714 // aggregated list operation by specifying a value with one of the following 715 // formats: 716 // * projects/{project}/locations/-/clusters/- 717 // * projects/{project}/locations/{region}/clusters/- 718 string parent = 1 [ 719 (google.api.field_behavior) = REQUIRED, 720 (google.api.resource_reference) = { 721 child_type: "alloydb.googleapis.com/Instance" 722 } 723 ]; 724 725 // Optional. Requested page size. Server may return fewer items than 726 // requested. If unspecified, server will pick an appropriate default. 727 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 728 729 // A token identifying a page of results the server should return. 730 string page_token = 3; 731 732 // Optional. Filtering results 733 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 734 735 // Optional. Hint for how to order the results 736 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 737} 738 739// Message for response to listing Instances 740message ListInstancesResponse { 741 // The list of Instance 742 repeated Instance instances = 1; 743 744 // A token identifying a page of results the server should return. 745 string next_page_token = 2; 746 747 // Locations that could not be reached. 748 repeated string unreachable = 3; 749} 750 751// Message for getting a Instance 752message GetInstanceRequest { 753 // Required. The name of the resource. For the required format, see the 754 // comment on the Instance.name field. 755 string name = 1 [ 756 (google.api.field_behavior) = REQUIRED, 757 (google.api.resource_reference) = { 758 type: "alloydb.googleapis.com/Instance" 759 } 760 ]; 761 762 // The view of the instance to return. 763 InstanceView view = 2; 764} 765 766// Message for creating a Instance 767message CreateInstanceRequest { 768 // Required. The name of the parent resource. For the required format, see the 769 // comment on the Instance.name field. 770 string parent = 1 [ 771 (google.api.field_behavior) = REQUIRED, 772 (google.api.resource_reference) = { 773 child_type: "alloydb.googleapis.com/Instance" 774 } 775 ]; 776 777 // Required. ID of the requesting object. 778 string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; 779 780 // Required. The resource being created 781 Instance instance = 3 [(google.api.field_behavior) = REQUIRED]; 782 783 // Optional. An optional request ID to identify requests. Specify a unique 784 // request ID so that if you must retry your request, the server will know to 785 // ignore the request if it has already been completed. The server will 786 // guarantee that for at least 60 minutes since the first request. 787 // 788 // For example, consider a situation where you make an initial request and 789 // the request times out. If you make the request again with the same request 790 // ID, the server can check if original operation with the same request ID 791 // was received, and if so, will ignore the second request. This prevents 792 // clients from accidentally creating duplicate commitments. 793 // 794 // The request ID must be a valid UUID with the exception that zero UUID is 795 // not supported (00000000-0000-0000-0000-000000000000). 796 string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; 797 798 // Optional. If set, performs request validation (e.g. permission checks and 799 // any other type of validation), but do not actually execute the create 800 // request. 801 bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; 802} 803 804// Message for creating a Secondary Instance 805message CreateSecondaryInstanceRequest { 806 // Required. The name of the parent resource. For the required format, see the 807 // comment on the Instance.name field. 808 string parent = 1 [ 809 (google.api.field_behavior) = REQUIRED, 810 (google.api.resource_reference) = { 811 child_type: "alloydb.googleapis.com/Instance" 812 } 813 ]; 814 815 // Required. ID of the requesting object. 816 string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; 817 818 // Required. The resource being created 819 Instance instance = 3 [(google.api.field_behavior) = REQUIRED]; 820 821 // Optional. An optional request ID to identify requests. Specify a unique 822 // request ID so that if you must retry your request, the server will know to 823 // ignore the request if it has already been completed. The server will 824 // guarantee that for at least 60 minutes since the first request. 825 // 826 // For example, consider a situation where you make an initial request and 827 // the request times out. If you make the request again with the same request 828 // ID, the server can check if original operation with the same request ID 829 // was received, and if so, will ignore the second request. This prevents 830 // clients from accidentally creating duplicate commitments. 831 // 832 // The request ID must be a valid UUID with the exception that zero UUID is 833 // not supported (00000000-0000-0000-0000-000000000000). 834 string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; 835 836 // Optional. If set, performs request validation (e.g. permission checks and 837 // any other type of validation), but do not actually execute the create 838 // request. 839 bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; 840} 841 842// See usage below for notes. 843message CreateInstanceRequests { 844 // Required. Primary and read replica instances to be created. This list 845 // should not be empty. 846 repeated CreateInstanceRequest create_instance_requests = 1 847 [(google.api.field_behavior) = REQUIRED]; 848} 849 850// Message for creating a batch of instances under the specified cluster. 851message BatchCreateInstancesRequest { 852 // Required. The name of the parent resource. 853 string parent = 1 [ 854 (google.api.field_behavior) = REQUIRED, 855 (google.api.resource_reference) = { 856 child_type: "alloydb.googleapis.com/Instance" 857 } 858 ]; 859 860 // Required. Resources being created. 861 CreateInstanceRequests requests = 2 [(google.api.field_behavior) = REQUIRED]; 862 863 // Optional. An optional request ID to identify requests. Specify a unique 864 // request ID so that if you must retry your request, the server will know to 865 // ignore the request if it has already been completed. The server will 866 // guarantee that for at least 60 minutes since the first request. 867 // 868 // For example, consider a situation where you make an initial request and 869 // the request times out. If you make the request again with the same request 870 // ID, the server can check if original operation with the same request ID 871 // was received, and if so, will ignore the second request. This prevents 872 // clients from accidentally creating duplicate commitments. 873 // 874 // The request ID must be a valid UUID with the exception that zero UUID is 875 // not supported (00000000-0000-0000-0000-000000000000). 876 string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; 877} 878 879// Message for creating batches of instances in a cluster. 880message BatchCreateInstancesResponse { 881 // Created instances. 882 repeated Instance instances = 1; 883} 884 885// Message for metadata that is specific to BatchCreateInstances API. 886// NEXT_ID: 3 887message BatchCreateInstancesMetadata { 888 // The instances being created in the API call. Each string in this list 889 // is the server defined resource path for target instances in the request 890 // and for the format of each string, see the comment on the Instance.name 891 // field. 892 repeated string instance_targets = 1; 893 894 // A map representing state of the instances involved in the 895 // BatchCreateInstances operation during the operation execution. 896 // The instance state will be in STATE_UNSPECIFIED state if the instance has 897 // not yet been picked up for processing. 898 // The key of the map is the name of the instance resource. 899 // For the format, see the comment on the Instance.name field. 900 map<string, BatchCreateInstanceStatus> instance_statuses = 2; 901} 902 903// Message for current status of an instance in the BatchCreateInstances 904// operation. 905// For example, lets say a BatchCreateInstances workflow has 4 instances, 906// Instance1 through Instance4. Lets also assume that 2 instances succeeded 907// but the third failed to create and the 4th was never picked up for creation 908// because of failure of the previous one. Then, resulting states would look 909// something like: 910// 1. Instance1 = ROLLED_BACK 911// 2. Instance2 = ROLLED_BACK 912// 3. Instance3 = FAILED 913// 4. Instance4 = FAILED 914// 915// However, while the operation is running, the instance might be in other 916// states including PENDING_CREATE, ACTIVE, DELETING and CREATING. The states 917// / do not get further updated once the operation is done. 918message BatchCreateInstanceStatus { 919 // State contains all valid instance states for the BatchCreateInstances 920 // operation. This is mainly used for status reporting through the LRO 921 // metadata. 922 enum State { 923 // The state of the instance is unknown. 924 STATE_UNSPECIFIED = 0; 925 926 // Instance is pending creation and has not yet been picked up for 927 // processsing in the backend. 928 PENDING_CREATE = 1; 929 930 // The instance is active and running. 931 READY = 2; 932 933 // The instance is being created. 934 CREATING = 3; 935 936 // The instance is being deleted. 937 DELETING = 4; 938 939 // The creation of the instance failed or a fatal error occurred during 940 // an operation on the instance or a batch of instances. 941 FAILED = 5; 942 943 // The instance was created successfully, but was rolled back and deleted 944 // due to some other failure during BatchCreateInstances operation. 945 ROLLED_BACK = 6; 946 } 947 948 // The current state of an instance involved in the batch create operation. 949 // Once the operation is complete, the final state of the instances in the 950 // LRO can be one of: 951 // 1. ACTIVE, indicating that instances were created successfully 952 // 2. FAILED, indicating that a particular instance failed creation 953 // 3. ROLLED_BACK indicating that although the instance was created 954 // successfully, it had to be rolled back and deleted due to failure in 955 // other steps of the workflow. 956 State state = 1; 957 958 // DEPRECATED - Use the error field instead. 959 // Error, if any error occurred and is available, during instance creation. 960 string error_msg = 2; 961 962 // The RPC status of the instance creation operation. This field will be 963 // present if an error happened during the instance creation. 964 google.rpc.Status error = 4; 965 966 Instance.InstanceType type = 3; 967} 968 969// Message for updating a Instance 970message UpdateInstanceRequest { 971 // Optional. Field mask is used to specify the fields to be overwritten in the 972 // Instance resource by the update. 973 // The fields specified in the update_mask are relative to the resource, not 974 // the full request. A field will be overwritten if it is in the mask. If the 975 // user does not provide a mask then all fields will be overwritten. 976 google.protobuf.FieldMask update_mask = 1 977 [(google.api.field_behavior) = OPTIONAL]; 978 979 // Required. The resource being updated 980 Instance instance = 2 [(google.api.field_behavior) = REQUIRED]; 981 982 // Optional. An optional request ID to identify requests. Specify a unique 983 // request ID so that if you must retry your request, the server will know to 984 // ignore the request if it has already been completed. The server will 985 // guarantee that for at least 60 minutes since the first request. 986 // 987 // For example, consider a situation where you make an initial request and 988 // the request times out. If you make the request again with the same request 989 // ID, the server can check if original operation with the same request ID 990 // was received, and if so, will ignore the second request. This prevents 991 // clients from accidentally creating duplicate commitments. 992 // 993 // The request ID must be a valid UUID with the exception that zero UUID is 994 // not supported (00000000-0000-0000-0000-000000000000). 995 string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; 996 997 // Optional. If set, performs request validation (e.g. permission checks and 998 // any other type of validation), but do not actually execute the update 999 // request. 1000 bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; 1001 1002 // Optional. If set to true, update succeeds even if instance is not found. In 1003 // that case, a new instance is created and `update_mask` is ignored. 1004 bool allow_missing = 5 [(google.api.field_behavior) = OPTIONAL]; 1005} 1006 1007// Message for deleting a Instance 1008message DeleteInstanceRequest { 1009 // Required. The name of the resource. For the required format, see the 1010 // comment on the Instance.name field. 1011 string name = 1 [ 1012 (google.api.field_behavior) = REQUIRED, 1013 (google.api.resource_reference) = { 1014 type: "alloydb.googleapis.com/Instance" 1015 } 1016 ]; 1017 1018 // Optional. An optional request ID to identify requests. Specify a unique 1019 // request ID so that if you must retry your request, the server will know to 1020 // ignore the request if it has already been completed. The server will 1021 // guarantee that for at least 60 minutes after the first request. 1022 // 1023 // For example, consider a situation where you make an initial request and 1024 // the request times out. If you make the request again with the same request 1025 // ID, the server can check if original operation with the same request ID 1026 // was received, and if so, will ignore the second request. This prevents 1027 // clients from accidentally creating duplicate commitments. 1028 // 1029 // The request ID must be a valid UUID with the exception that zero UUID is 1030 // not supported (00000000-0000-0000-0000-000000000000). 1031 string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; 1032 1033 // Optional. The current etag of the Instance. 1034 // If an etag is provided and does not match the current etag of the Instance, 1035 // deletion will be blocked and an ABORTED error will be returned. 1036 string etag = 3 [(google.api.field_behavior) = OPTIONAL]; 1037 1038 // Optional. If set, performs request validation (e.g. permission checks and 1039 // any other type of validation), but do not actually execute the delete. 1040 bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; 1041} 1042 1043// Message for triggering failover on an Instance 1044message FailoverInstanceRequest { 1045 // Required. The name of the resource. For the required format, see the 1046 // comment on the Instance.name field. 1047 string name = 1 [ 1048 (google.api.field_behavior) = REQUIRED, 1049 (google.api.resource_reference) = { 1050 type: "alloydb.googleapis.com/Instance" 1051 } 1052 ]; 1053 1054 // Optional. An optional request ID to identify requests. Specify a unique 1055 // request ID so that if you must retry your request, the server will know to 1056 // ignore the request if it has already been completed. The server will 1057 // guarantee that for at least 60 minutes after the first request. 1058 // 1059 // For example, consider a situation where you make an initial request and 1060 // the request times out. If you make the request again with the same request 1061 // ID, the server can check if original operation with the same request ID 1062 // was received, and if so, will ignore the second request. This prevents 1063 // clients from accidentally creating duplicate commitments. 1064 // 1065 // The request ID must be a valid UUID with the exception that zero UUID is 1066 // not supported (00000000-0000-0000-0000-000000000000). 1067 string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; 1068 1069 // Optional. If set, performs request validation (e.g. permission checks and 1070 // any other type of validation), but do not actually execute the failover. 1071 bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; 1072} 1073 1074// Message for triggering fault injection on an instance 1075message InjectFaultRequest { 1076 // FaultType contains all valid types of faults that can be injected to an 1077 // instance. 1078 enum FaultType { 1079 // The fault type is unknown. 1080 FAULT_TYPE_UNSPECIFIED = 0; 1081 1082 // Stop the VM 1083 STOP_VM = 1; 1084 } 1085 1086 // Required. The type of fault to be injected in an instance. 1087 FaultType fault_type = 1 [(google.api.field_behavior) = REQUIRED]; 1088 1089 // Required. The name of the resource. For the required format, see the 1090 // comment on the Instance.name field. 1091 string name = 2 [ 1092 (google.api.field_behavior) = REQUIRED, 1093 (google.api.resource_reference) = { 1094 type: "alloydb.googleapis.com/Instance" 1095 } 1096 ]; 1097 1098 // Optional. An optional request ID to identify requests. Specify a unique 1099 // request ID so that if you must retry your request, the server will know to 1100 // ignore the request if it has already been completed. The server will 1101 // guarantee that for at least 60 minutes after the first request. 1102 // 1103 // For example, consider a situation where you make an initial request and 1104 // the request times out. If you make the request again with the same request 1105 // ID, the server can check if original operation with the same request ID 1106 // was received, and if so, will ignore the second request. This prevents 1107 // clients from accidentally creating duplicate commitments. 1108 // 1109 // The request ID must be a valid UUID with the exception that zero UUID is 1110 // not supported (00000000-0000-0000-0000-000000000000). 1111 string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; 1112 1113 // Optional. If set, performs request validation (e.g. permission checks and 1114 // any other type of validation), but do not actually execute the fault 1115 // injection. 1116 bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; 1117} 1118 1119message RestartInstanceRequest { 1120 // Required. The name of the resource. For the required format, see the 1121 // comment on the Instance.name field. 1122 string name = 1 [ 1123 (google.api.field_behavior) = REQUIRED, 1124 (google.api.resource_reference) = { 1125 type: "alloydb.googleapis.com/Instance" 1126 } 1127 ]; 1128 1129 // Optional. An optional request ID to identify requests. Specify a unique 1130 // request ID so that if you must retry your request, the server will know to 1131 // ignore the request if it has already been completed. The server will 1132 // guarantee that for at least 60 minutes after the first request. 1133 // 1134 // For example, consider a situation where you make an initial request and 1135 // the request times out. If you make the request again with the same request 1136 // ID, the server can check if original operation with the same request ID 1137 // was received, and if so, will ignore the second request. This prevents 1138 // clients from accidentally creating duplicate commitments. 1139 // 1140 // The request ID must be a valid UUID with the exception that zero UUID is 1141 // not supported (00000000-0000-0000-0000-000000000000). 1142 string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; 1143 1144 // Optional. If set, performs request validation (e.g. permission checks and 1145 // any other type of validation), but do not actually execute the restart. 1146 bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; 1147} 1148 1149// Message for requesting list of Backups 1150message ListBackupsRequest { 1151 // Required. Parent value for ListBackupsRequest 1152 string parent = 1 [ 1153 (google.api.field_behavior) = REQUIRED, 1154 (google.api.resource_reference) = { 1155 child_type: "alloydb.googleapis.com/Backup" 1156 } 1157 ]; 1158 1159 // Requested page size. Server may return fewer items than requested. 1160 // If unspecified, server will pick an appropriate default. 1161 int32 page_size = 2; 1162 1163 // A token identifying a page of results the server should return. 1164 string page_token = 3; 1165 1166 // Filtering results 1167 string filter = 4; 1168 1169 // Hint for how to order the results 1170 string order_by = 5; 1171} 1172 1173// Message for response to listing Backups 1174message ListBackupsResponse { 1175 // The list of Backup 1176 repeated Backup backups = 1; 1177 1178 // A token identifying a page of results the server should return. 1179 string next_page_token = 2; 1180 1181 // Locations that could not be reached. 1182 repeated string unreachable = 3; 1183} 1184 1185// Message for getting a Backup 1186message GetBackupRequest { 1187 // Required. Name of the resource 1188 string name = 1 [ 1189 (google.api.field_behavior) = REQUIRED, 1190 (google.api.resource_reference) = { type: "alloydb.googleapis.com/Backup" } 1191 ]; 1192} 1193 1194// Message for creating a Backup 1195message CreateBackupRequest { 1196 // Required. Value for parent. 1197 string parent = 1 [ 1198 (google.api.field_behavior) = REQUIRED, 1199 (google.api.resource_reference) = { 1200 child_type: "alloydb.googleapis.com/Backup" 1201 } 1202 ]; 1203 1204 // Required. ID of the requesting object. 1205 string backup_id = 2 [(google.api.field_behavior) = REQUIRED]; 1206 1207 // Required. The resource being created 1208 Backup backup = 3 [(google.api.field_behavior) = REQUIRED]; 1209 1210 // Optional. An optional request ID to identify requests. Specify a unique 1211 // request ID so that if you must retry your request, the server will know to 1212 // ignore the request if it has already been completed. The server will 1213 // guarantee that for at least 60 minutes since the first request. 1214 // 1215 // For example, consider a situation where you make an initial request and 1216 // the request times out. If you make the request again with the same request 1217 // ID, the server can check if original operation with the same request ID 1218 // was received, and if so, will ignore the second request. This prevents 1219 // clients from accidentally creating duplicate commitments. 1220 // 1221 // The request ID must be a valid UUID with the exception that zero UUID is 1222 // not supported (00000000-0000-0000-0000-000000000000). 1223 string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; 1224 1225 // Optional. If set, the backend validates the request, but doesn't actually 1226 // execute it. 1227 bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; 1228} 1229 1230// Message for updating a Backup 1231message UpdateBackupRequest { 1232 // Optional. Field mask is used to specify the fields to be overwritten in the 1233 // Backup resource by the update. 1234 // The fields specified in the update_mask are relative to the resource, not 1235 // the full request. A field will be overwritten if it is in the mask. If the 1236 // user does not provide a mask then all fields will be overwritten. 1237 google.protobuf.FieldMask update_mask = 1 1238 [(google.api.field_behavior) = OPTIONAL]; 1239 1240 // Required. The resource being updated 1241 Backup backup = 2 [(google.api.field_behavior) = REQUIRED]; 1242 1243 // Optional. An optional request ID to identify requests. Specify a unique 1244 // request ID so that if you must retry your request, the server will know to 1245 // ignore the request if it has already been completed. The server will 1246 // guarantee that for at least 60 minutes since the first request. 1247 // 1248 // For example, consider a situation where you make an initial request and 1249 // the request times out. If you make the request again with the same request 1250 // ID, the server can check if original operation with the same request ID 1251 // was received, and if so, will ignore the second request. This prevents 1252 // clients from accidentally creating duplicate commitments. 1253 // 1254 // The request ID must be a valid UUID with the exception that zero UUID is 1255 // not supported (00000000-0000-0000-0000-000000000000). 1256 string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; 1257 1258 // Optional. If set, the backend validates the request, but doesn't actually 1259 // execute it. 1260 bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; 1261 1262 // Optional. If set to true, update succeeds even if instance is not found. In 1263 // that case, a new backup is created and `update_mask` is ignored. 1264 bool allow_missing = 5 [(google.api.field_behavior) = OPTIONAL]; 1265} 1266 1267// Message for deleting a Backup 1268message DeleteBackupRequest { 1269 // Required. Name of the resource. For the required format, see the comment on 1270 // the Backup.name field. 1271 string name = 1 [ 1272 (google.api.field_behavior) = REQUIRED, 1273 (google.api.resource_reference) = { type: "alloydb.googleapis.com/Backup" } 1274 ]; 1275 1276 // Optional. An optional request ID to identify requests. Specify a unique 1277 // request ID so that if you must retry your request, the server will know to 1278 // ignore the request if it has already been completed. The server will 1279 // guarantee that for at least 60 minutes after the first request. 1280 // 1281 // For example, consider a situation where you make an initial request and 1282 // the request times out. If you make the request again with the same request 1283 // ID, the server can check if original operation with the same request ID 1284 // was received, and if so, will ignore the second request. This prevents 1285 // clients from accidentally creating duplicate commitments. 1286 // 1287 // The request ID must be a valid UUID with the exception that zero UUID is 1288 // not supported (00000000-0000-0000-0000-000000000000). 1289 string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; 1290 1291 // Optional. If set, the backend validates the request, but doesn't actually 1292 // execute it. 1293 bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; 1294 1295 // Optional. The current etag of the Backup. 1296 // If an etag is provided and does not match the current etag of the Backup, 1297 // deletion will be blocked and an ABORTED error will be returned. 1298 string etag = 4 [(google.api.field_behavior) = OPTIONAL]; 1299} 1300 1301// Message for listing the information about the supported Database flags. 1302message ListSupportedDatabaseFlagsRequest { 1303 // Required. The name of the parent resource. The required format is: 1304 // * projects/{project}/locations/{location} 1305 // 1306 // Regardless of the parent specified here, as long it is contains a valid 1307 // project and location, the service will return a static list of supported 1308 // flags resources. Note that we do not yet support region-specific 1309 // flags. 1310 string parent = 1 [ 1311 (google.api.field_behavior) = REQUIRED, 1312 (google.api.resource_reference) = { 1313 child_type: "alloydb.googleapis.com/SupportedDatabaseFlag" 1314 } 1315 ]; 1316 1317 // Requested page size. Server may return fewer items than requested. 1318 // If unspecified, server will pick an appropriate default. 1319 int32 page_size = 2; 1320 1321 // A token identifying a page of results the server should return. 1322 string page_token = 3; 1323} 1324 1325// Message for response to listing SupportedDatabaseFlags. 1326message ListSupportedDatabaseFlagsResponse { 1327 // The list of SupportedDatabaseFlags. 1328 repeated SupportedDatabaseFlag supported_database_flags = 1; 1329 1330 // A token identifying a page of results the server should return. 1331 string next_page_token = 2; 1332} 1333 1334// Message for requests to generate a client certificate signed by the Cluster 1335// CA. 1336message GenerateClientCertificateRequest { 1337 // Required. The name of the parent resource. The required format is: 1338 // * projects/{project}/locations/{location}/clusters/{cluster} 1339 string parent = 1 [ 1340 (google.api.field_behavior) = REQUIRED, 1341 (google.api.resource_reference) = { type: "alloydb.googleapis.com/Cluster" } 1342 ]; 1343 1344 // Optional. An optional request ID to identify requests. Specify a unique 1345 // request ID so that if you must retry your request, the server will know to 1346 // ignore the request if it has already been completed. The server will 1347 // guarantee that for at least 60 minutes after the first request. 1348 // 1349 // For example, consider a situation where you make an initial request and 1350 // the request times out. If you make the request again with the same request 1351 // ID, the server can check if original operation with the same request ID 1352 // was received, and if so, will ignore the second request. This prevents 1353 // clients from accidentally creating duplicate commitments. 1354 // 1355 // The request ID must be a valid UUID with the exception that zero UUID is 1356 // not supported (00000000-0000-0000-0000-000000000000). 1357 string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; 1358 1359 // Optional. A pem-encoded X.509 certificate signing request (CSR). It is 1360 // recommended to use public_key instead. 1361 string pem_csr = 3 1362 [deprecated = true, (google.api.field_behavior) = OPTIONAL]; 1363 1364 // Optional. An optional hint to the endpoint to generate the client 1365 // certificate with the requested duration. The duration can be from 1 hour to 1366 // 24 hours. The endpoint may or may not honor the hint. If the hint is left 1367 // unspecified or is not honored, then the endpoint will pick an appropriate 1368 // default duration. 1369 google.protobuf.Duration cert_duration = 4 1370 [(google.api.field_behavior) = OPTIONAL]; 1371 1372 // Optional. The public key from the client. 1373 string public_key = 5 [(google.api.field_behavior) = OPTIONAL]; 1374 1375 // Optional. An optional hint to the endpoint to generate a client 1376 // ceritificate that can be used by AlloyDB connectors to exchange additional 1377 // metadata with the server after TLS handshake. 1378 bool use_metadata_exchange = 6 [(google.api.field_behavior) = OPTIONAL]; 1379} 1380 1381// Message returned by a GenerateClientCertificate operation. 1382message GenerateClientCertificateResponse { 1383 // Output only. The pem-encoded, signed X.509 certificate. 1384 string pem_certificate = 1 1385 [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; 1386 1387 // Output only. The pem-encoded chain that may be used to verify the X.509 1388 // certificate. Expected to be in issuer-to-root order according to RFC 5246. 1389 repeated string pem_certificate_chain = 2 1390 [(google.api.field_behavior) = OUTPUT_ONLY]; 1391 1392 // Optional. The pem-encoded cluster ca X.509 certificate. 1393 string ca_cert = 3 [(google.api.field_behavior) = OPTIONAL]; 1394} 1395 1396// Request message for GetConnectionInfo. 1397message GetConnectionInfoRequest { 1398 // Required. The name of the parent resource. The required format is: 1399 // projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance} 1400 string parent = 1 [ 1401 (google.api.field_behavior) = REQUIRED, 1402 (google.api.resource_reference) = { 1403 type: "alloydb.googleapis.com/Instance" 1404 } 1405 ]; 1406 1407 // Optional. An optional request ID to identify requests. Specify a unique 1408 // request ID so that if you must retry your request, the server will know to 1409 // ignore the request if it has already been completed. The server will 1410 // guarantee that for at least 60 minutes after the first request. 1411 // 1412 // For example, consider a situation where you make an initial request and 1413 // the request times out. If you make the request again with the same request 1414 // ID, the server can check if original operation with the same request ID 1415 // was received, and if so, will ignore the second request. This prevents 1416 // clients from accidentally creating duplicate commitments. 1417 // 1418 // The request ID must be a valid UUID with the exception that zero UUID is 1419 // not supported (00000000-0000-0000-0000-000000000000). 1420 string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; 1421} 1422 1423// Represents the metadata of the long-running operation. 1424message OperationMetadata { 1425 // Request specific metadata, if any. 1426 oneof request_specific { 1427 // Output only. BatchCreateInstances related metadata. 1428 BatchCreateInstancesMetadata batch_create_instances_metadata = 8 1429 [(google.api.field_behavior) = OUTPUT_ONLY]; 1430 } 1431 1432 // Output only. The time the operation was created. 1433 google.protobuf.Timestamp create_time = 1 1434 [(google.api.field_behavior) = OUTPUT_ONLY]; 1435 1436 // Output only. The time the operation finished running. 1437 google.protobuf.Timestamp end_time = 2 1438 [(google.api.field_behavior) = OUTPUT_ONLY]; 1439 1440 // Output only. Server-defined resource path for the target of the operation. 1441 string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 1442 1443 // Output only. Name of the verb executed by the operation. 1444 string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 1445 1446 // Output only. Human-readable status of the operation, if any. 1447 string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 1448 1449 // Output only. Identifies whether the user has requested cancellation 1450 // of the operation. Operations that have successfully been cancelled 1451 // have [Operation.error][] value with a 1452 // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to 1453 // `Code.CANCELLED`. 1454 bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; 1455 1456 // Output only. API version used to start the operation. 1457 string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; 1458} 1459 1460// Message for requesting list of Users 1461message ListUsersRequest { 1462 // Required. Parent value for ListUsersRequest 1463 string parent = 1 [ 1464 (google.api.field_behavior) = REQUIRED, 1465 (google.api.resource_reference) = { 1466 child_type: "alloydb.googleapis.com/User" 1467 } 1468 ]; 1469 1470 // Optional. Requested page size. Server may return fewer items than 1471 // requested. If unspecified, server will pick an appropriate default. 1472 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 1473 1474 // Optional. A token identifying a page of results the server should return. 1475 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 1476 1477 // Optional. Filtering results 1478 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 1479 1480 // Optional. Hint for how to order the results 1481 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 1482} 1483 1484// Message for response to listing Users 1485message ListUsersResponse { 1486 // The list of User 1487 repeated User users = 1; 1488 1489 // A token identifying a page of results the server should return. 1490 string next_page_token = 2; 1491 1492 // Locations that could not be reached. 1493 repeated string unreachable = 3; 1494} 1495 1496// Message for getting a User 1497message GetUserRequest { 1498 // Required. The name of the resource. For the required format, see the 1499 // comment on the User.name field. 1500 string name = 1 [ 1501 (google.api.field_behavior) = REQUIRED, 1502 (google.api.resource_reference) = { type: "alloydb.googleapis.com/User" } 1503 ]; 1504} 1505 1506// Message for creating a User 1507message CreateUserRequest { 1508 // Required. Value for parent. 1509 string parent = 1 [ 1510 (google.api.field_behavior) = REQUIRED, 1511 (google.api.resource_reference) = { 1512 child_type: "alloydb.googleapis.com/User" 1513 } 1514 ]; 1515 1516 // Required. ID of the requesting object. 1517 string user_id = 2 [(google.api.field_behavior) = REQUIRED]; 1518 1519 // Required. The resource being created 1520 User user = 3 [(google.api.field_behavior) = REQUIRED]; 1521 1522 // Optional. An optional request ID to identify requests. Specify a unique 1523 // request ID so that if you must retry your request, the server will know to 1524 // ignore the request if it has already been completed. The server will 1525 // guarantee that for at least 60 minutes since the first request. 1526 // 1527 // For example, consider a situation where you make an initial request and 1528 // the request times out. If you make the request again with the same request 1529 // ID, the server can check if original operation with the same request ID 1530 // was received, and if so, will ignore the second request. This prevents 1531 // clients from accidentally creating duplicate commitments. 1532 // 1533 // The request ID must be a valid UUID with the exception that zero UUID is 1534 // not supported (00000000-0000-0000-0000-000000000000). 1535 string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; 1536 1537 // Optional. If set, the backend validates the request, but doesn't actually 1538 // execute it. 1539 bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; 1540} 1541 1542// Message for updating a User 1543message UpdateUserRequest { 1544 // Optional. Field mask is used to specify the fields to be overwritten in the 1545 // User resource by the update. 1546 // The fields specified in the update_mask are relative to the resource, not 1547 // the full request. A field will be overwritten if it is in the mask. If the 1548 // user does not provide a mask then all fields will be overwritten. 1549 google.protobuf.FieldMask update_mask = 1 1550 [(google.api.field_behavior) = OPTIONAL]; 1551 1552 // Required. The resource being updated 1553 User user = 2 [(google.api.field_behavior) = REQUIRED]; 1554 1555 // Optional. An optional request ID to identify requests. Specify a unique 1556 // request ID so that if you must retry your request, the server will know to 1557 // ignore the request if it has already been completed. The server will 1558 // guarantee that for at least 60 minutes since the first request. 1559 // 1560 // For example, consider a situation where you make an initial request and 1561 // the request times out. If you make the request again with the same request 1562 // ID, the server can check if original operation with the same request ID 1563 // was received, and if so, will ignore the second request. This prevents 1564 // clients from accidentally creating duplicate commitments. 1565 // 1566 // The request ID must be a valid UUID with the exception that zero UUID is 1567 // not supported (00000000-0000-0000-0000-000000000000). 1568 string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; 1569 1570 // Optional. If set, the backend validates the request, but doesn't actually 1571 // execute it. 1572 bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; 1573 1574 // Optional. Allow missing fields in the update mask. 1575 bool allow_missing = 5 [(google.api.field_behavior) = OPTIONAL]; 1576} 1577 1578// Message for deleting a User 1579message DeleteUserRequest { 1580 // Required. The name of the resource. For the required format, see the 1581 // comment on the User.name field. 1582 string name = 1 [ 1583 (google.api.field_behavior) = REQUIRED, 1584 (google.api.resource_reference) = { type: "alloydb.googleapis.com/User" } 1585 ]; 1586 1587 // Optional. An optional request ID to identify requests. Specify a unique 1588 // request ID so that if you must retry your request, the server will know to 1589 // ignore the request if it has already been completed. The server will 1590 // guarantee that for at least 60 minutes after the first request. 1591 // 1592 // For example, consider a situation where you make an initial request and 1593 // the request times out. If you make the request again with the same request 1594 // ID, the server can check if original operation with the same request ID 1595 // was received, and if so, will ignore the second request. This prevents 1596 // clients from accidentally creating duplicate commitments. 1597 // 1598 // The request ID must be a valid UUID with the exception that zero UUID is 1599 // not supported (00000000-0000-0000-0000-000000000000). 1600 string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; 1601 1602 // Optional. If set, the backend validates the request, but doesn't actually 1603 // execute it. 1604 bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; 1605} 1606 1607// Message for requesting list of Databases. 1608message ListDatabasesRequest { 1609 // Required. Parent value for ListDatabasesRequest. 1610 string parent = 1 [ 1611 (google.api.field_behavior) = REQUIRED, 1612 (google.api.resource_reference) = { 1613 child_type: "alloydb.googleapis.com/Database" 1614 } 1615 ]; 1616 1617 // Optional. The maximum number of databases to return. The service may return 1618 // fewer than this value. If unspecified, an appropriate number of databases 1619 // will be returned. The max value will be 2000, values above max will be 1620 // coerced to max. 1621 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 1622 1623 // Optional. A page token, received from a previous `ListDatabases` call. 1624 // This should be provided to retrieve the subsequent page. 1625 // This field is currently not supported, its value will be ignored if passed. 1626 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 1627 1628 // Optional. Filtering results. 1629 // This field is currently not supported, its value will be ignored if passed. 1630 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 1631} 1632 1633// Message for response to listing Databases. 1634message ListDatabasesResponse { 1635 // The list of databases 1636 repeated Database databases = 1; 1637 1638 // A token identifying the next page of results the server should return. 1639 // If this field is omitted, there are no subsequent pages. 1640 string next_page_token = 2; 1641} 1642