xref: /aosp_15_r20/external/googleapis/google/cloud/alloydb/v1/service.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
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.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/cloud/alloydb/v1/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.V1";
32option go_package = "cloud.google.com/go/alloydb/apiv1/alloydbpb;alloydbpb";
33option java_multiple_files = true;
34option java_outer_classname = "ServiceProto";
35option java_package = "com.google.cloud.alloydb.v1";
36option php_namespace = "Google\\Cloud\\AlloyDb\\V1";
37option ruby_package = "Google::Cloud::AlloyDB::V1";
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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{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: "/v1/{name=projects/*/locations/*/clusters/*/users/*}"
410    };
411    option (google.api.method_signature) = "name";
412  }
413}
414
415// Message for requesting list of Clusters
416message ListClustersRequest {
417  // Required. The name of the parent resource. For the required format, see the
418  // comment on the Cluster.name field. Additionally, you can perform an
419  // aggregated list operation by specifying a value with the following format:
420  //  * projects/{project}/locations/-
421  string parent = 1 [
422    (google.api.field_behavior) = REQUIRED,
423    (google.api.resource_reference) = {
424      child_type: "alloydb.googleapis.com/Cluster"
425    }
426  ];
427
428  // Optional. Requested page size. Server may return fewer items than
429  // requested. If unspecified, server will pick an appropriate default.
430  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
431
432  // A token identifying a page of results the server should return.
433  string page_token = 3;
434
435  // Optional. Filtering results
436  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
437
438  // Optional. Hint for how to order the results
439  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
440}
441
442// Message for response to listing Clusters
443message ListClustersResponse {
444  // The list of Cluster
445  repeated Cluster clusters = 1;
446
447  // A token identifying a page of results the server should return.
448  string next_page_token = 2;
449
450  // Locations that could not be reached.
451  repeated string unreachable = 3;
452}
453
454// Message for getting a Cluster
455message GetClusterRequest {
456  // Required. The name of the resource. For the required format, see the
457  // comment on the Cluster.name field.
458  string name = 1 [
459    (google.api.field_behavior) = REQUIRED,
460    (google.api.resource_reference) = { type: "alloydb.googleapis.com/Cluster" }
461  ];
462
463  // Optional. The view of the cluster to return. Returns all default fields if
464  // not set.
465  ClusterView view = 2 [(google.api.field_behavior) = OPTIONAL];
466}
467
468message CreateSecondaryClusterRequest {
469  // Required. The location of the new cluster. For the required
470  // format, see the comment on the Cluster.name field.
471  string parent = 1 [
472    (google.api.field_behavior) = REQUIRED,
473    (google.api.resource_reference) = {
474      child_type: "alloydb.googleapis.com/Cluster"
475    }
476  ];
477
478  // Required. ID of the requesting object (the secondary cluster).
479  string cluster_id = 2 [(google.api.field_behavior) = REQUIRED];
480
481  // Required. Configuration of the requesting object (the secondary cluster).
482  Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED];
483
484  // Optional. An optional request ID to identify requests. Specify a unique
485  // request ID so that if you must retry your request, the server will know to
486  // ignore the request if it has already been completed. The server will
487  // guarantee that for at least 60 minutes since the first request.
488  //
489  // For example, consider a situation where you make an initial request and
490  // the request times out. If you make the request again with the same request
491  // ID, the server can check if original operation with the same request ID
492  // was received, and if so, will ignore the second request. This prevents
493  // clients from accidentally creating duplicate commitments.
494  //
495  // The request ID must be a valid UUID with the exception that zero UUID is
496  // not supported (00000000-0000-0000-0000-000000000000).
497  string request_id = 5 [(google.api.field_behavior) = OPTIONAL];
498
499  // Optional. If set, performs request validation (e.g. permission checks and
500  // any other type of validation), but do not actually execute the create
501  // request.
502  bool validate_only = 6 [(google.api.field_behavior) = OPTIONAL];
503}
504
505// Message for creating a Cluster
506message CreateClusterRequest {
507  // Required. The location of the new cluster. For the required format, see the
508  // comment on the Cluster.name field.
509  string parent = 1 [
510    (google.api.field_behavior) = REQUIRED,
511    (google.api.resource_reference) = {
512      child_type: "alloydb.googleapis.com/Cluster"
513    }
514  ];
515
516  // Required. ID of the requesting object.
517  string cluster_id = 2 [(google.api.field_behavior) = REQUIRED];
518
519  // Required. The resource being created
520  Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED];
521
522  // Optional. An optional request ID to identify requests. Specify a unique
523  // request ID so that if you must retry your request, the server will know to
524  // ignore the request if it has already been completed. The server will
525  // guarantee that for at least 60 minutes since the first request.
526  //
527  // For example, consider a situation where you make an initial request and
528  // the request times out. If you make the request again with the same request
529  // ID, the server can check if original operation with the same request ID
530  // was received, and if so, will ignore the second request. This prevents
531  // clients from accidentally creating duplicate commitments.
532  //
533  // The request ID must be a valid UUID with the exception that zero UUID is
534  // not supported (00000000-0000-0000-0000-000000000000).
535  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
536
537  // Optional. If set, performs request validation (e.g. permission checks and
538  // any other type of validation), but do not actually execute the create
539  // request.
540  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
541}
542
543// Message for updating a Cluster
544message UpdateClusterRequest {
545  // Optional. Field mask is used to specify the fields to be overwritten in the
546  // Cluster resource by the update.
547  // The fields specified in the update_mask are relative to the resource, not
548  // the full request. A field will be overwritten if it is in the mask. If the
549  // user does not provide a mask then all fields will be overwritten.
550  google.protobuf.FieldMask update_mask = 1
551      [(google.api.field_behavior) = OPTIONAL];
552
553  // Required. The resource being updated
554  Cluster cluster = 2 [(google.api.field_behavior) = REQUIRED];
555
556  // Optional. An optional request ID to identify requests. Specify a unique
557  // request ID so that if you must retry your request, the server will know to
558  // ignore the request if it has already been completed. The server will
559  // guarantee that for at least 60 minutes since the first request.
560  //
561  // For example, consider a situation where you make an initial request and
562  // the request times out. If you make the request again with the same request
563  // ID, the server can check if original operation with the same request ID
564  // was received, and if so, will ignore the second request. This prevents
565  // clients from accidentally creating duplicate commitments.
566  //
567  // The request ID must be a valid UUID with the exception that zero UUID is
568  // not supported (00000000-0000-0000-0000-000000000000).
569  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
570
571  // Optional. If set, performs request validation (e.g. permission checks and
572  // any other type of validation), but do not actually execute the update
573  // request.
574  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
575
576  // Optional. If set to true, update succeeds even if cluster is not found. In
577  // that case, a new cluster is created and `update_mask` is ignored.
578  bool allow_missing = 5 [(google.api.field_behavior) = OPTIONAL];
579}
580
581// Message for deleting a Cluster
582message DeleteClusterRequest {
583  // Required. The name of the resource. For the required format, see the
584  // comment on the Cluster.name field.
585  string name = 1 [
586    (google.api.field_behavior) = REQUIRED,
587    (google.api.resource_reference) = { type: "alloydb.googleapis.com/Cluster" }
588  ];
589
590  // Optional. An optional request ID to identify requests. Specify a unique
591  // request ID so that if you must retry your request, the server will know to
592  // ignore the request if it has already been completed. The server will
593  // guarantee that for at least 60 minutes after the first request.
594  //
595  // For example, consider a situation where you make an initial request and
596  // the request times out. If you make the request again with the same request
597  // ID, the server can check if original operation with the same request ID
598  // was received, and if so, will ignore the second request. This prevents
599  // clients from accidentally creating duplicate commitments.
600  //
601  // The request ID must be a valid UUID with the exception that zero UUID is
602  // not supported (00000000-0000-0000-0000-000000000000).
603  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
604
605  // Optional. The current etag of the Cluster.
606  // If an etag is provided and does not match the current etag of the Cluster,
607  // deletion will be blocked and an ABORTED error will be returned.
608  string etag = 3 [(google.api.field_behavior) = OPTIONAL];
609
610  // Optional. If set, performs request validation (e.g. permission checks and
611  // any other type of validation), but do not actually execute the delete.
612  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
613
614  // Optional. Whether to cascade delete child instances for given cluster.
615  bool force = 5 [(google.api.field_behavior) = OPTIONAL];
616}
617
618// Message for promoting a Cluster
619message PromoteClusterRequest {
620  // Required. The name of the resource. For the required format, see the
621  // comment on the Cluster.name field
622  string name = 1 [
623    (google.api.field_behavior) = REQUIRED,
624    (google.api.resource_reference) = { type: "alloydb.googleapis.com/Cluster" }
625  ];
626
627  // Optional. An optional request ID to identify requests. Specify a unique
628  // request ID so that if you must retry your request, the server will know to
629  // ignore the request if it has already been completed. The server will
630  // guarantee that for at least 60 minutes after the first request.
631  //
632  // For example, consider a situation where you make an initial request and
633  // the request times out. If you make the request again with the same request
634  // ID, the server can check if original operation with the same request ID
635  // was received, and if so, will ignore the second request. This prevents
636  // clients from accidentally creating duplicate commitments.
637  //
638  // The request ID must be a valid UUID with the exception that zero UUID is
639  // not supported (00000000-0000-0000-0000-000000000000).
640  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
641
642  // Optional. The current etag of the Cluster.
643  // If an etag is provided and does not match the current etag of the Cluster,
644  // deletion will be blocked and an ABORTED error will be returned.
645  string etag = 3 [(google.api.field_behavior) = OPTIONAL];
646
647  // Optional. If set, performs request validation (e.g. permission checks and
648  // any other type of validation), but do not actually execute the delete.
649  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
650}
651
652// Message for restoring a Cluster from a backup or another cluster at a given
653// point in time.
654message RestoreClusterRequest {
655  // Required.
656  // The source to import from.
657  oneof source {
658    // Backup source.
659    BackupSource backup_source = 4;
660
661    // ContinuousBackup source. Continuous backup needs to be enabled in the
662    // source cluster for this operation to succeed.
663    ContinuousBackupSource continuous_backup_source = 8;
664  }
665
666  // Required. The name of the parent resource. For the required format, see the
667  // comment on the Cluster.name field.
668  string parent = 1 [
669    (google.api.field_behavior) = REQUIRED,
670    (google.api.resource_reference) = {
671      child_type: "alloydb.googleapis.com/Cluster"
672    }
673  ];
674
675  // Required. ID of the requesting object.
676  string cluster_id = 2 [(google.api.field_behavior) = REQUIRED];
677
678  // Required. The resource being created
679  Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED];
680
681  // Optional. An optional request ID to identify requests. Specify a unique
682  // request ID so that if you must retry your request, the server will know to
683  // ignore the request if it has already been completed. The server will
684  // guarantee that for at least 60 minutes since the first request.
685  //
686  // For example, consider a situation where you make an initial request and
687  // the request times out. If you make the request again with the same request
688  // ID, the server can check if original operation with the same request ID
689  // was received, and if so, will ignore the second request. This prevents
690  // clients from accidentally creating duplicate commitments.
691  //
692  // The request ID must be a valid UUID with the exception that zero UUID is
693  // not supported (00000000-0000-0000-0000-000000000000).
694  string request_id = 5 [(google.api.field_behavior) = OPTIONAL];
695
696  // Optional. If set, performs request validation (e.g. permission checks and
697  // any other type of validation), but do not actually execute the import
698  // request.
699  bool validate_only = 6 [(google.api.field_behavior) = OPTIONAL];
700}
701
702// Message for requesting list of Instances
703message ListInstancesRequest {
704  // Required. The name of the parent resource. For the required format, see the
705  // comment on the Instance.name field. Additionally, you can perform an
706  // aggregated list operation by specifying a value with one of the following
707  // formats:
708  //  * projects/{project}/locations/-/clusters/-
709  //  * projects/{project}/locations/{region}/clusters/-
710  string parent = 1 [
711    (google.api.field_behavior) = REQUIRED,
712    (google.api.resource_reference) = {
713      child_type: "alloydb.googleapis.com/Instance"
714    }
715  ];
716
717  // Optional. Requested page size. Server may return fewer items than
718  // requested. If unspecified, server will pick an appropriate default.
719  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
720
721  // A token identifying a page of results the server should return.
722  string page_token = 3;
723
724  // Optional. Filtering results
725  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
726
727  // Optional. Hint for how to order the results
728  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
729}
730
731// Message for response to listing Instances
732message ListInstancesResponse {
733  // The list of Instance
734  repeated Instance instances = 1;
735
736  // A token identifying a page of results the server should return.
737  string next_page_token = 2;
738
739  // Locations that could not be reached.
740  repeated string unreachable = 3;
741}
742
743// Message for getting a Instance
744message GetInstanceRequest {
745  // Required. The name of the resource. For the required format, see the
746  // comment on the Instance.name field.
747  string name = 1 [
748    (google.api.field_behavior) = REQUIRED,
749    (google.api.resource_reference) = {
750      type: "alloydb.googleapis.com/Instance"
751    }
752  ];
753
754  // The view of the instance to return.
755  InstanceView view = 2;
756}
757
758// Message for creating a Instance
759message CreateInstanceRequest {
760  // Required. The name of the parent resource. For the required format, see the
761  // comment on the Instance.name field.
762  string parent = 1 [
763    (google.api.field_behavior) = REQUIRED,
764    (google.api.resource_reference) = {
765      child_type: "alloydb.googleapis.com/Instance"
766    }
767  ];
768
769  // Required. ID of the requesting object.
770  string instance_id = 2 [(google.api.field_behavior) = REQUIRED];
771
772  // Required. The resource being created
773  Instance instance = 3 [(google.api.field_behavior) = REQUIRED];
774
775  // Optional. An optional request ID to identify requests. Specify a unique
776  // request ID so that if you must retry your request, the server will know to
777  // ignore the request if it has already been completed. The server will
778  // guarantee that for at least 60 minutes since the first request.
779  //
780  // For example, consider a situation where you make an initial request and
781  // the request times out. If you make the request again with the same request
782  // ID, the server can check if original operation with the same request ID
783  // was received, and if so, will ignore the second request. This prevents
784  // clients from accidentally creating duplicate commitments.
785  //
786  // The request ID must be a valid UUID with the exception that zero UUID is
787  // not supported (00000000-0000-0000-0000-000000000000).
788  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
789
790  // Optional. If set, performs request validation (e.g. permission checks and
791  // any other type of validation), but do not actually execute the create
792  // request.
793  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
794}
795
796// Message for creating a Secondary Instance
797message CreateSecondaryInstanceRequest {
798  // Required. The name of the parent resource. For the required format, see the
799  // comment on the Instance.name field.
800  string parent = 1 [
801    (google.api.field_behavior) = REQUIRED,
802    (google.api.resource_reference) = {
803      child_type: "alloydb.googleapis.com/Instance"
804    }
805  ];
806
807  // Required. ID of the requesting object.
808  string instance_id = 2 [(google.api.field_behavior) = REQUIRED];
809
810  // Required. The resource being created
811  Instance instance = 3 [(google.api.field_behavior) = REQUIRED];
812
813  // Optional. An optional request ID to identify requests. Specify a unique
814  // request ID so that if you must retry your request, the server will know to
815  // ignore the request if it has already been completed. The server will
816  // guarantee that for at least 60 minutes since the first request.
817  //
818  // For example, consider a situation where you make an initial request and
819  // the request times out. If you make the request again with the same request
820  // ID, the server can check if original operation with the same request ID
821  // was received, and if so, will ignore the second request. This prevents
822  // clients from accidentally creating duplicate commitments.
823  //
824  // The request ID must be a valid UUID with the exception that zero UUID is
825  // not supported (00000000-0000-0000-0000-000000000000).
826  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
827
828  // Optional. If set, performs request validation (e.g. permission checks and
829  // any other type of validation), but do not actually execute the create
830  // request.
831  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
832}
833
834// See usage below for notes.
835message CreateInstanceRequests {
836  // Required. Primary and read replica instances to be created. This list
837  // should not be empty.
838  repeated CreateInstanceRequest create_instance_requests = 1
839      [(google.api.field_behavior) = REQUIRED];
840}
841
842// Message for creating a batch of instances under the specified cluster.
843message BatchCreateInstancesRequest {
844  // Required. The name of the parent resource.
845  string parent = 1 [
846    (google.api.field_behavior) = REQUIRED,
847    (google.api.resource_reference) = {
848      child_type: "alloydb.googleapis.com/Instance"
849    }
850  ];
851
852  // Required. Resources being created.
853  CreateInstanceRequests requests = 2 [(google.api.field_behavior) = REQUIRED];
854
855  // Optional. An optional request ID to identify requests. Specify a unique
856  // request ID so that if you must retry your request, the server will know to
857  // ignore the request if it has already been completed. The server will
858  // guarantee that for at least 60 minutes since the first request.
859  //
860  // For example, consider a situation where you make an initial request and
861  // the request times out. If you make the request again with the same request
862  // ID, the server can check if original operation with the same request ID
863  // was received, and if so, will ignore the second request. This prevents
864  // clients from accidentally creating duplicate commitments.
865  //
866  // The request ID must be a valid UUID with the exception that zero UUID is
867  // not supported (00000000-0000-0000-0000-000000000000).
868  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
869}
870
871// Message for creating batches of instances in a cluster.
872message BatchCreateInstancesResponse {
873  // Created instances.
874  repeated Instance instances = 1;
875}
876
877// Message for metadata that is specific to BatchCreateInstances API.
878// NEXT_ID: 3
879message BatchCreateInstancesMetadata {
880  // The instances being created in the API call. Each string in this list
881  // is the server defined resource path for target instances in the request
882  // and for the format of each string, see the comment on the Instance.name
883  // field.
884  repeated string instance_targets = 1;
885
886  // A map representing state of the instances involved in the
887  // BatchCreateInstances operation during the operation execution.
888  // The instance state will be in STATE_UNSPECIFIED state if the instance has
889  // not yet been picked up for processing.
890  // The key of the map is the name of the instance resource.
891  // For the format, see the comment on the Instance.name field.
892  map<string, BatchCreateInstanceStatus> instance_statuses = 2;
893}
894
895// Message for current status of an instance in the BatchCreateInstances
896// operation.
897// For example, lets say a BatchCreateInstances workflow has 4 instances,
898// Instance1 through Instance4. Lets also assume that 2 instances succeeded
899// but the third failed to create and the 4th was never picked up for creation
900// because of failure of the previous one. Then, resulting states would look
901// something like:
902//   1. Instance1 = ROLLED_BACK
903//   2. Instance2 = ROLLED_BACK
904//   3. Instance3 = FAILED
905//   4. Instance4 = FAILED
906//
907// However, while the operation is running, the instance might be in other
908// states including PENDING_CREATE, ACTIVE, DELETING and CREATING. The states
909// / do not get further updated once the operation is done.
910message BatchCreateInstanceStatus {
911  // State contains all valid instance states for the BatchCreateInstances
912  // operation. This is mainly used for status reporting through the LRO
913  // metadata.
914  enum State {
915    // The state of the instance is unknown.
916    STATE_UNSPECIFIED = 0;
917
918    // Instance is pending creation and has not yet been picked up for
919    // processsing in the backend.
920    PENDING_CREATE = 1;
921
922    // The instance is active and running.
923    READY = 2;
924
925    // The instance is being created.
926    CREATING = 3;
927
928    // The instance is being deleted.
929    DELETING = 4;
930
931    // The creation of the instance failed or a fatal error occurred during
932    // an operation on the instance or a batch of instances.
933    FAILED = 5;
934
935    // The instance was created successfully, but was rolled back and deleted
936    // due to some other failure during BatchCreateInstances operation.
937    ROLLED_BACK = 6;
938  }
939
940  // The current state of an instance involved in the batch create operation.
941  // Once the operation is complete, the final state of the instances in the
942  // LRO can be one of:
943  //   1. ACTIVE, indicating that instances were created successfully
944  //   2. FAILED, indicating that a particular instance failed creation
945  //   3. ROLLED_BACK indicating that although the instance was created
946  //      successfully, it had to be rolled back and deleted due to failure in
947  //      other steps of the workflow.
948  State state = 1;
949
950  // DEPRECATED - Use the error field instead.
951  // Error, if any error occurred and is available, during instance creation.
952  string error_msg = 2;
953
954  // The RPC status of the instance creation operation. This field will be
955  // present if an error happened during the instance creation.
956  google.rpc.Status error = 4;
957
958  Instance.InstanceType type = 3;
959}
960
961// Message for updating a Instance
962message UpdateInstanceRequest {
963  // Optional. Field mask is used to specify the fields to be overwritten in the
964  // Instance resource by the update.
965  // The fields specified in the update_mask are relative to the resource, not
966  // the full request. A field will be overwritten if it is in the mask. If the
967  // user does not provide a mask then all fields will be overwritten.
968  google.protobuf.FieldMask update_mask = 1
969      [(google.api.field_behavior) = OPTIONAL];
970
971  // Required. The resource being updated
972  Instance instance = 2 [(google.api.field_behavior) = REQUIRED];
973
974  // Optional. An optional request ID to identify requests. Specify a unique
975  // request ID so that if you must retry your request, the server will know to
976  // ignore the request if it has already been completed. The server will
977  // guarantee that for at least 60 minutes since the first request.
978  //
979  // For example, consider a situation where you make an initial request and
980  // the request times out. If you make the request again with the same request
981  // ID, the server can check if original operation with the same request ID
982  // was received, and if so, will ignore the second request. This prevents
983  // clients from accidentally creating duplicate commitments.
984  //
985  // The request ID must be a valid UUID with the exception that zero UUID is
986  // not supported (00000000-0000-0000-0000-000000000000).
987  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
988
989  // Optional. If set, performs request validation (e.g. permission checks and
990  // any other type of validation), but do not actually execute the update
991  // request.
992  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
993
994  // Optional. If set to true, update succeeds even if instance is not found. In
995  // that case, a new instance is created and `update_mask` is ignored.
996  bool allow_missing = 5 [(google.api.field_behavior) = OPTIONAL];
997}
998
999// Message for deleting a Instance
1000message DeleteInstanceRequest {
1001  // Required. The name of the resource. For the required format, see the
1002  // comment on the Instance.name field.
1003  string name = 1 [
1004    (google.api.field_behavior) = REQUIRED,
1005    (google.api.resource_reference) = {
1006      type: "alloydb.googleapis.com/Instance"
1007    }
1008  ];
1009
1010  // Optional. An optional request ID to identify requests. Specify a unique
1011  // request ID so that if you must retry your request, the server will know to
1012  // ignore the request if it has already been completed. The server will
1013  // guarantee that for at least 60 minutes after the first request.
1014  //
1015  // For example, consider a situation where you make an initial request and
1016  // the request times out. If you make the request again with the same request
1017  // ID, the server can check if original operation with the same request ID
1018  // was received, and if so, will ignore the second request. This prevents
1019  // clients from accidentally creating duplicate commitments.
1020  //
1021  // The request ID must be a valid UUID with the exception that zero UUID is
1022  // not supported (00000000-0000-0000-0000-000000000000).
1023  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
1024
1025  // Optional. The current etag of the Instance.
1026  // If an etag is provided and does not match the current etag of the Instance,
1027  // deletion will be blocked and an ABORTED error will be returned.
1028  string etag = 3 [(google.api.field_behavior) = OPTIONAL];
1029
1030  // Optional. If set, performs request validation (e.g. permission checks and
1031  // any other type of validation), but do not actually execute the delete.
1032  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
1033}
1034
1035// Message for triggering failover on an Instance
1036message FailoverInstanceRequest {
1037  // Required. The name of the resource. For the required format, see the
1038  // comment on the Instance.name field.
1039  string name = 1 [
1040    (google.api.field_behavior) = REQUIRED,
1041    (google.api.resource_reference) = {
1042      type: "alloydb.googleapis.com/Instance"
1043    }
1044  ];
1045
1046  // Optional. An optional request ID to identify requests. Specify a unique
1047  // request ID so that if you must retry your request, the server will know to
1048  // ignore the request if it has already been completed. The server will
1049  // guarantee that for at least 60 minutes after the first request.
1050  //
1051  // For example, consider a situation where you make an initial request and
1052  // the request times out. If you make the request again with the same request
1053  // ID, the server can check if original operation with the same request ID
1054  // was received, and if so, will ignore the second request. This prevents
1055  // clients from accidentally creating duplicate commitments.
1056  //
1057  // The request ID must be a valid UUID with the exception that zero UUID is
1058  // not supported (00000000-0000-0000-0000-000000000000).
1059  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
1060
1061  // Optional. If set, performs request validation (e.g. permission checks and
1062  // any other type of validation), but do not actually execute the failover.
1063  bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL];
1064}
1065
1066// Message for triggering fault injection on an instance
1067message InjectFaultRequest {
1068  // FaultType contains all valid types of faults that can be injected to an
1069  // instance.
1070  enum FaultType {
1071    // The fault type is unknown.
1072    FAULT_TYPE_UNSPECIFIED = 0;
1073
1074    // Stop the VM
1075    STOP_VM = 1;
1076  }
1077
1078  // Required. The type of fault to be injected in an instance.
1079  FaultType fault_type = 1 [(google.api.field_behavior) = REQUIRED];
1080
1081  // Required. The name of the resource. For the required format, see the
1082  // comment on the Instance.name field.
1083  string name = 2 [
1084    (google.api.field_behavior) = REQUIRED,
1085    (google.api.resource_reference) = {
1086      type: "alloydb.googleapis.com/Instance"
1087    }
1088  ];
1089
1090  // Optional. An optional request ID to identify requests. Specify a unique
1091  // request ID so that if you must retry your request, the server will know to
1092  // ignore the request if it has already been completed. The server will
1093  // guarantee that for at least 60 minutes after the first request.
1094  //
1095  // For example, consider a situation where you make an initial request and
1096  // the request times out. If you make the request again with the same request
1097  // ID, the server can check if original operation with the same request ID
1098  // was received, and if so, will ignore the second request. This prevents
1099  // clients from accidentally creating duplicate commitments.
1100  //
1101  // The request ID must be a valid UUID with the exception that zero UUID is
1102  // not supported (00000000-0000-0000-0000-000000000000).
1103  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
1104
1105  // Optional. If set, performs request validation (e.g. permission checks and
1106  // any other type of validation), but do not actually execute the fault
1107  // injection.
1108  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
1109}
1110
1111message RestartInstanceRequest {
1112  // Required. The name of the resource. For the required format, see the
1113  // comment on the Instance.name field.
1114  string name = 1 [
1115    (google.api.field_behavior) = REQUIRED,
1116    (google.api.resource_reference) = {
1117      type: "alloydb.googleapis.com/Instance"
1118    }
1119  ];
1120
1121  // Optional. An optional request ID to identify requests. Specify a unique
1122  // request ID so that if you must retry your request, the server will know to
1123  // ignore the request if it has already been completed. The server will
1124  // guarantee that for at least 60 minutes after the first request.
1125  //
1126  // For example, consider a situation where you make an initial request and
1127  // the request times out. If you make the request again with the same request
1128  // ID, the server can check if original operation with the same request ID
1129  // was received, and if so, will ignore the second request. This prevents
1130  // clients from accidentally creating duplicate commitments.
1131  //
1132  // The request ID must be a valid UUID with the exception that zero UUID is
1133  // not supported (00000000-0000-0000-0000-000000000000).
1134  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
1135
1136  // Optional. If set, performs request validation (e.g. permission checks and
1137  // any other type of validation), but do not actually execute the restart.
1138  bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL];
1139}
1140
1141// Message for requesting list of Backups
1142message ListBackupsRequest {
1143  // Required. Parent value for ListBackupsRequest
1144  string parent = 1 [
1145    (google.api.field_behavior) = REQUIRED,
1146    (google.api.resource_reference) = {
1147      child_type: "alloydb.googleapis.com/Backup"
1148    }
1149  ];
1150
1151  // Requested page size. Server may return fewer items than requested.
1152  // If unspecified, server will pick an appropriate default.
1153  int32 page_size = 2;
1154
1155  // A token identifying a page of results the server should return.
1156  string page_token = 3;
1157
1158  // Filtering results
1159  string filter = 4;
1160
1161  // Hint for how to order the results
1162  string order_by = 5;
1163}
1164
1165// Message for response to listing Backups
1166message ListBackupsResponse {
1167  // The list of Backup
1168  repeated Backup backups = 1;
1169
1170  // A token identifying a page of results the server should return.
1171  string next_page_token = 2;
1172
1173  // Locations that could not be reached.
1174  repeated string unreachable = 3;
1175}
1176
1177// Message for getting a Backup
1178message GetBackupRequest {
1179  // Required. Name of the resource
1180  string name = 1 [
1181    (google.api.field_behavior) = REQUIRED,
1182    (google.api.resource_reference) = { type: "alloydb.googleapis.com/Backup" }
1183  ];
1184}
1185
1186// Message for creating a Backup
1187message CreateBackupRequest {
1188  // Required. Value for parent.
1189  string parent = 1 [
1190    (google.api.field_behavior) = REQUIRED,
1191    (google.api.resource_reference) = {
1192      child_type: "alloydb.googleapis.com/Backup"
1193    }
1194  ];
1195
1196  // Required. ID of the requesting object.
1197  string backup_id = 2 [(google.api.field_behavior) = REQUIRED];
1198
1199  // Required. The resource being created
1200  Backup backup = 3 [(google.api.field_behavior) = REQUIRED];
1201
1202  // Optional. An optional request ID to identify requests. Specify a unique
1203  // request ID so that if you must retry your request, the server will know to
1204  // ignore the request if it has already been completed. The server will
1205  // guarantee that for at least 60 minutes since the first request.
1206  //
1207  // For example, consider a situation where you make an initial request and
1208  // the request times out. If you make the request again with the same request
1209  // ID, the server can check if original operation with the same request ID
1210  // was received, and if so, will ignore the second request. This prevents
1211  // clients from accidentally creating duplicate commitments.
1212  //
1213  // The request ID must be a valid UUID with the exception that zero UUID is
1214  // not supported (00000000-0000-0000-0000-000000000000).
1215  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
1216
1217  // Optional. If set, the backend validates the request, but doesn't actually
1218  // execute it.
1219  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
1220}
1221
1222// Message for updating a Backup
1223message UpdateBackupRequest {
1224  // Optional. Field mask is used to specify the fields to be overwritten in the
1225  // Backup resource by the update.
1226  // The fields specified in the update_mask are relative to the resource, not
1227  // the full request. A field will be overwritten if it is in the mask. If the
1228  // user does not provide a mask then all fields will be overwritten.
1229  google.protobuf.FieldMask update_mask = 1
1230      [(google.api.field_behavior) = OPTIONAL];
1231
1232  // Required. The resource being updated
1233  Backup backup = 2 [(google.api.field_behavior) = REQUIRED];
1234
1235  // Optional. An optional request ID to identify requests. Specify a unique
1236  // request ID so that if you must retry your request, the server will know to
1237  // ignore the request if it has already been completed. The server will
1238  // guarantee that for at least 60 minutes since the first request.
1239  //
1240  // For example, consider a situation where you make an initial request and
1241  // the request times out. If you make the request again with the same request
1242  // ID, the server can check if original operation with the same request ID
1243  // was received, and if so, will ignore the second request. This prevents
1244  // clients from accidentally creating duplicate commitments.
1245  //
1246  // The request ID must be a valid UUID with the exception that zero UUID is
1247  // not supported (00000000-0000-0000-0000-000000000000).
1248  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
1249
1250  // Optional. If set, the backend validates the request, but doesn't actually
1251  // execute it.
1252  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
1253
1254  // Optional. If set to true, update succeeds even if instance is not found. In
1255  // that case, a new backup is created and `update_mask` is ignored.
1256  bool allow_missing = 5 [(google.api.field_behavior) = OPTIONAL];
1257}
1258
1259// Message for deleting a Backup
1260message DeleteBackupRequest {
1261  // Required. Name of the resource. For the required format, see the comment on
1262  // the Backup.name field.
1263  string name = 1 [
1264    (google.api.field_behavior) = REQUIRED,
1265    (google.api.resource_reference) = { type: "alloydb.googleapis.com/Backup" }
1266  ];
1267
1268  // Optional. An optional request ID to identify requests. Specify a unique
1269  // request ID so that if you must retry your request, the server will know to
1270  // ignore the request if it has already been completed. The server will
1271  // guarantee that for at least 60 minutes after the first request.
1272  //
1273  // For example, consider a situation where you make an initial request and
1274  // the request times out. If you make the request again with the same request
1275  // ID, the server can check if original operation with the same request ID
1276  // was received, and if so, will ignore the second request. This prevents
1277  // clients from accidentally creating duplicate commitments.
1278  //
1279  // The request ID must be a valid UUID with the exception that zero UUID is
1280  // not supported (00000000-0000-0000-0000-000000000000).
1281  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
1282
1283  // Optional. If set, the backend validates the request, but doesn't actually
1284  // execute it.
1285  bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL];
1286
1287  // Optional. The current etag of the Backup.
1288  // If an etag is provided and does not match the current etag of the Backup,
1289  // deletion will be blocked and an ABORTED error will be returned.
1290  string etag = 4 [(google.api.field_behavior) = OPTIONAL];
1291}
1292
1293// Message for listing the information about the supported Database flags.
1294message ListSupportedDatabaseFlagsRequest {
1295  // Required. The name of the parent resource. The required format is:
1296  //  * projects/{project}/locations/{location}
1297  //
1298  // Regardless of the parent specified here, as long it is contains a valid
1299  // project and location, the service will return a static list of supported
1300  // flags resources. Note that we do not yet support region-specific
1301  // flags.
1302  string parent = 1 [
1303    (google.api.field_behavior) = REQUIRED,
1304    (google.api.resource_reference) = {
1305      child_type: "alloydb.googleapis.com/SupportedDatabaseFlag"
1306    }
1307  ];
1308
1309  // Requested page size. Server may return fewer items than requested.
1310  // If unspecified, server will pick an appropriate default.
1311  int32 page_size = 2;
1312
1313  // A token identifying a page of results the server should return.
1314  string page_token = 3;
1315}
1316
1317// Message for response to listing SupportedDatabaseFlags.
1318message ListSupportedDatabaseFlagsResponse {
1319  // The list of SupportedDatabaseFlags.
1320  repeated SupportedDatabaseFlag supported_database_flags = 1;
1321
1322  // A token identifying a page of results the server should return.
1323  string next_page_token = 2;
1324}
1325
1326// Message for requests to generate a client certificate signed by the Cluster
1327// CA.
1328message GenerateClientCertificateRequest {
1329  // Required. The name of the parent resource. The required format is:
1330  //  * projects/{project}/locations/{location}/clusters/{cluster}
1331  string parent = 1 [
1332    (google.api.field_behavior) = REQUIRED,
1333    (google.api.resource_reference) = { type: "alloydb.googleapis.com/Cluster" }
1334  ];
1335
1336  // Optional. An optional request ID to identify requests. Specify a unique
1337  // request ID so that if you must retry your request, the server will know to
1338  // ignore the request if it has already been completed. The server will
1339  // guarantee that for at least 60 minutes after the first request.
1340  //
1341  // For example, consider a situation where you make an initial request and
1342  // the request times out. If you make the request again with the same request
1343  // ID, the server can check if original operation with the same request ID
1344  // was received, and if so, will ignore the second request. This prevents
1345  // clients from accidentally creating duplicate commitments.
1346  //
1347  // The request ID must be a valid UUID with the exception that zero UUID is
1348  // not supported (00000000-0000-0000-0000-000000000000).
1349  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
1350
1351  // Optional. An optional hint to the endpoint to generate the client
1352  // certificate with the requested duration. The duration can be from 1 hour to
1353  // 24 hours. The endpoint may or may not honor the hint. If the hint is left
1354  // unspecified or is not honored, then the endpoint will pick an appropriate
1355  // default duration.
1356  google.protobuf.Duration cert_duration = 4
1357      [(google.api.field_behavior) = OPTIONAL];
1358
1359  // Optional. The public key from the client.
1360  string public_key = 5 [(google.api.field_behavior) = OPTIONAL];
1361
1362  // Optional. An optional hint to the endpoint to generate a client
1363  // ceritificate that can be used by AlloyDB connectors to exchange additional
1364  // metadata with the server after TLS handshake.
1365  bool use_metadata_exchange = 6 [(google.api.field_behavior) = OPTIONAL];
1366}
1367
1368// Message returned by a GenerateClientCertificate operation.
1369message GenerateClientCertificateResponse {
1370  // Output only. The pem-encoded chain that may be used to verify the X.509
1371  // certificate. Expected to be in issuer-to-root order according to RFC 5246.
1372  repeated string pem_certificate_chain = 2
1373      [(google.api.field_behavior) = OUTPUT_ONLY];
1374
1375  // Optional. The pem-encoded cluster ca X.509 certificate.
1376  string ca_cert = 3 [(google.api.field_behavior) = OPTIONAL];
1377}
1378
1379// Request message for GetConnectionInfo.
1380message GetConnectionInfoRequest {
1381  // Required. The name of the parent resource. The required format is:
1382  // projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}
1383  string parent = 1 [
1384    (google.api.field_behavior) = REQUIRED,
1385    (google.api.resource_reference) = {
1386      type: "alloydb.googleapis.com/Instance"
1387    }
1388  ];
1389
1390  // Optional. An optional request ID to identify requests. Specify a unique
1391  // request ID so that if you must retry your request, the server will know to
1392  // ignore the request if it has already been completed. The server will
1393  // guarantee that for at least 60 minutes after the first request.
1394  //
1395  // For example, consider a situation where you make an initial request and
1396  // the request times out. If you make the request again with the same request
1397  // ID, the server can check if original operation with the same request ID
1398  // was received, and if so, will ignore the second request. This prevents
1399  // clients from accidentally creating duplicate commitments.
1400  //
1401  // The request ID must be a valid UUID with the exception that zero UUID is
1402  // not supported (00000000-0000-0000-0000-000000000000).
1403  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
1404}
1405
1406// Represents the metadata of the long-running operation.
1407message OperationMetadata {
1408  // Request specific metadata, if any.
1409  oneof request_specific {
1410    // Output only. BatchCreateInstances related metadata.
1411    BatchCreateInstancesMetadata batch_create_instances_metadata = 8
1412        [(google.api.field_behavior) = OUTPUT_ONLY];
1413  }
1414
1415  // Output only. The time the operation was created.
1416  google.protobuf.Timestamp create_time = 1
1417      [(google.api.field_behavior) = OUTPUT_ONLY];
1418
1419  // Output only. The time the operation finished running.
1420  google.protobuf.Timestamp end_time = 2
1421      [(google.api.field_behavior) = OUTPUT_ONLY];
1422
1423  // Output only. Server-defined resource path for the target of the operation.
1424  string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
1425
1426  // Output only. Name of the verb executed by the operation.
1427  string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
1428
1429  // Output only. Human-readable status of the operation, if any.
1430  string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
1431
1432  // Output only. Identifies whether the user has requested cancellation
1433  // of the operation. Operations that have successfully been cancelled
1434  // have [Operation.error][] value with a
1435  // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
1436  // `Code.CANCELLED`.
1437  bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
1438
1439  // Output only. API version used to start the operation.
1440  string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
1441}
1442
1443// Message for requesting list of Users
1444message ListUsersRequest {
1445  // Required. Parent value for ListUsersRequest
1446  string parent = 1 [
1447    (google.api.field_behavior) = REQUIRED,
1448    (google.api.resource_reference) = {
1449      child_type: "alloydb.googleapis.com/User"
1450    }
1451  ];
1452
1453  // Optional. Requested page size. Server may return fewer items than
1454  // requested. If unspecified, server will pick an appropriate default.
1455  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
1456
1457  // Optional. A token identifying a page of results the server should return.
1458  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
1459
1460  // Optional. Filtering results
1461  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
1462
1463  // Optional. Hint for how to order the results
1464  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
1465}
1466
1467// Message for response to listing Users
1468message ListUsersResponse {
1469  // The list of User
1470  repeated User users = 1;
1471
1472  // A token identifying a page of results the server should return.
1473  string next_page_token = 2;
1474
1475  // Locations that could not be reached.
1476  repeated string unreachable = 3;
1477}
1478
1479// Message for getting a User
1480message GetUserRequest {
1481  // Required. The name of the resource. For the required format, see the
1482  // comment on the User.name field.
1483  string name = 1 [
1484    (google.api.field_behavior) = REQUIRED,
1485    (google.api.resource_reference) = { type: "alloydb.googleapis.com/User" }
1486  ];
1487}
1488
1489// Message for creating a User
1490message CreateUserRequest {
1491  // Required. Value for parent.
1492  string parent = 1 [
1493    (google.api.field_behavior) = REQUIRED,
1494    (google.api.resource_reference) = {
1495      child_type: "alloydb.googleapis.com/User"
1496    }
1497  ];
1498
1499  // Required. ID of the requesting object.
1500  string user_id = 2 [(google.api.field_behavior) = REQUIRED];
1501
1502  // Required. The resource being created
1503  User user = 3 [(google.api.field_behavior) = REQUIRED];
1504
1505  // Optional. An optional request ID to identify requests. Specify a unique
1506  // request ID so that if you must retry your request, the server will know to
1507  // ignore the request if it has already been completed. The server will
1508  // guarantee that for at least 60 minutes since the first request.
1509  //
1510  // For example, consider a situation where you make an initial request and
1511  // the request times out. If you make the request again with the same request
1512  // ID, the server can check if original operation with the same request ID
1513  // was received, and if so, will ignore the second request. This prevents
1514  // clients from accidentally creating duplicate commitments.
1515  //
1516  // The request ID must be a valid UUID with the exception that zero UUID is
1517  // not supported (00000000-0000-0000-0000-000000000000).
1518  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
1519
1520  // Optional. If set, the backend validates the request, but doesn't actually
1521  // execute it.
1522  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
1523}
1524
1525// Message for updating a User
1526message UpdateUserRequest {
1527  // Optional. Field mask is used to specify the fields to be overwritten in the
1528  // User resource by the update.
1529  // The fields specified in the update_mask are relative to the resource, not
1530  // the full request. A field will be overwritten if it is in the mask. If the
1531  // user does not provide a mask then all fields will be overwritten.
1532  google.protobuf.FieldMask update_mask = 1
1533      [(google.api.field_behavior) = OPTIONAL];
1534
1535  // Required. The resource being updated
1536  User user = 2 [(google.api.field_behavior) = REQUIRED];
1537
1538  // Optional. An optional request ID to identify requests. Specify a unique
1539  // request ID so that if you must retry your request, the server will know to
1540  // ignore the request if it has already been completed. The server will
1541  // guarantee that for at least 60 minutes since the first request.
1542  //
1543  // For example, consider a situation where you make an initial request and
1544  // the request times out. If you make the request again with the same request
1545  // ID, the server can check if original operation with the same request ID
1546  // was received, and if so, will ignore the second request. This prevents
1547  // clients from accidentally creating duplicate commitments.
1548  //
1549  // The request ID must be a valid UUID with the exception that zero UUID is
1550  // not supported (00000000-0000-0000-0000-000000000000).
1551  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
1552
1553  // Optional. If set, the backend validates the request, but doesn't actually
1554  // execute it.
1555  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
1556
1557  // Optional. Allow missing fields in the update mask.
1558  bool allow_missing = 5 [(google.api.field_behavior) = OPTIONAL];
1559}
1560
1561// Message for deleting a User
1562message DeleteUserRequest {
1563  // Required. The name of the resource. For the required format, see the
1564  // comment on the User.name field.
1565  string name = 1 [
1566    (google.api.field_behavior) = REQUIRED,
1567    (google.api.resource_reference) = { type: "alloydb.googleapis.com/User" }
1568  ];
1569
1570  // Optional. An optional request ID to identify requests. Specify a unique
1571  // request ID so that if you must retry your request, the server will know to
1572  // ignore the request if it has already been completed. The server will
1573  // guarantee that for at least 60 minutes after the first request.
1574  //
1575  // For example, consider a situation where you make an initial request and
1576  // the request times out. If you make the request again with the same request
1577  // ID, the server can check if original operation with the same request ID
1578  // was received, and if so, will ignore the second request. This prevents
1579  // clients from accidentally creating duplicate commitments.
1580  //
1581  // The request ID must be a valid UUID with the exception that zero UUID is
1582  // not supported (00000000-0000-0000-0000-000000000000).
1583  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
1584
1585  // Optional. If set, the backend validates the request, but doesn't actually
1586  // execute it.
1587  bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL];
1588}
1589