-
Notifications
You must be signed in to change notification settings - Fork 666
Expand file tree
/
Copy pathcloud_sql_resources.proto
More file actions
4074 lines (3160 loc) · 142 KB
/
cloud_sql_resources.proto
File metadata and controls
4074 lines (3160 loc) · 142 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.cloud.sql.v1beta4;
import "google/api/field_behavior.proto";
import "google/api/field_info.proto";
import "google/api/resource.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
import "google/type/interval.proto";
option go_package = "cloud.google.com/go/sql/apiv1beta4/sqlpb;sqlpb";
option java_multiple_files = true;
option java_outer_classname = "CloudSqlResourcesProto";
option java_package = "com.google.cloud.sql.v1beta4";
option (google.api.resource_definition) = {
type: "backupdr.googleapis.com/Backup"
pattern: "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}"
};
option (google.api.resource_definition) = {
type: "compute.googleapis.com/Network"
pattern: "projects/{project}/global/networks/{network}"
};
// An entry for an Access Control list.
message AclEntry {
// The allowlisted value for the access control list.
string value = 1;
// The time when this access control entry expires in
// [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example
// `2012-11-15T16:19:00.094Z`.
google.protobuf.Timestamp expiration_time = 2;
// Optional. A label to identify this entry.
string name = 3 [(google.api.field_behavior) = OPTIONAL];
// This is always `sql#aclEntry`.
string kind = 4;
}
// An Admin API warning message.
message ApiWarning {
enum SqlApiWarningCode {
// An unknown or unset warning type from Cloud SQL API.
SQL_API_WARNING_CODE_UNSPECIFIED = 0;
// Warning when one or more regions are not reachable. The returned result
// set may be incomplete.
REGION_UNREACHABLE = 1;
// Warning when user provided maxResults parameter exceeds the limit. The
// returned result set may be incomplete.
MAX_RESULTS_EXCEEDS_LIMIT = 2;
// Warning when user tries to create/update a user with credentials that
// have previously been compromised by a public data breach.
COMPROMISED_CREDENTIALS = 3;
// Warning when the operation succeeds but some non-critical workflow state
// failed.
INTERNAL_STATE_FAILURE = 4;
}
// Code to uniquely identify the warning type.
SqlApiWarningCode code = 1;
// The warning message.
string message = 2;
// The region name for REGION_UNREACHABLE warning.
string region = 3;
}
// We currently only support backup retention by specifying the number
// of backups we will retain.
message BackupRetentionSettings {
// The units that retained_backups specifies, we only support COUNT.
enum RetentionUnit {
// Backup retention unit is unspecified, will be treated as COUNT.
RETENTION_UNIT_UNSPECIFIED = 0;
// Retention will be by count, eg. "retain the most recent 7 backups".
COUNT = 1;
}
// The unit that 'retained_backups' represents.
RetentionUnit retention_unit = 1;
// Depending on the value of retention_unit, this is used to determine
// if a backup needs to be deleted. If retention_unit is 'COUNT', we will
// retain this many backups.
google.protobuf.Int32Value retained_backups = 2;
}
// Database instance backup configuration.
message BackupConfiguration {
// This value contains the storage location of the transactional logs
// used to perform point-in-time recovery (PITR) for the database.
enum TransactionalLogStorageState {
// Unspecified.
TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED = 0;
// The transaction logs used for PITR for the instance are stored
// on a data disk.
DISK = 1;
// The transaction logs used for PITR for the instance are switching from
// being stored on a data disk to being stored in Cloud Storage.
// Only applicable to MySQL.
SWITCHING_TO_CLOUD_STORAGE = 2;
// The transaction logs used for PITR for the instance are now stored
// in Cloud Storage. Previously, they were stored on a data disk.
// Only applicable to MySQL.
SWITCHED_TO_CLOUD_STORAGE = 3;
// The transaction logs used for PITR for the instance are stored in
// Cloud Storage. Only applicable to MySQL and PostgreSQL.
CLOUD_STORAGE = 4;
}
// Backup tier that manages the backups for the instance.
enum BackupTier {
// Unspecified.
BACKUP_TIER_UNSPECIFIED = 0;
// Instance is managed by Cloud SQL.
STANDARD = 1;
// Deprecated: ADVANCED is deprecated. Please use ENHANCED instead.
ADVANCED = 2 [deprecated = true];
// Instance is managed by Google Cloud Backup and DR Service.
ENHANCED = 3;
}
// Start time for the daily backup configuration in UTC timezone in the 24
// hour format - `HH:MM`.
string start_time = 1;
// Whether this configuration is enabled.
google.protobuf.BoolValue enabled = 2;
// This is always `sql#backupConfiguration`.
string kind = 3;
// (MySQL only) Whether binary log is enabled. If backup configuration is
// disabled, binarylog must be disabled as well.
google.protobuf.BoolValue binary_log_enabled = 4;
// Reserved for future use.
google.protobuf.BoolValue replication_log_archiving_enabled = 5;
// Location of the backup
string location = 6;
// Whether point in time recovery is enabled.
google.protobuf.BoolValue point_in_time_recovery_enabled = 7;
// The number of days of transaction logs we retain for point in time
// restore, from 1-7.
google.protobuf.Int32Value transaction_log_retention_days = 9;
// Backup retention settings.
BackupRetentionSettings backup_retention_settings = 10;
// Output only. This value contains the storage location of transactional logs
// for the database for point-in-time recovery.
optional TransactionalLogStorageState transactional_log_storage_state = 11
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Backup tier that manages the backups for the instance.
optional BackupTier backup_tier = 12
[(google.api.field_behavior) = OUTPUT_ONLY];
}
// A BackupRun resource.
message BackupRun {
// This is always `sql#backupRun`.
string kind = 1;
// The status of this run.
SqlBackupRunStatus status = 2;
// The time the run was enqueued in UTC timezone in
// [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example
// `2012-11-15T16:19:00.094Z`.
google.protobuf.Timestamp enqueued_time = 3;
// The identifier for this backup run. Unique only for a specific Cloud SQL
// instance.
int64 id = 4;
// The time the backup operation actually started in UTC timezone in
// [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example
// `2012-11-15T16:19:00.094Z`.
google.protobuf.Timestamp start_time = 5;
// The time the backup operation completed in UTC timezone in
// [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example
// `2012-11-15T16:19:00.094Z`.
google.protobuf.Timestamp end_time = 6;
// Information about why the backup operation failed. This is only present if
// the run has the FAILED status.
OperationError error = 7;
// The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL".
// This field defaults to "ON_DEMAND" and is ignored, when specified for
// insert requests.
SqlBackupRunType type = 8;
// The description of this run, only applicable to on-demand backups.
string description = 9;
// The start time of the backup window during which this the backup was
// attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for
// example `2012-11-15T16:19:00.094Z`.
google.protobuf.Timestamp window_start_time = 10;
// Name of the database instance.
string instance = 11;
// The URI of this resource.
string self_link = 12;
// Location of the backups.
string location = 13;
// Output only. The instance database version at the time this backup was
// made.
SqlDatabaseVersion database_version = 15
[(google.api.field_behavior) = OUTPUT_ONLY];
// Encryption configuration specific to a backup.
DiskEncryptionConfiguration disk_encryption_configuration = 16;
// Encryption status specific to a backup.
DiskEncryptionStatus disk_encryption_status = 17;
// Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.
SqlBackupKind backup_kind = 19;
// Backup time zone to prevent restores to an instance with
// a different time zone. Now relevant only for SQL Server.
string time_zone = 23;
// Output only. The maximum chargeable bytes for the backup.
optional int64 max_chargeable_bytes = 24
[(google.api.field_behavior) = OUTPUT_ONLY];
}
// A backup resource.
message Backup {
option (google.api.resource) = {
type: "sqladmin.googleapis.com/Backup"
pattern: "projects/{project}/backups/{backup}"
};
// The backup type.
enum SqlBackupType {
// This is an unknown backup type.
SQL_BACKUP_TYPE_UNSPECIFIED = 0;
// The backup schedule triggers a backup automatically.
AUTOMATED = 1;
// The user triggers a backup manually.
ON_DEMAND = 2;
// The backup that's created when the instance is deleted.
FINAL = 3;
}
// The backup's state
enum SqlBackupState {
// The state of the backup is unknown.
SQL_BACKUP_STATE_UNSPECIFIED = 0;
// The backup that's added to a queue.
ENQUEUED = 1;
// The backup is in progress.
RUNNING = 2;
// The backup failed.
FAILED = 3;
// The backup is successful.
SUCCESSFUL = 4;
// The backup is being deleted.
DELETING = 5;
// Deletion of the backup failed.
DELETION_FAILED = 6;
}
// Output only. The resource name of the backup.
// Format: projects/{project}/backups/{backup}.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. This is always `sql#backup`.
string kind = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The URI of this resource.
string self_link = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The type of this backup. The type can be "AUTOMATED",
// "ON_DEMAND", or “FINAL”.
SqlBackupType type = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
// The description of this backup.
string description = 5;
// The name of the database instance.
string instance = 6;
// The storage location of the backups. The location can be multi-regional.
string location = 7;
// Output only. This output contains the following values:
// start_time: All database writes up to this time are available.
// end_time: Any database writes after this time aren't available.
google.type.Interval backup_interval = 8
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The state of this backup.
SqlBackupState state = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Information about why the backup operation fails (for example,
// when the backup state fails).
OperationError error = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. This output contains the encryption configuration for a backup
// and the resource name of the KMS key for disk encryption.
string kms_key = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. This output contains the encryption status for a backup and
// the version of the KMS key that's used to encrypt the Cloud SQL instance.
string kms_key_version = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.
SqlBackupKind backup_kind = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. This output contains a backup time zone. If a Cloud SQL for
// SQL Server instance has a different time zone from the backup's time zone,
// then the restore to the instance doesn't happen.
string time_zone = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
oneof expiration {
// Input only. The time-to-live (TTL) interval for this resource (in days).
// For example: ttlDays:7, means 7 days from the current time. The
// expiration time can't exceed 365 days from the time that the backup is
// created.
int64 ttl_days = 16 [(google.api.field_behavior) = INPUT_ONLY];
// Backup expiration time.
// A UTC timestamp of when this resource expired.
google.protobuf.Timestamp expiry_time = 17;
}
// Output only. The database version of the instance of at the time this
// backup was made.
SqlDatabaseVersion database_version = 20
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The maximum chargeable bytes for the backup.
optional int64 max_chargeable_bytes = 23
[(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. Output only. Timestamp in UTC of when the instance associated
// with this backup is deleted.
google.protobuf.Timestamp instance_deletion_time = 24 [
(google.api.field_behavior) = OPTIONAL,
(google.api.field_behavior) = OUTPUT_ONLY
];
// Optional. Output only. Instance setting of the source instance that's
// associated with this backup.
DatabaseInstance instance_settings = 25 [
(google.api.field_behavior) = OPTIONAL,
(google.api.field_behavior) = OUTPUT_ONLY
];
// Output only. The mapping to backup run resource used for IAM validations.
string backup_run = 26 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. This status indicates whether the backup satisfies PZS.
//
// The status is reserved for future use.
google.protobuf.BoolValue satisfies_pzs = 27
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. This status indicates whether the backup satisfies PZI.
//
// The status is reserved for future use.
google.protobuf.BoolValue satisfies_pzi = 28
[(google.api.field_behavior) = OUTPUT_ONLY];
}
// Backup run list results.
message BackupRunsListResponse {
// This is always `sql#backupRunsList`.
string kind = 1;
// A list of backup runs in reverse chronological order of the enqueued time.
repeated BackupRun items = 2;
// The continuation token, used to page through large result sets. Provide
// this value in a subsequent request to return the next page of results.
string next_page_token = 3;
}
// Binary log coordinates.
message BinLogCoordinates {
// Name of the binary log file for a Cloud SQL instance.
string bin_log_file_name = 1;
// Position (offset) within the binary log file.
int64 bin_log_position = 2;
// This is always `sql#binLogCoordinates`.
string kind = 3;
}
// Backup context.
message BackupContext {
// The identifier of the backup.
int64 backup_id = 1;
// This is always `sql#backupContext`.
string kind = 2;
// The name of the backup.
// Format: projects/{project}/backups/{backup}
string name = 3;
}
// Database instance clone context.
message CloneContext {
// This is always `sql#cloneContext`.
string kind = 1;
// Reserved for future use.
int64 pitr_timestamp_ms = 2;
// Name of the Cloud SQL instance to be created as a clone.
string destination_instance_name = 3;
// Binary log coordinates, if specified, identify the position up to which the
// source instance is cloned. If not specified, the source instance is
// cloned up to the most recent binary log coordinates.
BinLogCoordinates bin_log_coordinates = 4;
// Timestamp, if specified, identifies the time to which the source instance
// is cloned.
google.protobuf.Timestamp point_in_time = 5;
// The name of the allocated ip range for the private ip Cloud SQL instance.
// For example: "google-managed-services-default". If set, the cloned instance
// ip will be created in the allocated range. The range name must comply with
// [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name
// must be 1-63 characters long and match the regular expression
// [a-z]([-a-z0-9]*[a-z0-9])?.
// Reserved for future use.
string allocated_ip_range = 6;
// (SQL Server only) Clone only the specified databases from the source
// instance. Clone all databases if empty.
repeated string database_names = 9;
// Optional. Copy clone and point-in-time recovery clone of an instance to the
// specified zone. If no zone is specified, clone to the same primary zone as
// the source instance.
optional string preferred_zone = 10 [(google.api.field_behavior) = OPTIONAL];
// Optional. Copy clone and point-in-time recovery clone of a regional
// instance in the specified zones. If not specified, clone to the same
// secondary zone as the source instance. This value cannot be the same as the
// preferred_zone field.
optional string preferred_secondary_zone = 11
[(google.api.field_behavior) = OPTIONAL];
// The timestamp used to identify the time when the source instance is
// deleted. If this instance is deleted, then you must set the timestamp.
optional google.protobuf.Timestamp source_instance_deletion_time = 12;
// Optional. The project ID of the destination project where the cloned
// instance will be created. To perform a cross-project clone, this field is
// required. If not specified, the clone is created in the same project
// as the source instance.
optional string destination_project = 13
[(google.api.field_behavior) = OPTIONAL];
// Optional. The fully qualified URI of the VPC network to which the cloned
// instance will be connected via Private Services Access for private IP. For
// example:`projects/my-network-project/global/networks/my-network`. This
// field is only required for cross-project cloning.
optional string destination_network = 14 [
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = { type: "compute.googleapis.com/Network" }
];
}
// Represents a SQL database on the Cloud SQL instance.
message Database {
// This is always `sql#database`.
string kind = 1;
// The Cloud SQL charset value.
string charset = 2;
// The Cloud SQL collation value.
string collation = 3;
// This field is deprecated and will be removed from a future version of the
// API.
string etag = 4;
// The name of the database in the Cloud SQL instance. This does not include
// the project ID or instance name.
string name = 5;
// The name of the Cloud SQL instance. This does not include the project ID.
string instance = 6;
// The URI of this resource.
string self_link = 7;
// The project ID of the project containing the Cloud SQL database. The Google
// apps domain is prefixed if applicable.
string project = 8;
oneof database_details {
SqlServerDatabaseDetails sqlserver_database_details = 9;
}
}
// Represents a Sql Server database on the Cloud SQL instance.
message SqlServerDatabaseDetails {
// The version of SQL Server with which the database is to be made compatible
int32 compatibility_level = 1;
// The recovery model of a SQL Server database
string recovery_model = 2;
}
// Database flags for Cloud SQL instances.
message DatabaseFlags {
// The name of the flag. These flags are passed at instance startup, so
// include both server options and system variables. Flags are
// specified with underscores, not hyphens. For more information, see
// [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags)
// in the Cloud SQL documentation.
string name = 1;
// The value of the flag. Boolean flags are set to `on` for true
// and `off` for false. This field must be omitted if the flag
// doesn't take a value.
string value = 2;
}
// Initial sync flags for certain Cloud SQL APIs.
// Currently used for the MySQL external server initial dump.
message SyncFlags {
// The name of the flag.
string name = 1;
// The value of the flag. This field must be omitted if the flag
// doesn't take a value.
string value = 2;
}
// Reference to another Cloud SQL instance.
message InstanceReference {
// The name of the Cloud SQL instance being referenced.
// This does not include the project ID.
string name = 1;
// The region of the Cloud SQL instance being referenced.
string region = 2;
// The project ID of the Cloud SQL instance being referenced.
// The default is the same project ID as the instance references it.
string project = 3;
}
// A Cloud SQL instance resource.
message DatabaseInstance {
// The current serving state of the database instance.
enum SqlInstanceState {
// The state of the instance is unknown.
SQL_INSTANCE_STATE_UNSPECIFIED = 0;
// The instance is running, or has been stopped by owner.
RUNNABLE = 1;
// The instance is not available, for example due to problems with billing.
SUSPENDED = 2;
// The instance is being deleted.
PENDING_DELETE = 3;
// The instance is being created.
PENDING_CREATE = 4;
// The instance is down for maintenance.
MAINTENANCE = 5;
// The creation of the instance failed or a fatal error occurred during
// maintenance.
FAILED = 6;
// Deprecated
ONLINE_MAINTENANCE = 7 [deprecated = true];
// (Applicable to read pool nodes only.) The read pool node needs to be
// repaired. The database might be unavailable.
REPAIRING = 8;
}
message SqlFailoverReplica {
// The name of the failover replica. If specified at instance creation, a
// failover replica is created for the instance. The name
// doesn't include the project ID.
string name = 1;
// The availability status of the failover replica. A false status indicates
// that the failover replica is out of sync. The primary instance can only
// failover to the failover replica when the status is true.
google.protobuf.BoolValue available = 2;
}
// Any scheduled maintenance for this instance.
message SqlScheduledMaintenance {
// The start time of any upcoming scheduled maintenance for this instance.
google.protobuf.Timestamp start_time = 1;
bool can_defer = 2 [deprecated = true];
// If the scheduled maintenance can be rescheduled.
bool can_reschedule = 3;
// Maintenance cannot be rescheduled to start beyond this deadline.
optional google.protobuf.Timestamp schedule_deadline_time = 4;
}
// This message wraps up the information written by out-of-disk detection job.
message SqlOutOfDiskReport {
// This enum lists all possible states regarding out-of-disk issues.
enum SqlOutOfDiskState {
// Unspecified state
SQL_OUT_OF_DISK_STATE_UNSPECIFIED = 0;
// The instance has plenty space on data disk
NORMAL = 1;
// Data disk is almost used up. It is shutdown to prevent data
// corruption.
SOFT_SHUTDOWN = 2;
}
// This field represents the state generated by the proactive database
// wellness job for OutOfDisk issues.
// * Writers:
// * the proactive database wellness job for OOD.
// * Readers:
// * the proactive database wellness job
optional SqlOutOfDiskState sql_out_of_disk_state = 1;
// The minimum recommended increase size in GigaBytes
// This field is consumed by the frontend
// * Writers:
// * the proactive database wellness job for OOD.
// * Readers:
optional int32 sql_min_recommended_increase_size_gb = 2;
}
// The SQL network architecture for the instance.
enum SqlNetworkArchitecture {
SQL_NETWORK_ARCHITECTURE_UNSPECIFIED = 0;
// The instance uses the new network architecture.
NEW_NETWORK_ARCHITECTURE = 1;
// The instance uses the old network architecture.
OLD_NETWORK_ARCHITECTURE = 2;
}
// Details of a single read pool node of a read pool.
message PoolNodeConfig {
// Output only. The name of the read pool node, to be used for retrieving
// metrics and logs.
optional string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The zone of the read pool node.
optional string gce_zone = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Mappings containing IP addresses that can be used to connect
// to the read pool node.
repeated IpMapping ip_addresses = 3
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The DNS name of the read pool node.
optional string dns_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The current state of the read pool node.
optional SqlInstanceState state = 5
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The list of DNS names used by this read pool node.
repeated DnsNameMapping dns_names = 6
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The Private Service Connect (PSC) service attachment of the
// read pool node.
optional string psc_service_attachment_link = 7
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The list of settings for requested automatically-setup
// Private Service Connect (PSC) consumer endpoints that can be used to
// connect to this read pool node.
repeated PscAutoConnectionConfig psc_auto_connections = 8
[(google.api.field_behavior) = OUTPUT_ONLY];
}
// This is always `sql#instance`.
string kind = 1;
// The current serving state of the Cloud SQL instance.
SqlInstanceState state = 2;
// The database engine type and version. The `databaseVersion` field cannot
// be changed after instance creation.
SqlDatabaseVersion database_version = 3;
// The user settings.
Settings settings = 4;
// This field is deprecated and will be removed from a future version of the
// API. Use the `settings.settingsVersion` field instead.
string etag = 5;
// The name and status of the failover replica.
SqlFailoverReplica failover_replica = 6;
// The name of the instance which will act as primary in the replication
// setup.
string master_instance_name = 7;
// The replicas of the instance.
repeated string replica_names = 8;
// The maximum disk size of the instance in bytes.
google.protobuf.Int64Value max_disk_size = 9 [deprecated = true];
// The current disk usage of the instance in bytes. This property has been
// deprecated. Use the
// "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud
// Monitoring API instead. Please see [this
// announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ)
// for details.
google.protobuf.Int64Value current_disk_size = 10 [deprecated = true];
// The assigned IP addresses for the instance.
repeated IpMapping ip_addresses = 11;
// SSL configuration.
SslCert server_ca_cert = 12;
// The instance type.
SqlInstanceType instance_type = 13;
// The project ID of the project containing the Cloud SQL instance. The Google
// apps domain is prefixed if applicable.
string project = 14;
// The IPv6 address assigned to the instance.
// (Deprecated) This property was applicable only
// to First Generation instances.
string ipv6_address = 15 [deprecated = true];
// The service account email address assigned to the instance. \This
// property is read-only.
string service_account_email_address = 16;
// Configuration specific to on-premises instances.
OnPremisesConfiguration on_premises_configuration = 17;
// Configuration specific to failover replicas and read replicas.
ReplicaConfiguration replica_configuration = 18;
// The backend type.
// `SECOND_GEN`: Cloud SQL database instance.
// `EXTERNAL`: A database server that is not managed by Google.
//
// This property is read-only; use the `tier` property in the `settings`
// object to determine the database type.
SqlBackendType backend_type = 19;
// The URI of this resource.
string self_link = 20;
// If the instance state is SUSPENDED, the reason for the suspension.
repeated SqlSuspensionReason suspension_reason = 21;
// Connection name of the Cloud SQL instance used in connection strings.
string connection_name = 22;
// Name of the Cloud SQL instance. This does not include the project ID.
string name = 23;
// The geographical region of the Cloud SQL instance.
//
// It can be one of the
// [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r)
// where Cloud SQL operates:
//
// For example, `asia-east1`, `europe-west1`, and `us-central1`.
// The default value is `us-central1`.
string region = 24;
// The Compute Engine zone that the instance is currently serving from. This
// value could be different from the zone that was specified when the instance
// was created if the instance has failed over to its secondary zone. WARNING:
// Changing this might restart the instance.
string gce_zone = 25;
// The Compute Engine zone that the failover instance is currently serving
// from for a regional instance. This value could be different
// from the zone that was specified when the instance
// was created if the instance has failed over to its secondary/failover zone.
string secondary_gce_zone = 34;
// Disk encryption configuration specific to an instance.
DiskEncryptionConfiguration disk_encryption_configuration = 26;
// Disk encryption status specific to an instance.
DiskEncryptionStatus disk_encryption_status = 27;
// Initial root password. Use only on creation. You must set root passwords
// before you can connect to PostgreSQL instances.
string root_password = 29;
// The start time of any upcoming scheduled maintenance for this instance.
SqlScheduledMaintenance scheduled_maintenance = 30;
// This status indicates whether the instance satisfies PZS.
//
// The status is reserved for future use.
google.protobuf.BoolValue satisfies_pzs = 35;
// Output only. Stores the current database version running on the instance
// including minor version such as `MYSQL_8_0_18`.
string database_installed_version = 40
[(google.api.field_behavior) = OUTPUT_ONLY];
// This field represents the report generated by the proactive database
// wellness job for OutOfDisk issues.
// * Writers:
// * the proactive database wellness job for OOD.
// * Readers:
// * the proactive database wellness job
optional SqlOutOfDiskReport out_of_disk_report = 38;
// Output only. The time when the instance was created in
// [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example
// `2012-11-15T16:19:00.094Z`.
google.protobuf.Timestamp create_time = 39
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. List all maintenance versions applicable on the instance
repeated string available_maintenance_versions = 41
[(google.api.field_behavior) = OUTPUT_ONLY];
// The current software version on the instance.
string maintenance_version = 42;
// Output only. All database versions that are available for upgrade.
repeated AvailableDatabaseVersion upgradable_database_versions = 45
[(google.api.field_behavior) = OUTPUT_ONLY];
// The SQL network architecture for the instance.
optional SqlNetworkArchitecture sql_network_architecture = 47;
// Output only. The link to service attachment of PSC instance.
optional string psc_service_attachment_link = 48
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The dns name of the instance.
optional string dns_name = 49 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. DEPRECATED: please use write_endpoint instead.
optional string primary_dns_name = 51
[deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The dns name of the primary instance in a replication group.
optional string write_endpoint = 52
[(google.api.field_behavior) = OUTPUT_ONLY];
// A primary instance and disaster recovery (DR) replica pair.
// A DR replica is a cross-region replica that you designate
// for failover in the event that the primary instance
// experiences regional failure.
// Applicable to MySQL and PostgreSQL.
optional ReplicationCluster replication_cluster = 54;
// Gemini instance configuration.
optional GeminiInstanceConfig gemini_config = 55;
// Output only. This status indicates whether the instance satisfies PZI.
//
// The status is reserved for future use.
google.protobuf.BoolValue satisfies_pzi = 56
[(google.api.field_behavior) = OUTPUT_ONLY];
// Input only. Whether Cloud SQL is enabled to switch storing point-in-time
// recovery log files from a data disk to Cloud Storage.
optional google.protobuf.BoolValue
switch_transaction_logs_to_cloud_storage_enabled = 57
[(google.api.field_behavior) = INPUT_ONLY];
// Input only. Determines whether an in-place major version upgrade of
// replicas happens when an in-place major version upgrade of a primary
// instance is initiated.
optional google.protobuf.BoolValue
include_replicas_for_major_version_upgrade = 59
[(google.api.field_behavior) = INPUT_ONLY];
// Optional. Input only. Immutable. Tag keys and tag values that are bound to
// this instance. You must represent each item in the map as:
// `"<tag-key-namespaced-name>" : "<tag-value-short-name>"`.
//
// For example, a single resource can have the following tags:
// ```
// "123/environment": "production",
// "123/costCenter": "marketing",
// ```
//
// For more information on tag creation and management, see
// https://cloud.google.com/resource-manager/docs/tags/tags-overview.
map<string, string> tags = 60 [
(google.api.field_behavior) = INPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = OPTIONAL
];
// The number of read pool nodes in a read pool.
optional int32 node_count = 63;
// Output only. Entries containing information about each read pool node of
// the read pool.
repeated PoolNodeConfig nodes = 64
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The list of DNS names used by this instance.
repeated DnsNameMapping dns_names = 67
[(google.api.field_behavior) = OUTPUT_ONLY];
}
// DNS metadata.
message DnsNameMapping {
// The connection type of the DNS name.
enum ConnectionType {
// Unknown connection type.
CONNECTION_TYPE_UNSPECIFIED = 0;
// Public IP.
PUBLIC = 1;
// Private services access (private IP).
PRIVATE_SERVICES_ACCESS = 2;
// Private Service Connect.
PRIVATE_SERVICE_CONNECT = 3;
}
// The scope that the DNS name applies to.
enum DnsScope {
// DNS scope not set. This value should not be used.
DNS_SCOPE_UNSPECIFIED = 0;
// Indicates an instance-level DNS name.