cloud_sql.proto 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.cloud.sql.v1beta4;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/cloud/sql/v1beta4/cloud_sql_resources.proto";
  20. option go_package = "google.golang.org/genproto/googleapis/cloud/sql/v1beta4;sql";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "CloudSqlServiceProto";
  23. option java_package = "com.google.cloud.sql.v1beta4";
  24. service SqlBackupRunsService {
  25. option (google.api.default_host) = "sqladmin.googleapis.com";
  26. option (google.api.oauth_scopes) =
  27. "https://www.googleapis.com/auth/cloud-platform,"
  28. "https://www.googleapis.com/auth/sqlservice.admin";
  29. // Deletes the backup taken by a backup run.
  30. rpc Delete(SqlBackupRunsDeleteRequest) returns (Operation) {
  31. option (google.api.http) = {
  32. delete: "/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}"
  33. };
  34. }
  35. // Retrieves a resource containing information about a backup run.
  36. rpc Get(SqlBackupRunsGetRequest) returns (BackupRun) {
  37. option (google.api.http) = {
  38. get: "/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}"
  39. };
  40. }
  41. // Creates a new backup run on demand.
  42. rpc Insert(SqlBackupRunsInsertRequest) returns (Operation) {
  43. option (google.api.http) = {
  44. post: "/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns"
  45. body: "body"
  46. };
  47. }
  48. // Lists all backup runs associated with the project or a given instance and
  49. // configuration in the reverse chronological order of the backup initiation
  50. // time.
  51. rpc List(SqlBackupRunsListRequest) returns (BackupRunsListResponse) {
  52. option (google.api.http) = {
  53. get: "/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns"
  54. };
  55. }
  56. }
  57. service SqlDatabasesService {
  58. option (google.api.default_host) = "sqladmin.googleapis.com";
  59. option (google.api.oauth_scopes) =
  60. "https://www.googleapis.com/auth/cloud-platform,"
  61. "https://www.googleapis.com/auth/sqlservice.admin";
  62. // Deletes a database from a Cloud SQL instance.
  63. rpc Delete(SqlDatabasesDeleteRequest) returns (Operation) {
  64. option (google.api.http) = {
  65. delete: "/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}"
  66. };
  67. }
  68. // Retrieves a resource containing information about a database inside a Cloud
  69. // SQL instance.
  70. rpc Get(SqlDatabasesGetRequest) returns (Database) {
  71. option (google.api.http) = {
  72. get: "/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}"
  73. };
  74. }
  75. // Inserts a resource containing information about a database inside a Cloud
  76. // SQL instance.
  77. rpc Insert(SqlDatabasesInsertRequest) returns (Operation) {
  78. option (google.api.http) = {
  79. post: "/sql/v1beta4/projects/{project}/instances/{instance}/databases"
  80. body: "body"
  81. };
  82. }
  83. // Lists databases in the specified Cloud SQL instance.
  84. rpc List(SqlDatabasesListRequest) returns (DatabasesListResponse) {
  85. option (google.api.http) = {
  86. get: "/sql/v1beta4/projects/{project}/instances/{instance}/databases"
  87. };
  88. }
  89. // Partially updates a resource containing information about a database inside
  90. // a Cloud SQL instance. This method supports patch semantics.
  91. rpc Patch(SqlDatabasesUpdateRequest) returns (Operation) {
  92. option (google.api.http) = {
  93. patch: "/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}"
  94. body: "body"
  95. };
  96. }
  97. // Updates a resource containing information about a database inside a Cloud
  98. // SQL instance.
  99. rpc Update(SqlDatabasesUpdateRequest) returns (Operation) {
  100. option (google.api.http) = {
  101. put: "/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}"
  102. body: "body"
  103. };
  104. }
  105. }
  106. service SqlFlagsService {
  107. option (google.api.default_host) = "sqladmin.googleapis.com";
  108. option (google.api.oauth_scopes) =
  109. "https://www.googleapis.com/auth/cloud-platform,"
  110. "https://www.googleapis.com/auth/sqlservice.admin";
  111. // Lists all available database flags for Cloud SQL instances.
  112. rpc List(SqlFlagsListRequest) returns (FlagsListResponse) {
  113. option (google.api.http) = {
  114. get: "/sql/v1beta4/flags"
  115. };
  116. }
  117. }
  118. service SqlInstancesService {
  119. option (google.api.default_host) = "sqladmin.googleapis.com";
  120. option (google.api.oauth_scopes) =
  121. "https://www.googleapis.com/auth/cloud-platform,"
  122. "https://www.googleapis.com/auth/sqlservice.admin";
  123. // Add a new trusted Certificate Authority (CA) version for the specified
  124. // instance. Required to prepare for a certificate rotation. If a CA version
  125. // was previously added but never used in a certificate rotation, this
  126. // operation replaces that version. There cannot be more than one CA version
  127. // waiting to be rotated in.
  128. rpc AddServerCa(SqlInstancesAddServerCaRequest) returns (Operation) {
  129. option (google.api.http) = {
  130. post: "/sql/v1beta4/projects/{project}/instances/{instance}/addServerCa"
  131. };
  132. }
  133. // Creates a Cloud SQL instance as a clone of the source instance. Using this
  134. // operation might cause your instance to restart.
  135. rpc Clone(SqlInstancesCloneRequest) returns (Operation) {
  136. option (google.api.http) = {
  137. post: "/sql/v1beta4/projects/{project}/instances/{instance}/clone"
  138. body: "body"
  139. };
  140. }
  141. // Deletes a Cloud SQL instance.
  142. rpc Delete(SqlInstancesDeleteRequest) returns (Operation) {
  143. option (google.api.http) = {
  144. delete: "/sql/v1beta4/projects/{project}/instances/{instance}"
  145. };
  146. }
  147. // Demotes the stand-alone instance to be a Cloud SQL read replica for an
  148. // external database server.
  149. rpc DemoteMaster(SqlInstancesDemoteMasterRequest) returns (Operation) {
  150. option (google.api.http) = {
  151. post: "/sql/v1beta4/projects/{project}/instances/{instance}/demoteMaster"
  152. body: "body"
  153. };
  154. }
  155. // Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL
  156. // dump or CSV file.
  157. rpc Export(SqlInstancesExportRequest) returns (Operation) {
  158. option (google.api.http) = {
  159. post: "/sql/v1beta4/projects/{project}/instances/{instance}/export"
  160. body: "body"
  161. };
  162. }
  163. // Initiates a manual failover of a high availability (HA) primary instance
  164. // to a standby instance, which becomes the primary instance. Users are
  165. // then rerouted to the new primary. For more information, see the
  166. // [Overview of high
  167. // availability](https://cloud.google.com/sql/docs/mysql/high-availability)
  168. // page in the Cloud SQL documentation.
  169. // If using Legacy HA (MySQL only), this causes the instance to failover to
  170. // its failover replica instance.
  171. rpc Failover(SqlInstancesFailoverRequest) returns (Operation) {
  172. option (google.api.http) = {
  173. post: "/sql/v1beta4/projects/{project}/instances/{instance}/failover"
  174. body: "body"
  175. };
  176. }
  177. // Retrieves a resource containing information about a Cloud SQL instance.
  178. rpc Get(SqlInstancesGetRequest) returns (DatabaseInstance) {
  179. option (google.api.http) = {
  180. get: "/sql/v1beta4/projects/{project}/instances/{instance}"
  181. };
  182. }
  183. // Imports data into a Cloud SQL instance from a SQL dump or CSV file in
  184. // Cloud Storage.
  185. rpc Import(SqlInstancesImportRequest) returns (Operation) {
  186. option (google.api.http) = {
  187. post: "/sql/v1beta4/projects/{project}/instances/{instance}/import"
  188. body: "body"
  189. };
  190. }
  191. // Creates a new Cloud SQL instance.
  192. rpc Insert(SqlInstancesInsertRequest) returns (Operation) {
  193. option (google.api.http) = {
  194. post: "/sql/v1beta4/projects/{project}/instances"
  195. body: "body"
  196. };
  197. }
  198. // Lists instances under a given project.
  199. rpc List(SqlInstancesListRequest) returns (InstancesListResponse) {
  200. option (google.api.http) = {
  201. get: "/sql/v1beta4/projects/{project}/instances"
  202. };
  203. }
  204. // Lists all of the trusted Certificate Authorities (CAs) for the specified
  205. // instance. There can be up to three CAs listed: the CA that was used to sign
  206. // the certificate that is currently in use, a CA that has been added but not
  207. // yet used to sign a certificate, and a CA used to sign a certificate that
  208. // has previously rotated out.
  209. rpc ListServerCas(SqlInstancesListServerCasRequest) returns (InstancesListServerCasResponse) {
  210. option (google.api.http) = {
  211. get: "/sql/v1beta4/projects/{project}/instances/{instance}/listServerCas"
  212. };
  213. }
  214. // Updates settings of a Cloud SQL instance.
  215. // This method supports patch semantics.
  216. rpc Patch(SqlInstancesPatchRequest) returns (Operation) {
  217. option (google.api.http) = {
  218. patch: "/sql/v1beta4/projects/{project}/instances/{instance}"
  219. body: "body"
  220. };
  221. }
  222. // Promotes the read replica instance to be a stand-alone Cloud SQL instance.
  223. // Using this operation might cause your instance to restart.
  224. rpc PromoteReplica(SqlInstancesPromoteReplicaRequest) returns (Operation) {
  225. option (google.api.http) = {
  226. post: "/sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica"
  227. };
  228. }
  229. // Deletes all client certificates and generates a new server SSL certificate
  230. // for the instance.
  231. rpc ResetSslConfig(SqlInstancesResetSslConfigRequest) returns (Operation) {
  232. option (google.api.http) = {
  233. post: "/sql/v1beta4/projects/{project}/instances/{instance}/resetSslConfig"
  234. };
  235. }
  236. // Restarts a Cloud SQL instance.
  237. rpc Restart(SqlInstancesRestartRequest) returns (Operation) {
  238. option (google.api.http) = {
  239. post: "/sql/v1beta4/projects/{project}/instances/{instance}/restart"
  240. };
  241. }
  242. // Restores a backup of a Cloud SQL instance. Using this operation might cause
  243. // your instance to restart.
  244. rpc RestoreBackup(SqlInstancesRestoreBackupRequest) returns (Operation) {
  245. option (google.api.http) = {
  246. post: "/sql/v1beta4/projects/{project}/instances/{instance}/restoreBackup"
  247. body: "body"
  248. };
  249. }
  250. // Rotates the server certificate to one signed by the Certificate Authority
  251. // (CA) version previously added with the addServerCA method.
  252. rpc RotateServerCa(SqlInstancesRotateServerCaRequest) returns (Operation) {
  253. option (google.api.http) = {
  254. post: "/sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCa"
  255. body: "body"
  256. };
  257. }
  258. // Starts the replication in the read replica instance.
  259. rpc StartReplica(SqlInstancesStartReplicaRequest) returns (Operation) {
  260. option (google.api.http) = {
  261. post: "/sql/v1beta4/projects/{project}/instances/{instance}/startReplica"
  262. };
  263. }
  264. // Stops the replication in the read replica instance.
  265. rpc StopReplica(SqlInstancesStopReplicaRequest) returns (Operation) {
  266. option (google.api.http) = {
  267. post: "/sql/v1beta4/projects/{project}/instances/{instance}/stopReplica"
  268. };
  269. }
  270. // Truncate MySQL general and slow query log tables
  271. // MySQL only.
  272. rpc TruncateLog(SqlInstancesTruncateLogRequest) returns (Operation) {
  273. option (google.api.http) = {
  274. post: "/sql/v1beta4/projects/{project}/instances/{instance}/truncateLog"
  275. body: "body"
  276. };
  277. }
  278. // Updates settings of a Cloud SQL instance. Using this operation might cause
  279. // your instance to restart.
  280. rpc Update(SqlInstancesUpdateRequest) returns (Operation) {
  281. option (google.api.http) = {
  282. put: "/sql/v1beta4/projects/{project}/instances/{instance}"
  283. body: "body"
  284. };
  285. }
  286. // Generates a short-lived X509 certificate containing the provided public key
  287. // and signed by a private key specific to the target instance. Users may use
  288. // the certificate to authenticate as themselves when connecting to the
  289. // database.
  290. rpc CreateEphemeral(SqlInstancesCreateEphemeralCertRequest) returns (SslCert) {
  291. option (google.api.http) = {
  292. post: "/sql/v1beta4/projects/{project}/instances/{instance}/createEphemeral"
  293. body: "body"
  294. };
  295. }
  296. // Reschedules the maintenance on the given instance.
  297. rpc RescheduleMaintenance(SqlInstancesRescheduleMaintenanceRequest) returns (Operation) {
  298. option (google.api.http) = {
  299. post: "/sql/v1beta4/projects/{project}/instances/{instance}/rescheduleMaintenance"
  300. body: "body"
  301. };
  302. }
  303. // Verify External primary instance external sync settings.
  304. rpc VerifyExternalSyncSettings(SqlInstancesVerifyExternalSyncSettingsRequest) returns (SqlInstancesVerifyExternalSyncSettingsResponse) {
  305. option (google.api.http) = {
  306. post: "/sql/v1beta4/projects/{project}/instances/{instance}/verifyExternalSyncSettings"
  307. body: "*"
  308. };
  309. }
  310. // Start External primary instance migration.
  311. rpc StartExternalSync(SqlInstancesStartExternalSyncRequest) returns (Operation) {
  312. option (google.api.http) = {
  313. post: "/sql/v1beta4/projects/{project}/instances/{instance}/startExternalSync"
  314. body: "*"
  315. };
  316. }
  317. }
  318. service SqlOperationsService {
  319. option (google.api.default_host) = "sqladmin.googleapis.com";
  320. option (google.api.oauth_scopes) =
  321. "https://www.googleapis.com/auth/cloud-platform,"
  322. "https://www.googleapis.com/auth/sqlservice.admin";
  323. // Retrieves an instance operation that has been performed on an instance.
  324. rpc Get(SqlOperationsGetRequest) returns (Operation) {
  325. option (google.api.http) = {
  326. get: "/sql/v1beta4/projects/{project}/operations/{operation}"
  327. };
  328. }
  329. // Lists all instance operations that have been performed on the given Cloud
  330. // SQL instance in the reverse chronological order of the start time.
  331. rpc List(SqlOperationsListRequest) returns (OperationsListResponse) {
  332. option (google.api.http) = {
  333. get: "/sql/v1beta4/projects/{project}/operations"
  334. };
  335. }
  336. }
  337. service SqlSslCertsService {
  338. option (google.api.default_host) = "sqladmin.googleapis.com";
  339. option (google.api.oauth_scopes) =
  340. "https://www.googleapis.com/auth/cloud-platform,"
  341. "https://www.googleapis.com/auth/sqlservice.admin";
  342. // Deletes the SSL certificate. For First Generation instances, the
  343. // certificate remains valid until the instance is restarted.
  344. rpc Delete(SqlSslCertsDeleteRequest) returns (Operation) {
  345. option (google.api.http) = {
  346. delete: "/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1_fingerprint}"
  347. };
  348. }
  349. // Retrieves a particular SSL certificate. Does not include the private key
  350. // (required for usage). The private key must be saved from the response to
  351. // initial creation.
  352. rpc Get(SqlSslCertsGetRequest) returns (SslCert) {
  353. option (google.api.http) = {
  354. get: "/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1_fingerprint}"
  355. };
  356. }
  357. // Creates an SSL certificate and returns it along with the private key and
  358. // server certificate authority. The new certificate will not be usable until
  359. // the instance is restarted.
  360. rpc Insert(SqlSslCertsInsertRequest) returns (SslCertsInsertResponse) {
  361. option (google.api.http) = {
  362. post: "/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts"
  363. body: "body"
  364. };
  365. }
  366. // Lists all of the current SSL certificates for the instance.
  367. rpc List(SqlSslCertsListRequest) returns (SslCertsListResponse) {
  368. option (google.api.http) = {
  369. get: "/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts"
  370. };
  371. }
  372. }
  373. message SqlBackupRunsDeleteRequest {
  374. // The ID of the backup run to delete. To find a backup run ID, use the
  375. // [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/backupRuns/list)
  376. // method.
  377. int64 id = 1;
  378. // Cloud SQL instance ID. This does not include the project ID.
  379. string instance = 2;
  380. // Project ID of the project that contains the instance.
  381. string project = 3;
  382. }
  383. message SqlBackupRunsGetRequest {
  384. // The ID of this backup run.
  385. int64 id = 1;
  386. // Cloud SQL instance ID. This does not include the project ID.
  387. string instance = 2;
  388. // Project ID of the project that contains the instance.
  389. string project = 3;
  390. }
  391. message SqlBackupRunsInsertRequest {
  392. // Cloud SQL instance ID. This does not include the project ID.
  393. string instance = 1;
  394. // Project ID of the project that contains the instance.
  395. string project = 2;
  396. BackupRun body = 100;
  397. }
  398. message SqlBackupRunsListRequest {
  399. // Cloud SQL instance ID, or "-" for all instances. This does not include
  400. // the project ID.
  401. string instance = 1;
  402. // Maximum number of backup runs per response.
  403. int32 max_results = 2;
  404. // A previously-returned page token representing part of the larger set of
  405. // results to view.
  406. string page_token = 3;
  407. // Project ID of the project that contains the instance.
  408. string project = 4;
  409. }
  410. message SqlDatabasesDeleteRequest {
  411. // Name of the database to be deleted in the instance.
  412. string database = 1;
  413. // Database instance ID. This does not include the project ID.
  414. string instance = 2;
  415. // Project ID of the project that contains the instance.
  416. string project = 3;
  417. }
  418. message SqlDatabasesGetRequest {
  419. // Name of the database in the instance.
  420. string database = 1;
  421. // Database instance ID. This does not include the project ID.
  422. string instance = 2;
  423. // Project ID of the project that contains the instance.
  424. string project = 3;
  425. }
  426. message SqlDatabasesInsertRequest {
  427. // Database instance ID. This does not include the project ID.
  428. string instance = 1;
  429. // Project ID of the project that contains the instance.
  430. string project = 2;
  431. Database body = 100;
  432. }
  433. message SqlDatabasesListRequest {
  434. // Cloud SQL instance ID. This does not include the project ID.
  435. string instance = 1;
  436. // Project ID of the project that contains the instance.
  437. string project = 2;
  438. }
  439. message SqlDatabasesUpdateRequest {
  440. // Name of the database to be updated in the instance.
  441. string database = 1;
  442. // Database instance ID. This does not include the project ID.
  443. string instance = 2;
  444. // Project ID of the project that contains the instance.
  445. string project = 3;
  446. Database body = 100;
  447. }
  448. message SqlFlagsListRequest {
  449. // Database type and version you want to retrieve flags for. By default, this
  450. // method returns flags for all database types and versions.
  451. string database_version = 1;
  452. }
  453. message SqlInstancesAddServerCaRequest {
  454. // Cloud SQL instance ID. This does not include the project ID.
  455. string instance = 1;
  456. // Project ID of the project that contains the instance.
  457. string project = 2;
  458. }
  459. message SqlInstancesCloneRequest {
  460. // The ID of the Cloud SQL instance to be cloned (source). This does not
  461. // include the project ID.
  462. string instance = 1;
  463. // Project ID of the source as well as the clone Cloud SQL instance.
  464. string project = 2;
  465. InstancesCloneRequest body = 100;
  466. }
  467. message SqlInstancesDeleteRequest {
  468. // Cloud SQL instance ID. This does not include the project ID.
  469. string instance = 1;
  470. // Project ID of the project that contains the instance to be deleted.
  471. string project = 2;
  472. }
  473. message SqlInstancesDemoteMasterRequest {
  474. // Cloud SQL instance name.
  475. string instance = 1;
  476. // ID of the project that contains the instance.
  477. string project = 2;
  478. InstancesDemoteMasterRequest body = 100;
  479. }
  480. message SqlInstancesExportRequest {
  481. // Cloud SQL instance ID. This does not include the project ID.
  482. string instance = 1;
  483. // Project ID of the project that contains the instance to be exported.
  484. string project = 2;
  485. InstancesExportRequest body = 100;
  486. }
  487. message SqlInstancesFailoverRequest {
  488. // Cloud SQL instance ID. This does not include the project ID.
  489. string instance = 1;
  490. // ID of the project that contains the read replica.
  491. string project = 2;
  492. InstancesFailoverRequest body = 100;
  493. }
  494. message SqlInstancesGetRequest {
  495. // Database instance ID. This does not include the project ID.
  496. string instance = 1;
  497. // Project ID of the project that contains the instance.
  498. string project = 2;
  499. }
  500. message SqlInstancesImportRequest {
  501. // Cloud SQL instance ID. This does not include the project ID.
  502. string instance = 1;
  503. // Project ID of the project that contains the instance.
  504. string project = 2;
  505. InstancesImportRequest body = 100;
  506. }
  507. message SqlInstancesInsertRequest {
  508. // Project ID of the project to which the newly created Cloud SQL instances
  509. // should belong.
  510. string project = 1;
  511. DatabaseInstance body = 100;
  512. }
  513. message SqlInstancesListRequest {
  514. // A filter expression that filters resources listed in the response.
  515. // The expression is in the form of field:value. For example,
  516. // 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per
  517. // their JSON representation, such as 'settings.userLabels.auto_start:true'.
  518. //
  519. // Multiple filter queries are space-separated. For example.
  520. // 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each
  521. // expression is an AND expression. However, you can include AND and OR
  522. // expressions explicitly.
  523. string filter = 1;
  524. // The maximum number of results to return per response.
  525. uint32 max_results = 2;
  526. // A previously-returned page token representing part of the larger set of
  527. // results to view.
  528. string page_token = 3;
  529. // Project ID of the project for which to list Cloud SQL instances.
  530. string project = 4;
  531. }
  532. message SqlInstancesListServerCasRequest {
  533. // Cloud SQL instance ID. This does not include the project ID.
  534. string instance = 1;
  535. // Project ID of the project that contains the instance.
  536. string project = 2;
  537. }
  538. message SqlInstancesPatchRequest {
  539. // Cloud SQL instance ID. This does not include the project ID.
  540. string instance = 1;
  541. // Project ID of the project that contains the instance.
  542. string project = 2;
  543. DatabaseInstance body = 100;
  544. }
  545. message SqlInstancesPromoteReplicaRequest {
  546. // Cloud SQL read replica instance name.
  547. string instance = 1;
  548. // ID of the project that contains the read replica.
  549. string project = 2;
  550. }
  551. message SqlInstancesResetSslConfigRequest {
  552. // Cloud SQL instance ID. This does not include the project ID.
  553. string instance = 1;
  554. // Project ID of the project that contains the instance.
  555. string project = 2;
  556. }
  557. message SqlInstancesRestartRequest {
  558. // Cloud SQL instance ID. This does not include the project ID.
  559. string instance = 1;
  560. // Project ID of the project that contains the instance to be restarted.
  561. string project = 2;
  562. }
  563. message SqlInstancesRestoreBackupRequest {
  564. // Cloud SQL instance ID. This does not include the project ID.
  565. string instance = 1;
  566. // Project ID of the project that contains the instance.
  567. string project = 2;
  568. InstancesRestoreBackupRequest body = 100;
  569. }
  570. message SqlInstancesRotateServerCaRequest {
  571. // Cloud SQL instance ID. This does not include the project ID.
  572. string instance = 1;
  573. // Project ID of the project that contains the instance.
  574. string project = 2;
  575. InstancesRotateServerCaRequest body = 100;
  576. }
  577. message SqlInstancesStartReplicaRequest {
  578. // Cloud SQL read replica instance name.
  579. string instance = 1;
  580. // ID of the project that contains the read replica.
  581. string project = 2;
  582. }
  583. message SqlInstancesStopReplicaRequest {
  584. // Cloud SQL read replica instance name.
  585. string instance = 1;
  586. // ID of the project that contains the read replica.
  587. string project = 2;
  588. }
  589. message SqlInstancesTruncateLogRequest {
  590. // Cloud SQL instance ID. This does not include the project ID.
  591. string instance = 1;
  592. // Project ID of the Cloud SQL project.
  593. string project = 2;
  594. InstancesTruncateLogRequest body = 100;
  595. }
  596. message SqlInstancesUpdateRequest {
  597. // Cloud SQL instance ID. This does not include the project ID.
  598. string instance = 1;
  599. // Project ID of the project that contains the instance.
  600. string project = 2;
  601. DatabaseInstance body = 100;
  602. }
  603. message SqlInstancesRescheduleMaintenanceRequest {
  604. // Cloud SQL instance ID. This does not include the project ID.
  605. string instance = 1;
  606. // ID of the project that contains the instance.
  607. string project = 2;
  608. SqlInstancesRescheduleMaintenanceRequestBody body = 100;
  609. }
  610. message SqlInstancesVerifyExternalSyncSettingsRequest {
  611. enum ExternalSyncMode {
  612. // Unknown external sync mode, will be defaulted to ONLINE mode
  613. EXTERNAL_SYNC_MODE_UNSPECIFIED = 0;
  614. // Online external sync will set up replication after initial data external
  615. // sync
  616. ONLINE = 1;
  617. // Offline external sync only dumps and loads a one-time snapshot of
  618. // the primary instance's data
  619. OFFLINE = 2;
  620. }
  621. // Cloud SQL instance ID. This does not include the project ID.
  622. string instance = 1;
  623. // Project ID of the project that contains the instance.
  624. string project = 2;
  625. // Flag to enable verifying connection only
  626. bool verify_connection_only = 3;
  627. // External sync mode
  628. ExternalSyncMode sync_mode = 4;
  629. // Optional. Flag to verify settings required by replication setup only
  630. bool verify_replication_only = 5 [(google.api.field_behavior) = OPTIONAL];
  631. oneof sync_config {
  632. // Optional. MySQL-specific settings for start external sync.
  633. MySqlSyncConfig mysql_sync_config = 6 [(google.api.field_behavior) = OPTIONAL];
  634. }
  635. }
  636. message SqlInstancesStartExternalSyncRequest {
  637. // Cloud SQL instance ID. This does not include the project ID.
  638. string instance = 1;
  639. // ID of the project that contains the instance.
  640. string project = 2;
  641. // External sync mode.
  642. SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 3;
  643. // Whether to skip the verification step (VESS).
  644. bool skip_verification = 4;
  645. oneof sync_config {
  646. // MySQL-specific settings for start external sync.
  647. MySqlSyncConfig mysql_sync_config = 6;
  648. }
  649. }
  650. message SqlOperationsGetRequest {
  651. // Instance operation ID.
  652. string operation = 1;
  653. // Project ID of the project that contains the instance.
  654. string project = 2;
  655. }
  656. message SqlOperationsListRequest {
  657. // Cloud SQL instance ID. This does not include the project ID.
  658. string instance = 1;
  659. // Maximum number of operations per response.
  660. uint32 max_results = 2;
  661. // A previously-returned page token representing part of the larger set of
  662. // results to view.
  663. string page_token = 3;
  664. // Project ID of the project that contains the instance.
  665. string project = 4;
  666. }
  667. message SqlInstancesCreateEphemeralCertRequest {
  668. // Cloud SQL instance ID. This does not include the project ID.
  669. string instance = 1;
  670. // Project ID of the Cloud SQL project.
  671. string project = 2;
  672. SslCertsCreateEphemeralRequest body = 100;
  673. }
  674. message SqlSslCertsDeleteRequest {
  675. // Cloud SQL instance ID. This does not include the project ID.
  676. string instance = 1;
  677. // Project ID of the project that contains the instance.
  678. string project = 2;
  679. // Sha1 FingerPrint.
  680. string sha1_fingerprint = 3;
  681. }
  682. message SqlSslCertsGetRequest {
  683. // Cloud SQL instance ID. This does not include the project ID.
  684. string instance = 1;
  685. // Project ID of the project that contains the instance.
  686. string project = 2;
  687. // Sha1 FingerPrint.
  688. string sha1_fingerprint = 3;
  689. }
  690. message SqlSslCertsInsertRequest {
  691. // Cloud SQL instance ID. This does not include the project ID.
  692. string instance = 1;
  693. // Project ID of the project that contains the instance.
  694. string project = 2;
  695. SslCertsInsertRequest body = 100;
  696. }
  697. message SqlSslCertsListRequest {
  698. // Cloud SQL instance ID. This does not include the project ID.
  699. string instance = 1;
  700. // Project ID of the project that contains the instance.
  701. string project = 2;
  702. }