cloud_sql.proto 26 KB

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