-
Notifications
You must be signed in to change notification settings - Fork 666
Expand file tree
/
Copy pathcloud_sql.proto
More file actions
1739 lines (1419 loc) · 58.3 KB
/
cloud_sql.proto
File metadata and controls
1739 lines (1419 loc) · 58.3 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/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/sql/v1beta4/cloud_sql_resources.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
import "google/rpc/status.proto";
option go_package = "cloud.google.com/go/sql/apiv1beta4/sqlpb;sqlpb";
option java_multiple_files = true;
option java_outer_classname = "CloudSqlServiceProto";
option java_package = "com.google.cloud.sql.v1beta4";
service SqlBackupRunsService {
option (google.api.default_host) = "sqladmin.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform,"
"https://www.googleapis.com/auth/sqlservice.admin";
// Deletes the backup taken by a backup run.
rpc Delete(SqlBackupRunsDeleteRequest) returns (Operation) {
option (google.api.http) = {
delete: "/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}"
};
}
// Retrieves a resource containing information about a backup run.
rpc Get(SqlBackupRunsGetRequest) returns (BackupRun) {
option (google.api.http) = {
get: "/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}"
};
}
// Creates a new backup run on demand.
rpc Insert(SqlBackupRunsInsertRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns"
body: "body"
};
}
// Lists all backup runs associated with the project or a given instance and
// configuration in the reverse chronological order of the backup initiation
// time.
rpc List(SqlBackupRunsListRequest) returns (BackupRunsListResponse) {
option (google.api.http) = {
get: "/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns"
};
}
}
service SqlDatabasesService {
option (google.api.default_host) = "sqladmin.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform,"
"https://www.googleapis.com/auth/sqlservice.admin";
// Deletes a database from a Cloud SQL instance.
rpc Delete(SqlDatabasesDeleteRequest) returns (Operation) {
option (google.api.http) = {
delete: "/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}"
};
}
// Retrieves a resource containing information about a database inside a Cloud
// SQL instance.
rpc Get(SqlDatabasesGetRequest) returns (Database) {
option (google.api.http) = {
get: "/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}"
};
}
// Inserts a resource containing information about a database inside a Cloud
// SQL instance.
//
// **Note:** You can't modify the default character set and collation.
rpc Insert(SqlDatabasesInsertRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/databases"
body: "body"
};
}
// Lists databases in the specified Cloud SQL instance.
rpc List(SqlDatabasesListRequest) returns (DatabasesListResponse) {
option (google.api.http) = {
get: "/sql/v1beta4/projects/{project}/instances/{instance}/databases"
};
}
// Partially updates a resource containing information about a database inside
// a Cloud SQL instance. This method supports patch semantics.
rpc Patch(SqlDatabasesUpdateRequest) returns (Operation) {
option (google.api.http) = {
patch: "/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}"
body: "body"
};
}
// Updates a resource containing information about a database inside a Cloud
// SQL instance.
rpc Update(SqlDatabasesUpdateRequest) returns (Operation) {
option (google.api.http) = {
put: "/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}"
body: "body"
};
}
}
service SqlFlagsService {
option (google.api.default_host) = "sqladmin.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform,"
"https://www.googleapis.com/auth/sqlservice.admin";
// Lists all available database flags for Cloud SQL instances.
rpc List(SqlFlagsListRequest) returns (FlagsListResponse) {
option (google.api.http) = {
get: "/sql/v1beta4/flags"
};
}
}
service SqlInstancesService {
option (google.api.default_host) = "sqladmin.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform,"
"https://www.googleapis.com/auth/sqlservice.admin";
// Add a new trusted Certificate Authority (CA) version for the specified
// instance. Required to prepare for a certificate rotation. If a CA version
// was previously added but never used in a certificate rotation, this
// operation replaces that version. There cannot be more than one CA version
// waiting to be rotated in. For instances that have enabled Certificate
// Authority Service (CAS) based server CA, use AddServerCertificate to add a
// new server certificate.
rpc AddServerCa(SqlInstancesAddServerCaRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/addServerCa"
};
}
// Add a new trusted server certificate version for the specified instance
// using Certificate Authority Service (CAS) server CA. Required to prepare
// for a certificate rotation. If a server certificate version was previously
// added but never used in a certificate rotation, this operation replaces
// that version. There cannot be more than one certificate version waiting to
// be rotated in. For instances not using CAS server CA, use AddServerCa
// instead.
rpc AddServerCertificate(SqlInstancesAddServerCertificateRequest)
returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/addServerCertificate"
};
}
// Adds a new Entra ID certificate for the specified instance. If an Entra ID
// certificate was previously added but never used in a certificate rotation,
// this operation replaces that version.
rpc AddEntraIdCertificate(SqlInstancesAddEntraIdCertificateRequest)
returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/addEntraIdCertificate"
};
}
// Creates a Cloud SQL instance as a clone of the source instance. Using this
// operation might cause your instance to restart.
rpc Clone(SqlInstancesCloneRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/clone"
body: "body"
};
}
// Deletes a Cloud SQL instance.
rpc Delete(SqlInstancesDeleteRequest) returns (Operation) {
option (google.api.http) = {
delete: "/sql/v1beta4/projects/{project}/instances/{instance}"
};
}
// Demotes the stand-alone instance to be a Cloud SQL read replica for an
// external database server.
rpc DemoteMaster(SqlInstancesDemoteMasterRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/demoteMaster"
body: "body"
};
}
// Demotes an existing standalone instance to be a Cloud SQL read replica
// for an external database server.
rpc Demote(SqlInstancesDemoteRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/demote"
body: "body"
};
}
// Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL
// dump or CSV file.
rpc Export(SqlInstancesExportRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/export"
body: "body"
};
}
// Initiates a manual failover of a high availability (HA) primary instance
// to a standby instance, which becomes the primary instance. Users are
// then rerouted to the new primary. For more information, see the
// [Overview of high
// availability](https://cloud.google.com/sql/docs/mysql/high-availability)
// page in the Cloud SQL documentation.
// If using Legacy HA (MySQL only), this causes the instance to failover to
// its failover replica instance.
rpc Failover(SqlInstancesFailoverRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/failover"
body: "body"
};
}
// Reencrypt CMEK instance with latest key version.
rpc Reencrypt(SqlInstancesReencryptRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/reencrypt"
body: "body"
};
}
// Retrieves a resource containing information about a Cloud SQL instance.
rpc Get(SqlInstancesGetRequest) returns (DatabaseInstance) {
option (google.api.http) = {
get: "/sql/v1beta4/projects/{project}/instances/{instance}"
};
}
// Imports data into a Cloud SQL instance from a SQL dump or CSV file in
// Cloud Storage.
rpc Import(SqlInstancesImportRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/import"
body: "body"
};
}
// Creates a new Cloud SQL instance.
rpc Insert(SqlInstancesInsertRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances"
body: "body"
};
}
// Lists instances under a given project.
rpc List(SqlInstancesListRequest) returns (InstancesListResponse) {
option (google.api.http) = {
get: "/sql/v1beta4/projects/{project}/instances"
};
}
// Lists all of the trusted Certificate Authorities (CAs) for the specified
// instance. There can be up to three CAs listed: the CA that was used to sign
// the certificate that is currently in use, a CA that has been added but not
// yet used to sign a certificate, and a CA used to sign a certificate that
// has previously rotated out.
rpc ListServerCas(SqlInstancesListServerCasRequest)
returns (InstancesListServerCasResponse) {
option (google.api.http) = {
get: "/sql/v1beta4/projects/{project}/instances/{instance}/listServerCas"
};
}
// Lists all versions of server certificates and certificate authorities (CAs)
// for the specified instance. There can be up to three sets of certs listed:
// the certificate that is currently in use, a future that has been added but
// not yet used to sign a certificate, and a certificate that has been rotated
// out. For instances not using Certificate Authority Service (CAS) server CA,
// use ListServerCas instead.
rpc ListServerCertificates(SqlInstancesListServerCertificatesRequest)
returns (InstancesListServerCertificatesResponse) {
option (google.api.http) = {
get: "/sql/v1beta4/projects/{project}/instances/{instance}/listServerCertificates"
};
}
// Lists all versions of EntraID certificates for the specified instance.
// There can be up to three sets of certificates listed: the certificate that
// is currently in use, a future that has been added but not yet used to sign
// a certificate, and a certificate that has been rotated out.
rpc ListEntraIdCertificates(SqlInstancesListEntraIdCertificatesRequest)
returns (InstancesListEntraIdCertificatesResponse) {
option (google.api.http) = {
get: "/sql/v1beta4/projects/{project}/instances/{instance}/listEntraIdCertificates"
};
}
// Partially updates settings of a Cloud SQL instance by merging the request
// with the current configuration. This method supports patch semantics.
rpc Patch(SqlInstancesPatchRequest) returns (Operation) {
option (google.api.http) = {
patch: "/sql/v1beta4/projects/{project}/instances/{instance}"
body: "body"
};
}
// Promotes the read replica instance to be an independent Cloud SQL
// primary instance.
// Using this operation might cause your instance to restart.
rpc PromoteReplica(SqlInstancesPromoteReplicaRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica"
};
}
// Switches over from the primary instance to the DR replica
// instance.
rpc Switchover(SqlInstancesSwitchoverRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/switchover"
};
}
// Deletes all client certificates and generates a new server SSL certificate
// for the instance.
rpc ResetSslConfig(SqlInstancesResetSslConfigRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/resetSslConfig"
};
}
// Restarts a Cloud SQL instance.
rpc Restart(SqlInstancesRestartRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/restart"
};
}
// Restores a backup of a Cloud SQL instance. Using this operation might cause
// your instance to restart.
rpc RestoreBackup(SqlInstancesRestoreBackupRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/restoreBackup"
body: "body"
};
}
// Rotates the server certificate to one signed by the Certificate Authority
// (CA) version previously added with the addServerCA method. For instances
// that have enabled Certificate Authority Service (CAS) based server CA,
// use RotateServerCertificate to rotate the server certificate.
rpc RotateServerCa(SqlInstancesRotateServerCaRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCa"
body: "body"
};
}
// Rotates the server certificate version to one previously added with the
// addServerCertificate method. For instances not using Certificate Authority
// Service (CAS) server CA, use RotateServerCa instead.
rpc RotateServerCertificate(SqlInstancesRotateServerCertificateRequest)
returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCertificate"
body: "body"
};
}
// Rotates the Entra Id certificate version to one previously added with the
// addEntraIdCertificate method.
rpc RotateEntraIdCertificate(SqlInstancesRotateEntraIdCertificateRequest)
returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/rotateEntraIdCertificate"
body: "body"
};
}
// Starts the replication in the read replica instance.
rpc StartReplica(SqlInstancesStartReplicaRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/startReplica"
};
}
// Stops the replication in the read replica instance.
rpc StopReplica(SqlInstancesStopReplicaRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/stopReplica"
};
}
// Truncate MySQL general and slow query log tables
// MySQL only.
rpc TruncateLog(SqlInstancesTruncateLogRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/truncateLog"
body: "body"
};
}
// Updates settings of a Cloud SQL instance. Using this operation might cause
// your instance to restart.
rpc Update(SqlInstancesUpdateRequest) returns (Operation) {
option (google.api.http) = {
put: "/sql/v1beta4/projects/{project}/instances/{instance}"
body: "body"
};
}
// Generates a short-lived X509 certificate containing the provided public key
// and signed by a private key specific to the target instance. Users may use
// the certificate to authenticate as themselves when connecting to the
// database.
rpc CreateEphemeral(SqlInstancesCreateEphemeralCertRequest)
returns (SslCert) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/createEphemeral"
body: "body"
};
}
// Reschedules the maintenance on the given instance.
rpc RescheduleMaintenance(SqlInstancesRescheduleMaintenanceRequest)
returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/rescheduleMaintenance"
body: "body"
};
}
// Verify External primary instance external sync settings.
rpc VerifyExternalSyncSettings(SqlInstancesVerifyExternalSyncSettingsRequest)
returns (SqlInstancesVerifyExternalSyncSettingsResponse) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/verifyExternalSyncSettings"
body: "*"
};
}
// Start External primary instance migration.
rpc StartExternalSync(SqlInstancesStartExternalSyncRequest)
returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/startExternalSync"
body: "*"
};
}
// Perform Disk Shrink on primary instance.
rpc PerformDiskShrink(SqlInstancesPerformDiskShrinkRequest)
returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/performDiskShrink"
body: "body"
};
}
// Get Disk Shrink Config for a given instance.
rpc GetDiskShrinkConfig(SqlInstancesGetDiskShrinkConfigRequest)
returns (SqlInstancesGetDiskShrinkConfigResponse) {
option (google.api.http) = {
get: "/sql/v1beta4/projects/{project}/instances/{instance}/getDiskShrinkConfig"
};
}
// Reset Replica Size to primary instance disk size.
rpc ResetReplicaSize(SqlInstancesResetReplicaSizeRequest)
returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/resetReplicaSize"
body: "*"
};
}
// Get Latest Recovery Time for a given instance.
rpc GetLatestRecoveryTime(SqlInstancesGetLatestRecoveryTimeRequest)
returns (SqlInstancesGetLatestRecoveryTimeResponse) {
option (google.api.http) = {
get: "/sql/v1beta4/projects/{project}/instances/{instance}/getLatestRecoveryTime"
};
}
// Execute SQL statements.
rpc ExecuteSql(SqlInstancesExecuteSqlRequest)
returns (SqlInstancesExecuteSqlResponse) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/executeSql"
body: "body"
};
}
// Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
rpc AcquireSsrsLease(SqlInstancesAcquireSsrsLeaseRequest)
returns (SqlInstancesAcquireSsrsLeaseResponse) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/acquireSsrsLease"
body: "body"
};
}
// Release a lease for the setup of SQL Server Reporting Services (SSRS).
rpc ReleaseSsrsLease(SqlInstancesReleaseSsrsLeaseRequest)
returns (SqlInstancesReleaseSsrsLeaseResponse) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/releaseSsrsLease"
};
}
// Execute MVU Pre-checks
rpc PreCheckMajorVersionUpgrade(
SqlInstancesPreCheckMajorVersionUpgradeRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/preCheckMajorVersionUpgrade"
body: "body"
};
}
// Point in time restore for an instance managed by Google Cloud Backup and
// Disaster Recovery.
rpc PointInTimeRestore(SqlInstancesPointInTimeRestoreRequest)
returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/{parent=projects/*}:pointInTimeRestore"
body: "context"
};
}
}
service SqlOperationsService {
option (google.api.default_host) = "sqladmin.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform,"
"https://www.googleapis.com/auth/sqlservice.admin";
// Retrieves an instance operation that has been performed on an instance.
rpc Get(SqlOperationsGetRequest) returns (Operation) {
option (google.api.http) = {
get: "/sql/v1beta4/projects/{project}/operations/{operation}"
};
}
// Lists all instance operations that have been performed on the given Cloud
// SQL instance in the reverse chronological order of the start time.
rpc List(SqlOperationsListRequest) returns (OperationsListResponse) {
option (google.api.http) = {
get: "/sql/v1beta4/projects/{project}/operations"
};
}
// Cancels an instance operation that has been performed on an instance.
// Ordinarily, this method name should be `CancelSqlOperation`.
rpc Cancel(SqlOperationsCancelRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/operations/{operation}/cancel"
};
}
}
service SqlSslCertsService {
option (google.api.default_host) = "sqladmin.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform,"
"https://www.googleapis.com/auth/sqlservice.admin";
// Deletes the SSL certificate. For First Generation instances, the
// certificate remains valid until the instance is restarted.
rpc Delete(SqlSslCertsDeleteRequest) returns (Operation) {
option (google.api.http) = {
delete: "/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1_fingerprint}"
};
}
// Retrieves a particular SSL certificate. Does not include the private key
// (required for usage). The private key must be saved from the response to
// initial creation.
rpc Get(SqlSslCertsGetRequest) returns (SslCert) {
option (google.api.http) = {
get: "/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1_fingerprint}"
};
}
// Creates an SSL certificate and returns it along with the private key and
// server certificate authority. The new certificate will not be usable until
// the instance is restarted.
rpc Insert(SqlSslCertsInsertRequest) returns (SslCertsInsertResponse) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts"
body: "body"
};
}
// Lists all of the current SSL certificates for the instance.
rpc List(SqlSslCertsListRequest) returns (SslCertsListResponse) {
option (google.api.http) = {
get: "/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts"
};
}
}
service SqlBackupsService {
option (google.api.default_host) = "sqladmin.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform,"
"https://www.googleapis.com/auth/sqlservice.admin";
// Creates a backup for a Cloud SQL instance. This API can be used only to
// create on-demand backups.
rpc CreateBackup(CreateBackupRequest) returns (Operation) {
option (google.api.http) = {
post: "/sql/v1beta4/{parent=projects/*}/backups"
body: "backup"
};
option (google.api.method_signature) = "parent, backup";
}
// Retrieves a resource containing information about a backup.
rpc GetBackup(GetBackupRequest) returns (Backup) {
option (google.api.http) = {
get: "/sql/v1beta4/{name=projects/*/backups/*}"
};
option (google.api.method_signature) = "name";
}
// Lists all backups associated with the project.
rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) {
option (google.api.http) = {
get: "/sql/v1beta4/{parent=projects/*}/backups"
};
option (google.api.method_signature) = "parent";
}
// Updates the retention period and the description of the backup. You can use
// this API to update final backups only.
rpc UpdateBackup(UpdateBackupRequest) returns (Operation) {
option (google.api.http) = {
patch: "/sql/v1beta4/{backup.name=projects/*/backups/*}"
body: "backup"
};
option (google.api.method_signature) = "backup, update_mask";
}
// Deletes the backup.
rpc DeleteBackup(DeleteBackupRequest) returns (Operation) {
option (google.api.http) = {
delete: "/sql/v1beta4/{name=projects/*/backups/*}"
};
option (google.api.method_signature) = "name";
}
}
// The request payload to create the backup
message CreateBackupRequest {
// Required. The parent resource where this backup is created.
// Format: projects/{project}
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "sqladmin.googleapis.com/Backup"
}
];
// Required. The Backup to create.
Backup backup = 2 [(google.api.field_behavior) = REQUIRED];
}
// The request payload to get the backup.
message GetBackupRequest {
// Required. The name of the backup to retrieve.
// Format: projects/{project}/backups/{backup}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { type: "sqladmin.googleapis.com/Backup" }
];
}
// The request payload to list the backups.
message ListBackupsRequest {
// Required. The parent that owns this collection of backups.
// Format: projects/{project}
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "sqladmin.googleapis.com/Backup"
}
];
// The maximum number of backups to return per response. The service might
// return fewer backups than this value. If a value for this parameter isn't
// specified, then, at most, 500 backups are returned. The maximum value is
// 2,000. Any values that you set, which are greater than 2,000, are changed
// to 2,000.
int32 page_size = 2;
// A page token, received from a previous `ListBackups` call.
// Provide this to retrieve the subsequent page.
//
// When paginating, all other parameters provided to `ListBackups` must match
// the call that provided the page token.
string page_token = 3;
// Multiple filter queries are separated by spaces. For example,
// 'instance:abc AND type:FINAL, 'location:us',
// 'backupInterval.startTime>=1950-01-01T01:01:25.771Z'. You can filter by
// type, instance, backupInterval.startTime (creation time), or location.
string filter = 4;
}
// The response payload containing a list of the backups.
message ListBackupsResponse {
// A list of backups.
repeated Backup backups = 1;
// A token, which can be sent as `page_token` to retrieve the next page.
// If this field is omitted, then there aren't subsequent pages.
string next_page_token = 2;
// If a region isn't unavailable or if an unknown error occurs, then a warning
// message is returned.
repeated ApiWarning warnings = 3;
}
// The request payload to update the backup.
message UpdateBackupRequest {
// Required. The backup to update.
// The backup’s `name` field is used to identify the backup to update.
// Format: projects/{project}/backups/{backup}
Backup backup = 1 [(google.api.field_behavior) = REQUIRED];
// The list of fields that you can update. You can update only the description
// and retention period of the final backup.
google.protobuf.FieldMask update_mask = 2;
}
// The request payload to delete the backup.
message DeleteBackupRequest {
// Required. The name of the backup to delete.
// Format: projects/{project}/backups/{backup}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { type: "sqladmin.googleapis.com/Backup" }
];
}
message SqlBackupRunsDeleteRequest {
// The ID of the backup run to delete. To find a backup run ID, use the
// [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/backupRuns/list)
// method.
int64 id = 1;
// Cloud SQL instance ID. This does not include the project ID.
string instance = 2;
// Project ID of the project that contains the instance.
string project = 3;
}
message SqlBackupRunsGetRequest {
// The ID of this backup run.
int64 id = 1;
// Cloud SQL instance ID. This does not include the project ID.
string instance = 2;
// Project ID of the project that contains the instance.
string project = 3;
}
message SqlBackupRunsInsertRequest {
// Cloud SQL instance ID. This does not include the project ID.
string instance = 1;
// Project ID of the project that contains the instance.
string project = 2;
BackupRun body = 100;
}
message SqlBackupRunsListRequest {
// Cloud SQL instance ID, or "-" for all instances. This does not include
// the project ID.
string instance = 1;
// Maximum number of backup runs per response.
int32 max_results = 2;
// A previously-returned page token representing part of the larger set of
// results to view.
string page_token = 3;
// Project ID of the project that contains the instance.
string project = 4;
}
message SqlDatabasesDeleteRequest {
// Name of the database to be deleted in the instance.
string database = 1;
// Database instance ID. This does not include the project ID.
string instance = 2;
// Project ID of the project that contains the instance.
string project = 3;
}
message SqlDatabasesGetRequest {
// Name of the database in the instance.
string database = 1;
// Database instance ID. This does not include the project ID.
string instance = 2;
// Project ID of the project that contains the instance.
string project = 3;
}
message SqlDatabasesInsertRequest {
// Database instance ID. This does not include the project ID.
string instance = 1;
// Project ID of the project that contains the instance.
string project = 2;
Database body = 100;
}
message SqlDatabasesListRequest {
// Cloud SQL instance ID. This does not include the project ID.
string instance = 1;
// Project ID of the project that contains the instance.
string project = 2;
}
message SqlDatabasesUpdateRequest {
// Name of the database to be updated in the instance.
string database = 1;
// Database instance ID. This does not include the project ID.
string instance = 2;
// Project ID of the project that contains the instance.
string project = 3;
Database body = 100;
}
message SqlFlagsListRequest {
// Database type and version you want to retrieve flags for. By default, this
// method returns flags for all database types and versions.
string database_version = 1;
// Optional. Specify the scope of flags to be returned by SqlFlagsListService.
// Return list of database flags if unspecified.
optional SqlFlagScope flag_scope = 3 [(google.api.field_behavior) = OPTIONAL];
}
message SqlInstancesAddServerCaRequest {
// Cloud SQL instance ID. This does not include the project ID.
string instance = 1;
// Project ID of the project that contains the instance.
string project = 2;
}
// Request for AddServerCertificate RPC.
message SqlInstancesAddServerCertificateRequest {
// Required. Cloud SQL instance ID. This does not include the project ID.
string instance = 1 [(google.api.field_behavior) = REQUIRED];
// Required. Project ID of the project that contains the instance.
string project = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request for AddEntraIdCertificate RPC.
message SqlInstancesAddEntraIdCertificateRequest {
// Required. Cloud SQL instance ID. This does not include the project ID.
string instance = 1 [(google.api.field_behavior) = REQUIRED];
// Required. Project ID of the project that contains the instance.
string project = 2 [(google.api.field_behavior) = REQUIRED];
}
message SqlInstancesCloneRequest {
// The ID of the Cloud SQL instance to be cloned (source). This does not
// include the project ID.
string instance = 1;
// Project ID of the source as well as the clone Cloud SQL instance.
string project = 2;
InstancesCloneRequest body = 100;
}
message SqlInstancesDeleteRequest {
// Cloud SQL instance ID. This does not include the project ID.
string instance = 1;
// Project ID of the project that contains the instance to be deleted.
string project = 2;
// Flag to opt-in for final backup. By default, it is turned off.
optional bool enable_final_backup = 7;
oneof expiration {
// Optional. Retention period of the final backup.
int64 final_backup_ttl_days = 4 [(google.api.field_behavior) = OPTIONAL];
// Optional. Final Backup expiration time.
// Timestamp in UTC of when this resource is considered expired.
google.protobuf.Timestamp final_backup_expiry_time = 6
[(google.api.field_behavior) = OPTIONAL];
}
// Optional. The description of the final backup.
string final_backup_description = 5 [(google.api.field_behavior) = OPTIONAL];
}
message SqlInstancesDemoteMasterRequest {
// Cloud SQL instance name.
string instance = 1;
// ID of the project that contains the instance.
string project = 2;
InstancesDemoteMasterRequest body = 100;
}
// Instance demote request.
message SqlInstancesDemoteRequest {
// Required. The name of the Cloud SQL instance.
string instance = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The project ID of the project that contains the instance.
string project = 2 [(google.api.field_behavior) = REQUIRED];
// The request body.
InstancesDemoteRequest body = 100;
}
message SqlInstancesExportRequest {
// The Cloud SQL instance ID. This doesn't include the project ID.
string instance = 1;
// Project ID of the project that contains the instance to be exported.
string project = 2;
InstancesExportRequest body = 100;
}
message SqlInstancesFailoverRequest {
// Cloud SQL instance ID. This does not include the project ID.
string instance = 1;
// ID of the project that contains the read replica.
string project = 2;
InstancesFailoverRequest body = 100;
}
message SqlInstancesGetRequest {
// Database instance ID. This does not include the project ID.
string instance = 1;
// Project ID of the project that contains the instance.
string project = 2;
}
message SqlInstancesImportRequest {
// Cloud SQL instance ID. This does not include the project ID.
string instance = 1;
// Project ID of the project that contains the instance.
string project = 2;
InstancesImportRequest body = 100;