cloud_sql_resources.proto 69 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177
  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. // LINT: LEGACY_NAMES
  15. syntax = "proto3";
  16. package google.cloud.sql.v1beta4;
  17. import "google/api/field_behavior.proto";
  18. import "google/protobuf/duration.proto";
  19. import "google/protobuf/timestamp.proto";
  20. import "google/protobuf/wrappers.proto";
  21. option go_package = "google.golang.org/genproto/googleapis/cloud/sql/v1beta4;sql";
  22. option java_multiple_files = true;
  23. option java_outer_classname = "CloudSqlResourcesProto";
  24. option java_package = "com.google.cloud.sql.v1beta4";
  25. // An entry for an Access Control list.
  26. message AclEntry {
  27. // The allowlisted value for the access control list.
  28. string value = 1;
  29. // The time when this access control entry expires in
  30. // [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example
  31. // `2012-11-15T16:19:00.094Z`.
  32. google.protobuf.Timestamp expiration_time = 2;
  33. // Optional. A label to identify this entry.
  34. string name = 3 [(google.api.field_behavior) = OPTIONAL];
  35. // This is always `sql#aclEntry`.
  36. string kind = 4;
  37. }
  38. // An Admin API warning message.
  39. message ApiWarning {
  40. enum SqlApiWarningCode {
  41. // An unknown or unset warning type from Cloud SQL API.
  42. SQL_API_WARNING_CODE_UNSPECIFIED = 0;
  43. // Warning when one or more regions are not reachable. The returned result
  44. // set may be incomplete.
  45. REGION_UNREACHABLE = 1;
  46. }
  47. // Code to uniquely identify the warning type.
  48. SqlApiWarningCode code = 1;
  49. // The warning message.
  50. string message = 2;
  51. // The region name for REGION_UNREACHABLE warning.
  52. string region = 3;
  53. }
  54. // We currently only support backup retention by specifying the number
  55. // of backups we will retain.
  56. message BackupRetentionSettings {
  57. // The units that retained_backups specifies, we only support COUNT.
  58. enum RetentionUnit {
  59. // Backup retention unit is unspecified, will be treated as COUNT.
  60. RETENTION_UNIT_UNSPECIFIED = 0;
  61. // Retention will be by count, eg. "retain the most recent 7 backups".
  62. COUNT = 1;
  63. }
  64. // The unit that 'retained_backups' represents.
  65. RetentionUnit retention_unit = 1;
  66. // Depending on the value of retention_unit, this is used to determine
  67. // if a backup needs to be deleted. If retention_unit is 'COUNT', we will
  68. // retain this many backups.
  69. google.protobuf.Int32Value retained_backups = 2;
  70. }
  71. // Database instance backup configuration.
  72. message BackupConfiguration {
  73. // Start time for the daily backup configuration in UTC timezone in the 24
  74. // hour format - `HH:MM`.
  75. string start_time = 1;
  76. // Whether this configuration is enabled.
  77. google.protobuf.BoolValue enabled = 2;
  78. // This is always `sql#backupConfiguration`.
  79. string kind = 3;
  80. // (MySQL only) Whether binary log is enabled. If backup configuration is
  81. // disabled, binarylog must be disabled as well.
  82. google.protobuf.BoolValue binary_log_enabled = 4;
  83. // Reserved for future use.
  84. google.protobuf.BoolValue replication_log_archiving_enabled = 5;
  85. // Location of the backup
  86. string location = 6;
  87. // (Postgres only) Whether point in time recovery is enabled.
  88. google.protobuf.BoolValue point_in_time_recovery_enabled = 7;
  89. // The number of days of transaction logs we retain for point in time
  90. // restore, from 1-7.
  91. google.protobuf.Int32Value transaction_log_retention_days = 9;
  92. // Backup retention settings.
  93. BackupRetentionSettings backup_retention_settings = 10;
  94. }
  95. // A BackupRun resource.
  96. message BackupRun {
  97. // This is always `sql#backupRun`.
  98. string kind = 1;
  99. // The status of this run.
  100. SqlBackupRunStatus status = 2;
  101. // The time the run was enqueued in UTC timezone in
  102. // [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example
  103. // `2012-11-15T16:19:00.094Z`.
  104. google.protobuf.Timestamp enqueued_time = 3;
  105. // The identifier for this backup run. Unique only for a specific Cloud SQL
  106. // instance.
  107. int64 id = 4;
  108. // The time the backup operation actually started in UTC timezone in
  109. // [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example
  110. // `2012-11-15T16:19:00.094Z`.
  111. google.protobuf.Timestamp start_time = 5;
  112. // The time the backup operation completed in UTC timezone in
  113. // [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example
  114. // `2012-11-15T16:19:00.094Z`.
  115. google.protobuf.Timestamp end_time = 6;
  116. // Information about why the backup operation failed. This is only present if
  117. // the run has the FAILED status.
  118. OperationError error = 7;
  119. // The type of this run; can be either "AUTOMATED" or "ON_DEMAND". This field
  120. // defaults to "ON_DEMAND" and is ignored, when specified for insert requests.
  121. SqlBackupRunType type = 8;
  122. // The description of this run, only applicable to on-demand backups.
  123. string description = 9;
  124. // The start time of the backup window during which this the backup was
  125. // attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for
  126. // example `2012-11-15T16:19:00.094Z`.
  127. google.protobuf.Timestamp window_start_time = 10;
  128. // Name of the database instance.
  129. string instance = 11;
  130. // The URI of this resource.
  131. string self_link = 12;
  132. // Location of the backups.
  133. string location = 13;
  134. // Encryption configuration specific to a backup.
  135. DiskEncryptionConfiguration disk_encryption_configuration = 16;
  136. // Encryption status specific to a backup.
  137. DiskEncryptionStatus disk_encryption_status = 17;
  138. // Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.
  139. SqlBackupKind backup_kind = 19;
  140. }
  141. // Backup run list results.
  142. message BackupRunsListResponse {
  143. // This is always `sql#backupRunsList`.
  144. string kind = 1;
  145. // A list of backup runs in reverse chronological order of the enqueued time.
  146. repeated BackupRun items = 2;
  147. // The continuation token, used to page through large result sets. Provide
  148. // this value in a subsequent request to return the next page of results.
  149. string next_page_token = 3;
  150. }
  151. // Binary log coordinates.
  152. message BinLogCoordinates {
  153. // Name of the binary log file for a Cloud SQL instance.
  154. string bin_log_file_name = 1;
  155. // Position (offset) within the binary log file.
  156. int64 bin_log_position = 2;
  157. // This is always `sql#binLogCoordinates`.
  158. string kind = 3;
  159. }
  160. // Backup context.
  161. message BackupContext {
  162. // The identifier of the backup.
  163. int64 backup_id = 1;
  164. // This is always `sql#backupContext`.
  165. string kind = 2;
  166. }
  167. // Database instance clone context.
  168. message CloneContext {
  169. // This is always `sql#cloneContext`.
  170. string kind = 1;
  171. // Reserved for future use.
  172. int64 pitr_timestamp_ms = 2;
  173. // Name of the Cloud SQL instance to be created as a clone.
  174. string destination_instance_name = 3;
  175. // Binary log coordinates, if specified, identify the position up to which the
  176. // source instance is cloned. If not specified, the source instance is
  177. // cloned up to the most recent binary log coordinates.
  178. BinLogCoordinates bin_log_coordinates = 4;
  179. // Timestamp, if specified, identifies the time to which the source instance
  180. // is cloned.
  181. google.protobuf.Timestamp point_in_time = 5;
  182. // The name of the allocated ip range for the private ip CloudSQL instance.
  183. // For example: "google-managed-services-default". If set, the cloned instance
  184. // ip will be created in the allocated range. The range name must comply with
  185. // [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name
  186. // must be 1-63 characters long and match the regular expression
  187. // [a-z]([-a-z0-9]*[a-z0-9])?.
  188. // Reserved for future use.
  189. string allocated_ip_range = 6;
  190. }
  191. // Represents a SQL database on the Cloud SQL instance.
  192. message Database {
  193. // This is always `sql#database`.
  194. string kind = 1;
  195. // The Cloud SQL charset value.
  196. string charset = 2;
  197. // The Cloud SQL collation value.
  198. string collation = 3;
  199. // This field is deprecated and will be removed from a future version of the
  200. // API.
  201. string etag = 4;
  202. // The name of the database in the Cloud SQL instance. This does not include
  203. // the project ID or instance name.
  204. string name = 5;
  205. // The name of the Cloud SQL instance. This does not include the project ID.
  206. string instance = 6;
  207. // The URI of this resource.
  208. string self_link = 7;
  209. // The project ID of the project containing the Cloud SQL database. The Google
  210. // apps domain is prefixed if applicable.
  211. string project = 8;
  212. oneof database_details {
  213. SqlServerDatabaseDetails sqlserver_database_details = 9;
  214. }
  215. }
  216. // Represents a Sql Server database on the Cloud SQL instance.
  217. message SqlServerDatabaseDetails {
  218. // The version of SQL Server with which the database is to be made compatible
  219. int32 compatibility_level = 1;
  220. // The recovery model of a SQL Server database
  221. string recovery_model = 2;
  222. }
  223. // Database flags for Cloud SQL instances.
  224. message DatabaseFlags {
  225. // The name of the flag. These flags are passed at instance startup, so
  226. // include both server options and system variables. Flags are
  227. // specified with underscores, not hyphens. For more information, see
  228. // [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags)
  229. // in the Cloud SQL documentation.
  230. string name = 1;
  231. // The value of the flag. Boolean flags are set to `on` for true
  232. // and `off` for false. This field must be omitted if the flag
  233. // doesn't take a value.
  234. string value = 2;
  235. }
  236. // Initial sync flags for certain Cloud SQL APIs.
  237. // Currently used for the MySQL external server initial dump.
  238. message SyncFlags {
  239. // The name of the flag.
  240. string name = 1;
  241. // The value of the flag. This field must be omitted if the flag
  242. // doesn't take a value.
  243. string value = 2;
  244. }
  245. // Reference to another Cloud SQL instance.
  246. message InstanceReference {
  247. // The name of the Cloud SQL instance being referenced.
  248. // This does not include the project ID.
  249. string name = 1;
  250. // The region of the Cloud SQL instance being referenced.
  251. string region = 2;
  252. // The project ID of the Cloud SQL instance being referenced.
  253. // The default is the same project ID as the instance references it.
  254. string project = 3;
  255. }
  256. // A Cloud SQL instance resource.
  257. message DatabaseInstance {
  258. // The current serving state of the database instance.
  259. enum SqlInstanceState {
  260. // The state of the instance is unknown.
  261. SQL_INSTANCE_STATE_UNSPECIFIED = 0;
  262. // The instance is running, or has been stopped by owner.
  263. RUNNABLE = 1;
  264. // The instance is not available, for example due to problems with billing.
  265. SUSPENDED = 2;
  266. // The instance is being deleted.
  267. PENDING_DELETE = 3;
  268. // The instance is being created.
  269. PENDING_CREATE = 4;
  270. // The instance is down for maintenance.
  271. MAINTENANCE = 5;
  272. // The creation of the instance failed or a fatal error occurred during
  273. // maintenance.
  274. FAILED = 6;
  275. // Deprecated
  276. ONLINE_MAINTENANCE = 7 [deprecated = true];
  277. }
  278. message SqlFailoverReplica {
  279. // The name of the failover replica. If specified at instance creation, a
  280. // failover replica is created for the instance. The name
  281. // doesn't include the project ID.
  282. string name = 1;
  283. // The availability status of the failover replica. A false status indicates
  284. // that the failover replica is out of sync. The primary instance can only
  285. // failover to the failover replica when the status is true.
  286. google.protobuf.BoolValue available = 2;
  287. }
  288. // Any scheduled maintenance for this instance.
  289. message SqlScheduledMaintenance {
  290. // The start time of any upcoming scheduled maintenance for this instance.
  291. google.protobuf.Timestamp start_time = 1;
  292. bool can_defer = 2 [deprecated = true];
  293. // If the scheduled maintenance can be rescheduled.
  294. bool can_reschedule = 3;
  295. // Maintenance cannot be rescheduled to start beyond this deadline.
  296. optional google.protobuf.Timestamp schedule_deadline_time = 4;
  297. }
  298. // This message wraps up the information written by out-of-disk detection job.
  299. message SqlOutOfDiskReport {
  300. // This enum lists all possible states regarding out-of-disk issues.
  301. enum SqlOutOfDiskState {
  302. // Unspecified state
  303. SQL_OUT_OF_DISK_STATE_UNSPECIFIED = 0;
  304. // The instance has plenty space on data disk
  305. NORMAL = 1;
  306. // Data disk is almost used up. It is shutdown to prevent data
  307. // corruption.
  308. SOFT_SHUTDOWN = 2;
  309. }
  310. // This field represents the state generated by the proactive database
  311. // wellness job for OutOfDisk issues.
  312. // * Writers:
  313. // * the proactive database wellness job for OOD.
  314. // * Readers:
  315. // * the proactive database wellness job
  316. optional SqlOutOfDiskState sql_out_of_disk_state = 1;
  317. // The minimum recommended increase size in GigaBytes
  318. // This field is consumed by the frontend
  319. // * Writers:
  320. // * the proactive database wellness job for OOD.
  321. // * Readers:
  322. optional int32 sql_min_recommended_increase_size_gb = 2;
  323. }
  324. // This is always `sql#instance`.
  325. string kind = 1;
  326. // The current serving state of the Cloud SQL instance.
  327. SqlInstanceState state = 2;
  328. // The database engine type and version. The `databaseVersion` field cannot
  329. // be changed after instance creation.
  330. SqlDatabaseVersion database_version = 3;
  331. // The user settings.
  332. Settings settings = 4;
  333. // This field is deprecated and will be removed from a future version of the
  334. // API. Use the `settings.settingsVersion` field instead.
  335. string etag = 5;
  336. // The name and status of the failover replica.
  337. SqlFailoverReplica failover_replica = 6;
  338. // The name of the instance which will act as primary in the replication
  339. // setup.
  340. string master_instance_name = 7;
  341. // The replicas of the instance.
  342. repeated string replica_names = 8;
  343. // The maximum disk size of the instance in bytes.
  344. google.protobuf.Int64Value max_disk_size = 9 [deprecated = true];
  345. // The current disk usage of the instance in bytes. This property has been
  346. // deprecated. Use the
  347. // "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud
  348. // Monitoring API instead. Please see [this
  349. // announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ)
  350. // for details.
  351. google.protobuf.Int64Value current_disk_size = 10 [deprecated = true];
  352. // The assigned IP addresses for the instance.
  353. repeated IpMapping ip_addresses = 11;
  354. // SSL configuration.
  355. SslCert server_ca_cert = 12;
  356. // The instance type.
  357. SqlInstanceType instance_type = 13;
  358. // The project ID of the project containing the Cloud SQL instance. The Google
  359. // apps domain is prefixed if applicable.
  360. string project = 14;
  361. // The IPv6 address assigned to the instance.
  362. // (Deprecated) This property was applicable only
  363. // to First Generation instances.
  364. string ipv6_address = 15 [deprecated = true];
  365. // The service account email address assigned to the instance. \This
  366. // property is read-only.
  367. string service_account_email_address = 16;
  368. // Configuration specific to on-premises instances.
  369. OnPremisesConfiguration on_premises_configuration = 17;
  370. // Configuration specific to failover replicas and read replicas.
  371. ReplicaConfiguration replica_configuration = 18;
  372. // The backend type.
  373. // `SECOND_GEN`: Cloud SQL database instance.
  374. // `EXTERNAL`: A database server that is not managed by Google.
  375. //
  376. // This property is read-only; use the `tier` property in the `settings`
  377. // object to determine the database type.
  378. SqlBackendType backend_type = 19;
  379. // The URI of this resource.
  380. string self_link = 20;
  381. // If the instance state is SUSPENDED, the reason for the suspension.
  382. repeated SqlSuspensionReason suspension_reason = 21;
  383. // Connection name of the Cloud SQL instance used in connection strings.
  384. string connection_name = 22;
  385. // Name of the Cloud SQL instance. This does not include the project ID.
  386. string name = 23;
  387. // The geographical region. Can be:
  388. // * `us-central` (`FIRST_GEN` instances only)
  389. // * `us-central1` (`SECOND_GEN` instances only)
  390. // * `asia-east1` or `europe-west1`.
  391. //
  392. // Defaults to `us-central` or `us-central1` depending on the instance
  393. // type. The region cannot be changed after instance creation.
  394. string region = 24;
  395. // The Compute Engine zone that the instance is currently serving from. This
  396. // value could be different from the zone that was specified when the instance
  397. // was created if the instance has failed over to its secondary zone. WARNING:
  398. // Changing this might restart the instance.
  399. string gce_zone = 25;
  400. // The Compute Engine zone that the failover instance is currently serving
  401. // from for a regional instance. This value could be different
  402. // from the zone that was specified when the instance
  403. // was created if the instance has failed over to its secondary/failover zone.
  404. string secondary_gce_zone = 34;
  405. // Disk encryption configuration specific to an instance.
  406. DiskEncryptionConfiguration disk_encryption_configuration = 26;
  407. // Disk encryption status specific to an instance.
  408. DiskEncryptionStatus disk_encryption_status = 27;
  409. // Initial root password. Use only on creation.
  410. string root_password = 29;
  411. // The start time of any upcoming scheduled maintenance for this instance.
  412. SqlScheduledMaintenance scheduled_maintenance = 30;
  413. // The status indicating if instance satisfiesPzs.
  414. // Reserved for future use.
  415. google.protobuf.BoolValue satisfies_pzs = 35;
  416. // Output only. Stores the current database version running on the instance including
  417. // minor version such as `MYSQL_8_0_18`.
  418. string database_installed_version = 40 [(google.api.field_behavior) = OUTPUT_ONLY];
  419. // This field represents the report generated by the proactive database
  420. // wellness job for OutOfDisk issues.
  421. // * Writers:
  422. // * the proactive database wellness job for OOD.
  423. // * Readers:
  424. // * the proactive database wellness job
  425. optional SqlOutOfDiskReport out_of_disk_report = 38;
  426. // Output only. The time when the instance was created in
  427. // [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example
  428. // `2012-11-15T16:19:00.094Z`.
  429. google.protobuf.Timestamp create_time = 39 [(google.api.field_behavior) = OUTPUT_ONLY];
  430. // List all maintenance versions applicable on the instance
  431. repeated string available_maintenance_versions = 41;
  432. // The current software version on the instance.
  433. string maintenance_version = 42;
  434. }
  435. // Database list response.
  436. message DatabasesListResponse {
  437. // This is always `sql#databasesList`.
  438. string kind = 1;
  439. // List of database resources in the instance.
  440. repeated Database items = 2;
  441. }
  442. // Read-replica configuration for connecting to the on-premises primary
  443. // instance.
  444. message DemoteMasterConfiguration {
  445. // This is always `sql#demoteMasterConfiguration`.
  446. string kind = 1;
  447. // MySQL specific configuration when replicating from a MySQL on-premises
  448. // primary instance. Replication configuration information such as the
  449. // username, password, certificates, and keys are not stored in the instance
  450. // metadata. The configuration information is used only to set up the
  451. // replication connection and is stored by MySQL in a file named
  452. // `master.info` in the data directory.
  453. DemoteMasterMySqlReplicaConfiguration mysql_replica_configuration = 2;
  454. }
  455. // Database instance demote primary instance context.
  456. message DemoteMasterContext {
  457. // This is always `sql#demoteMasterContext`.
  458. string kind = 1;
  459. // Verify the GTID consistency for demote operation. Default value:
  460. // `True`. Setting this flag to `false` enables you to bypass the GTID
  461. // consistency check between on-premises primary instance and Cloud SQL
  462. // instance during the demotion operation but also exposes you to the risk of
  463. // future replication failures. Change the value only if you know the reason
  464. // for the GTID divergence and are confident that doing so will not cause any
  465. // replication issues.
  466. google.protobuf.BoolValue verify_gtid_consistency = 2;
  467. // The name of the instance which will act as on-premises primary instance
  468. // in the replication setup.
  469. string master_instance_name = 3;
  470. // Configuration specific to read-replicas replicating from the on-premises
  471. // primary instance.
  472. DemoteMasterConfiguration replica_configuration = 4;
  473. // Flag to skip replication setup on the instance.
  474. bool skip_replication_setup = 5;
  475. }
  476. // Read-replica configuration specific to MySQL databases.
  477. message DemoteMasterMySqlReplicaConfiguration {
  478. // This is always `sql#demoteMasterMysqlReplicaConfiguration`.
  479. string kind = 1;
  480. // The username for the replication connection.
  481. string username = 2;
  482. // The password for the replication connection.
  483. string password = 3;
  484. // PEM representation of the replica's private key. The corresponsing public
  485. // key is encoded in the client's certificate. The format of the replica's
  486. // private key can be either PKCS #1 or PKCS #8.
  487. string client_key = 4;
  488. // PEM representation of the replica's x509 certificate.
  489. string client_certificate = 5;
  490. // PEM representation of the trusted CA's x509 certificate.
  491. string ca_certificate = 6;
  492. }
  493. enum SqlFileType {
  494. // Unknown file type.
  495. SQL_FILE_TYPE_UNSPECIFIED = 0;
  496. // File containing SQL statements.
  497. SQL = 1;
  498. // File in CSV format.
  499. CSV = 2;
  500. BAK = 4;
  501. }
  502. // Database instance export context.
  503. message ExportContext {
  504. message SqlCsvExportOptions {
  505. // The select query used to extract the data.
  506. string select_query = 1;
  507. // Specifies the character that should appear before a data character that
  508. // needs to be escaped.
  509. string escape_character = 2;
  510. // Specifies the quoting character to be used when a data value is quoted.
  511. string quote_character = 3;
  512. // Specifies the character that separates columns within each row (line) of
  513. // the file.
  514. string fields_terminated_by = 4;
  515. // This is used to separate lines. If a line does not contain all fields,
  516. // the rest of the columns are set to their default values.
  517. string lines_terminated_by = 6;
  518. }
  519. message SqlExportOptions {
  520. // Options for exporting from MySQL.
  521. message MysqlExportOptions {
  522. // Option to include SQL statement required to set up replication. If set
  523. // to `1`, the dump file includes a CHANGE MASTER TO statement with the
  524. // binary log coordinates, and --set-gtid-purged is set to ON. If set to
  525. // `2`, the CHANGE MASTER TO statement is written as a SQL comment and
  526. // has no effect. If set to any value other than `1`, --set-gtid-purged
  527. // is set to OFF.
  528. google.protobuf.Int32Value master_data = 1;
  529. }
  530. // Tables to export, or that were exported, from the specified database. If
  531. // you specify tables, specify one and only one database. For PostgreSQL
  532. // instances, you can specify only one table.
  533. repeated string tables = 1;
  534. // Export only schemas.
  535. google.protobuf.BoolValue schema_only = 2;
  536. MysqlExportOptions mysql_export_options = 3;
  537. }
  538. // The path to the file in Google Cloud Storage where the export will be
  539. // stored. The URI is in the form `gs://bucketName/fileName`. If the file
  540. // already exists, the request succeeds, but the operation fails. If
  541. // `fileType` is `SQL` and the filename ends with .gz,
  542. // the contents are compressed.
  543. string uri = 1;
  544. // Databases to be exported. <br /> `MySQL instances:` If
  545. // `fileType` is `SQL` and no database is specified, all
  546. // databases are exported, except for the `mysql` system database.
  547. // If `fileType` is `CSV`, you can specify one database,
  548. // either by using this property or by using the
  549. // `csvExportOptions.selectQuery` property, which takes precedence
  550. // over this property. <br /> `PostgreSQL instances:` You must specify
  551. // one database to be exported. If `fileType` is `CSV`,
  552. // this database must match the one specified in the
  553. // `csvExportOptions.selectQuery` property. <br /> `SQL Server
  554. // instances:` You must specify one database to be exported, and the
  555. // `fileType` must be `BAK`.
  556. repeated string databases = 2;
  557. // This is always `sql#exportContext`.
  558. string kind = 3;
  559. // Options for exporting data as SQL statements.
  560. SqlExportOptions sql_export_options = 4;
  561. // Options for exporting data as CSV. `MySQL` and `PostgreSQL`
  562. // instances only.
  563. SqlCsvExportOptions csv_export_options = 5;
  564. // The file type for the specified uri.
  565. SqlFileType file_type = 6;
  566. // Option for export offload.
  567. google.protobuf.BoolValue offload = 8;
  568. }
  569. // Database instance failover context.
  570. message FailoverContext {
  571. // The current settings version of this instance. Request will be rejected if
  572. // this version doesn't match the current settings version.
  573. int64 settings_version = 1;
  574. // This is always `sql#failoverContext`.
  575. string kind = 2;
  576. }
  577. // A flag resource.
  578. message Flag {
  579. // This is the name of the flag. Flag names always use underscores, not
  580. // hyphens, for example: `max_allowed_packet`
  581. string name = 1;
  582. // The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`,
  583. // `INTEGER` or `NONE`. `NONE` is used for flags which do not take a
  584. // value, such as `skip_grant_tables`.
  585. SqlFlagType type = 2;
  586. // The database version this flag applies to. Can be
  587. // MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`,
  588. // or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`,
  589. // `POSTGRES_11` or `POSTGRES_12`. SQL Server instances:
  590. // `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`,
  591. // `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`,
  592. // `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or
  593. // `SQLSERVER_2019_WEB`.
  594. // See [the complete
  595. // list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).
  596. repeated SqlDatabaseVersion applies_to = 3;
  597. // For `STRING` flags, a list of strings that the value can be set to.
  598. repeated string allowed_string_values = 4;
  599. // For `INTEGER` flags, the minimum allowed value.
  600. google.protobuf.Int64Value min_value = 5;
  601. // For `INTEGER` flags, the maximum allowed value.
  602. google.protobuf.Int64Value max_value = 6;
  603. // Indicates whether changing this flag will trigger a database restart. Only
  604. // applicable to Second Generation instances.
  605. google.protobuf.BoolValue requires_restart = 7;
  606. // This is always `sql#flag`.
  607. string kind = 8;
  608. // Whether or not the flag is considered in beta.
  609. google.protobuf.BoolValue in_beta = 9;
  610. // Use this field if only certain integers are accepted. Can be combined
  611. // with min_value and max_value to add additional values.
  612. repeated int64 allowed_int_values = 10;
  613. }
  614. // Flags list response.
  615. message FlagsListResponse {
  616. // This is always `sql#flagsList`.
  617. string kind = 1;
  618. // List of flags.
  619. repeated Flag items = 2;
  620. }
  621. // Database instance import context.
  622. message ImportContext {
  623. message SqlCsvImportOptions {
  624. // The table to which CSV data is imported.
  625. string table = 1;
  626. // The columns to which CSV data is imported. If not specified, all columns
  627. // of the database table are loaded with CSV data.
  628. repeated string columns = 2;
  629. // Specifies the character that should appear before a data character that
  630. // needs to be escaped.
  631. string escape_character = 4;
  632. // Specifies the quoting character to be used when a data value is quoted.
  633. string quote_character = 5;
  634. // Specifies the character that separates columns within each row (line) of
  635. // the file.
  636. string fields_terminated_by = 6;
  637. // This is used to separate lines. If a line does not contain all fields,
  638. // the rest of the columns are set to their default values.
  639. string lines_terminated_by = 8;
  640. }
  641. message SqlBakImportOptions {
  642. message EncryptionOptions {
  643. // Path to the Certificate (.cer) in Cloud Storage, in the form
  644. // `gs://bucketName/fileName`. The instance must have write permissions
  645. // to the bucket and read access to the file.
  646. string cert_path = 1;
  647. // Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
  648. // form `gs://bucketName/fileName`. The instance must have write
  649. // permissions to the bucket and read access to the file.
  650. string pvk_path = 2;
  651. // Password that encrypts the private key
  652. string pvk_password = 3;
  653. }
  654. EncryptionOptions encryption_options = 1;
  655. }
  656. // Path to the import file in Cloud Storage, in the form
  657. // `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported
  658. // when `fileType` is `SQL`. The instance must have
  659. // write permissions to the bucket and read access to the file.
  660. string uri = 1;
  661. // The target database for the import. If `fileType` is `SQL`, this field
  662. // is required only if the import file does not specify a database, and is
  663. // overridden by any database specification in the import file. If
  664. // `fileType` is `CSV`, one database must be specified.
  665. string database = 2;
  666. // This is always `sql#importContext`.
  667. string kind = 3;
  668. // The file type for the specified uri.
  669. // * `SQL`: The file contains SQL statements.
  670. // * `CSV`: The file contains CSV data.
  671. // * `BAK`: The file contains backup data for a SQL Server instance.
  672. SqlFileType file_type = 4;
  673. // Options for importing data as CSV.
  674. SqlCsvImportOptions csv_import_options = 5;
  675. // The PostgreSQL user for this import operation. PostgreSQL instances only.
  676. string import_user = 6;
  677. // Import parameters specific to SQL Server .BAK files
  678. SqlBakImportOptions bak_import_options = 7;
  679. }
  680. // Database instance clone request.
  681. message InstancesCloneRequest {
  682. // Contains details about the clone operation.
  683. CloneContext clone_context = 1;
  684. }
  685. // Database demote primary instance request.
  686. message InstancesDemoteMasterRequest {
  687. // Contains details about the demoteMaster operation.
  688. DemoteMasterContext demote_master_context = 1;
  689. }
  690. // Database instance export request.
  691. message InstancesExportRequest {
  692. // Contains details about the export operation.
  693. ExportContext export_context = 1;
  694. }
  695. // Instance failover request.
  696. message InstancesFailoverRequest {
  697. // Failover Context.
  698. FailoverContext failover_context = 1;
  699. }
  700. // Database instance import request.
  701. message InstancesImportRequest {
  702. // Contains details about the import operation.
  703. ImportContext import_context = 1;
  704. }
  705. // MySQL-specific external server sync settings.
  706. message MySqlSyncConfig {
  707. // Flags to use for the initial dump.
  708. repeated SyncFlags initial_sync_flags = 1;
  709. }
  710. // Database instances list response.
  711. message InstancesListResponse {
  712. // This is always `sql#instancesList`.
  713. string kind = 1;
  714. // List of warnings that occurred while handling the request.
  715. repeated ApiWarning warnings = 2;
  716. // List of database instance resources.
  717. repeated DatabaseInstance items = 3;
  718. // The continuation token, used to page through large result sets. Provide
  719. // this value in a subsequent request to return the next page of results.
  720. string next_page_token = 4;
  721. }
  722. // Instances ListServerCas response.
  723. message InstancesListServerCasResponse {
  724. // List of server CA certificates for the instance.
  725. repeated SslCert certs = 1;
  726. string active_version = 2;
  727. // This is always `sql#instancesListServerCas`.
  728. string kind = 3;
  729. }
  730. // Database instance restore backup request.
  731. message InstancesRestoreBackupRequest {
  732. // Parameters required to perform the restore backup operation.
  733. RestoreBackupContext restore_backup_context = 1;
  734. }
  735. // Rotate Server CA request.
  736. message InstancesRotateServerCaRequest {
  737. // Contains details about the rotate server CA operation.
  738. RotateServerCaContext rotate_server_ca_context = 1;
  739. }
  740. // Instance truncate log request.
  741. message InstancesTruncateLogRequest {
  742. // Contains details about the truncate log operation.
  743. TruncateLogContext truncate_log_context = 1;
  744. }
  745. // Instance verify external sync settings response.
  746. message SqlInstancesVerifyExternalSyncSettingsResponse {
  747. // This is always `sql#migrationSettingErrorList`.
  748. string kind = 1;
  749. // List of migration violations.
  750. repeated SqlExternalSyncSettingError errors = 2;
  751. // List of migration warnings.
  752. repeated SqlExternalSyncSettingError warnings = 3;
  753. }
  754. // External primary instance migration setting error/warning.
  755. message SqlExternalSyncSettingError {
  756. enum SqlExternalSyncSettingErrorType {
  757. SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED = 0;
  758. CONNECTION_FAILURE = 1;
  759. BINLOG_NOT_ENABLED = 2;
  760. INCOMPATIBLE_DATABASE_VERSION = 3;
  761. REPLICA_ALREADY_SETUP = 4;
  762. INSUFFICIENT_PRIVILEGE = 5;
  763. // Unsupported migration type.
  764. UNSUPPORTED_MIGRATION_TYPE = 6;
  765. // No pglogical extension installed on databases, applicable for postgres.
  766. NO_PGLOGICAL_INSTALLED = 7;
  767. // pglogical node already exists on databases, applicable for postgres.
  768. PGLOGICAL_NODE_ALREADY_EXISTS = 8;
  769. // The value of parameter wal_level is not set to logical.
  770. INVALID_WAL_LEVEL = 9;
  771. // The value of parameter shared_preload_libraries does not include
  772. // pglogical.
  773. INVALID_SHARED_PRELOAD_LIBRARY = 10;
  774. // The value of parameter max_replication_slots is not sufficient.
  775. INSUFFICIENT_MAX_REPLICATION_SLOTS = 11;
  776. // The value of parameter max_wal_senders is not sufficient.
  777. INSUFFICIENT_MAX_WAL_SENDERS = 12;
  778. // The value of parameter max_worker_processes is not sufficient.
  779. INSUFFICIENT_MAX_WORKER_PROCESSES = 13;
  780. // Extensions installed are either not supported or having unsupported
  781. // versions
  782. UNSUPPORTED_EXTENSIONS = 14;
  783. // The value of parameter rds.logical_replication is not set to 1.
  784. INVALID_RDS_LOGICAL_REPLICATION = 15;
  785. // The primary instance logging setup doesn't allow EM sync.
  786. INVALID_LOGGING_SETUP = 16;
  787. // The primary instance database parameter setup doesn't allow EM sync.
  788. INVALID_DB_PARAM = 17;
  789. // The gtid_mode is not supported, applicable for MySQL.
  790. UNSUPPORTED_GTID_MODE = 18;
  791. // SQL Server Agent is not running.
  792. SQLSERVER_AGENT_NOT_RUNNING = 19;
  793. // The table definition is not support due to missing primary key or replica
  794. // identity, applicable for postgres.
  795. UNSUPPORTED_TABLE_DEFINITION = 20;
  796. // The customer has a definer that will break EM setup.
  797. UNSUPPORTED_DEFINER = 21;
  798. // SQL Server @@SERVERNAME does not match actual host name
  799. SQLSERVER_SERVERNAME_MISMATCH = 22;
  800. // The primary instance has been setup and will fail the setup.
  801. PRIMARY_ALREADY_SETUP = 23;
  802. // The primary instance has unsupported binary log format.
  803. UNSUPPORTED_BINLOG_FORMAT = 24;
  804. // The primary instance's binary log retention setting.
  805. BINLOG_RETENTION_SETTING = 25;
  806. // The primary instance has tables with unsupported storage engine.
  807. UNSUPPORTED_STORAGE_ENGINE = 26;
  808. }
  809. // Can be `sql#externalSyncSettingError` or
  810. // `sql#externalSyncSettingWarning`.
  811. string kind = 1;
  812. // Identifies the specific error that occurred.
  813. SqlExternalSyncSettingErrorType type = 2;
  814. // Additional information about the error encountered.
  815. string detail = 3;
  816. }
  817. // IP Management configuration.
  818. message IpConfiguration {
  819. // Whether the instance is assigned a public IP address or not.
  820. google.protobuf.BoolValue ipv4_enabled = 1;
  821. // The resource link for the VPC network from which the Cloud SQL instance is
  822. // accessible for private IP. For example,
  823. // `/projects/myProject/global/networks/default`. This setting can
  824. // be updated, but it cannot be removed after it is set.
  825. string private_network = 2;
  826. // Whether SSL connections over IP are enforced or not.
  827. google.protobuf.BoolValue require_ssl = 3;
  828. // The list of external networks that are allowed to connect to the instance
  829. // using the IP. In 'CIDR' notation, also known as 'slash' notation (for
  830. // example: `157.197.200.0/24`).
  831. repeated AclEntry authorized_networks = 4;
  832. // The name of the allocated ip range for the private ip CloudSQL instance.
  833. // For example: "google-managed-services-default". If set, the instance ip
  834. // will be created in the allocated range. The range name must comply with
  835. // [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name
  836. // must be 1-63 characters long and match the regular expression
  837. // `[a-z]([-a-z0-9]*[a-z0-9])?.`
  838. string allocated_ip_range = 6;
  839. }
  840. // Database instance IP Mapping.
  841. message IpMapping {
  842. // The type of this IP address. A `PRIMARY` address is a public address that
  843. // can accept incoming connections. A `PRIVATE` address is a private address
  844. // that can accept incoming connections. An `OUTGOING` address is the source
  845. // address of connections originating from the instance, if supported.
  846. SqlIpAddressType type = 1;
  847. // The IP address assigned.
  848. string ip_address = 2;
  849. // The due time for this IP to be retired in
  850. // [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example
  851. // `2012-11-15T16:19:00.094Z`. This field is only available when
  852. // the IP is scheduled to be retired.
  853. google.protobuf.Timestamp time_to_retire = 3;
  854. }
  855. // Preferred location. This specifies where a Cloud SQL instance is located.
  856. // Note that if the preferred location is not available, the instance will be
  857. // located as close as possible within the region. Only one location may be
  858. // specified.
  859. message LocationPreference {
  860. // The App Engine application to follow, it must be in the same region as the
  861. // Cloud SQL instance. WARNING: Changing this might restart the instance.
  862. string follow_gae_application = 1 [deprecated = true];
  863. // The preferred Compute Engine zone (for example: us-central1-a,
  864. // us-central1-b, etc.). WARNING: Changing this might restart the instance.
  865. string zone = 2;
  866. // The preferred Compute Engine zone for the secondary/failover
  867. // (for example: us-central1-a, us-central1-b, etc.).
  868. string secondary_zone = 4;
  869. // This is always `sql#locationPreference`.
  870. string kind = 3;
  871. }
  872. // Maintenance window. This specifies when a Cloud SQL instance
  873. // is restarted for system maintenance purposes.
  874. message MaintenanceWindow {
  875. // hour of day - 0 to 23.
  876. google.protobuf.Int32Value hour = 1;
  877. // day of week (1-7), starting on Monday.
  878. google.protobuf.Int32Value day = 2;
  879. // Maintenance timing setting: `canary` (Earlier) or `stable` (Later).
  880. // [Learn
  881. // more](https://cloud.google.com/sql/docs/mysql/instance-settings#maintenance-timing-2ndgen).
  882. SqlUpdateTrack update_track = 3;
  883. // This is always `sql#maintenanceWindow`.
  884. string kind = 4;
  885. }
  886. // Deny Maintenance Periods. This specifies a date range during when all CSA
  887. // rollout will be denied.
  888. message DenyMaintenancePeriod {
  889. // "deny maintenance period" start date. If the year of the start date is
  890. // empty, the year of the end date also must be empty. In this case, it means
  891. // the deny maintenance period recurs every year. The date is in format
  892. // yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
  893. string start_date = 1;
  894. // "deny maintenance period" end date. If the year of the end date is empty,
  895. // the year of the start date also must be empty. In this case, it means the
  896. // deny maintenance period recurs every year. The date is in format yyyy-mm-dd
  897. // i.e., 2020-11-01, or mm-dd, i.e., 11-01
  898. string end_date = 2;
  899. // Time in UTC when the "deny maintenance period" starts on start_date and
  900. // ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00
  901. string time = 3;
  902. }
  903. // Insights configuration. This specifies when Cloud SQL Insights feature is
  904. // enabled and optional configuration.
  905. message InsightsConfig {
  906. // Whether Query Insights feature is enabled.
  907. bool query_insights_enabled = 1;
  908. // Whether Query Insights will record client address when enabled.
  909. bool record_client_address = 2;
  910. // Whether Query Insights will record application tags from query when
  911. // enabled.
  912. bool record_application_tags = 3;
  913. // Maximum query length stored in bytes. Default value: 1024 bytes.
  914. // Range: 256-4500 bytes. Query length more than this field value will be
  915. // truncated to this value. When unset, query length will be the default
  916. // value. Changing query length will restart the database.
  917. google.protobuf.Int32Value query_string_length = 4;
  918. // Number of query execution plans captured by Insights per minute
  919. // for all queries combined. Default is 5.
  920. google.protobuf.Int32Value query_plans_per_minute = 5;
  921. }
  922. // Read-replica configuration specific to MySQL databases.
  923. message MySqlReplicaConfiguration {
  924. // Path to a SQL dump file in Google Cloud Storage from which the replica
  925. // instance is to be created. The URI is in the form gs://bucketName/fileName.
  926. // Compressed gzip files (.gz) are also supported.
  927. // Dumps have the binlog co-ordinates from which replication
  928. // begins. This can be accomplished by setting --master-data to 1 when using
  929. // mysqldump.
  930. string dump_file_path = 1;
  931. // The username for the replication connection.
  932. string username = 2;
  933. // The password for the replication connection.
  934. string password = 3;
  935. // Seconds to wait between connect retries. MySQL's default is 60 seconds.
  936. google.protobuf.Int32Value connect_retry_interval = 4;
  937. // Interval in milliseconds between replication heartbeats.
  938. google.protobuf.Int64Value master_heartbeat_period = 5;
  939. // PEM representation of the trusted CA's x509 certificate.
  940. string ca_certificate = 6;
  941. // PEM representation of the replica's x509 certificate.
  942. string client_certificate = 7;
  943. // PEM representation of the replica's private key. The corresponsing public
  944. // key is encoded in the client's certificate.
  945. string client_key = 8;
  946. // A list of permissible ciphers to use for SSL encryption.
  947. string ssl_cipher = 9;
  948. // Whether or not to check the primary instance's Common Name value in the
  949. // certificate that it sends during the SSL handshake.
  950. google.protobuf.BoolValue verify_server_certificate = 10;
  951. // This is always `sql#mysqlReplicaConfiguration`.
  952. string kind = 11;
  953. }
  954. // On-premises instance configuration.
  955. message OnPremisesConfiguration {
  956. // The host and port of the on-premises instance in host:port format
  957. string host_port = 1;
  958. // This is always `sql#onPremisesConfiguration`.
  959. string kind = 2;
  960. // The username for connecting to on-premises instance.
  961. string username = 3;
  962. // The password for connecting to on-premises instance.
  963. string password = 4;
  964. // PEM representation of the trusted CA's x509 certificate.
  965. string ca_certificate = 5;
  966. // PEM representation of the replica's x509 certificate.
  967. string client_certificate = 6;
  968. // PEM representation of the replica's private key. The corresponsing public
  969. // key is encoded in the client's certificate.
  970. string client_key = 7;
  971. // The dump file to create the Cloud SQL replica.
  972. string dump_file_path = 8;
  973. // The reference to Cloud SQL instance if the source is Cloud SQL.
  974. InstanceReference source_instance = 15;
  975. }
  976. // Disk encryption configuration for an instance.
  977. message DiskEncryptionConfiguration {
  978. // Resource name of KMS key for disk encryption
  979. string kms_key_name = 1;
  980. // This is always `sql#diskEncryptionConfiguration`.
  981. string kind = 2;
  982. }
  983. // Disk encryption status for an instance.
  984. message DiskEncryptionStatus {
  985. // KMS key version used to encrypt the Cloud SQL instance resource
  986. string kms_key_version_name = 1;
  987. // This is always `sql#diskEncryptionStatus`.
  988. string kind = 2;
  989. }
  990. // An Operation resource.&nbsp;For successful operations that return an
  991. // Operation resource, only the fields relevant to the operation are populated
  992. // in the resource.
  993. message Operation {
  994. // The type of Cloud SQL operation.
  995. enum SqlOperationType {
  996. // Unknown operation type.
  997. SQL_OPERATION_TYPE_UNSPECIFIED = 0;
  998. // Imports data into a Cloud SQL instance.
  999. IMPORT = 1;
  1000. // Exports data from a Cloud SQL instance to a Cloud Storage
  1001. // bucket.
  1002. EXPORT = 2;
  1003. // Creates a new Cloud SQL instance.
  1004. CREATE = 3;
  1005. // Updates the settings of a Cloud SQL instance.
  1006. UPDATE = 4;
  1007. // Deletes a Cloud SQL instance.
  1008. DELETE = 5;
  1009. // Restarts the Cloud SQL instance.
  1010. RESTART = 6;
  1011. BACKUP = 7 [deprecated = true];
  1012. SNAPSHOT = 8 [deprecated = true];
  1013. // Performs instance backup.
  1014. BACKUP_VOLUME = 9;
  1015. // Deletes an instance backup.
  1016. DELETE_VOLUME = 10;
  1017. // Restores an instance backup.
  1018. RESTORE_VOLUME = 11;
  1019. // Injects a privileged user in mysql for MOB instances.
  1020. INJECT_USER = 12;
  1021. // Clones a Cloud SQL instance.
  1022. CLONE = 14;
  1023. // Stops replication on a Cloud SQL read replica instance.
  1024. STOP_REPLICA = 15;
  1025. // Starts replication on a Cloud SQL read replica instance.
  1026. START_REPLICA = 16;
  1027. // Promotes a Cloud SQL replica instance.
  1028. PROMOTE_REPLICA = 17;
  1029. // Creates a Cloud SQL replica instance.
  1030. CREATE_REPLICA = 18;
  1031. // Creates a new user in a Cloud SQL instance.
  1032. CREATE_USER = 19;
  1033. // Deletes a user from a Cloud SQL instance.
  1034. DELETE_USER = 20;
  1035. // Updates an existing user in a Cloud SQL instance.
  1036. UPDATE_USER = 21;
  1037. // Creates a database in the Cloud SQL instance.
  1038. CREATE_DATABASE = 22;
  1039. // Deletes a database in the Cloud SQL instance.
  1040. DELETE_DATABASE = 23;
  1041. // Updates a database in the Cloud SQL instance.
  1042. UPDATE_DATABASE = 24;
  1043. // Performs failover of an HA-enabled Cloud SQL
  1044. // failover replica.
  1045. FAILOVER = 25;
  1046. // Deletes the backup taken by a backup run.
  1047. DELETE_BACKUP = 26;
  1048. RECREATE_REPLICA = 27;
  1049. // Truncates a general or slow log table in MySQL.
  1050. TRUNCATE_LOG = 28;
  1051. // Demotes the stand-alone instance to be a Cloud SQL
  1052. // read replica for an external database server.
  1053. DEMOTE_MASTER = 29;
  1054. // Indicates that the instance is currently in maintenance. Maintenance
  1055. // typically causes the instance to be unavailable for 1-3 minutes.
  1056. MAINTENANCE = 30;
  1057. // This field is deprecated, and will be removed in future version of API.
  1058. ENABLE_PRIVATE_IP = 31 [deprecated = true];
  1059. DEFER_MAINTENANCE = 32 [deprecated = true];
  1060. // Creates clone instance.
  1061. CREATE_CLONE = 33 [deprecated = true];
  1062. // Reschedule maintenance to another time.
  1063. RESCHEDULE_MAINTENANCE = 34;
  1064. // Starts external sync of a Cloud SQL EM replica to an external primary
  1065. // instance.
  1066. START_EXTERNAL_SYNC = 35;
  1067. }
  1068. // The status of an operation.
  1069. enum SqlOperationStatus {
  1070. // The state of the operation is unknown.
  1071. SQL_OPERATION_STATUS_UNSPECIFIED = 0;
  1072. // The operation has been queued, but has not started yet.
  1073. PENDING = 1;
  1074. // The operation is running.
  1075. RUNNING = 2;
  1076. // The operation completed.
  1077. DONE = 3;
  1078. }
  1079. // This is always `sql#operation`.
  1080. string kind = 1;
  1081. string target_link = 2;
  1082. // The status of an operation.
  1083. SqlOperationStatus status = 3;
  1084. // The email address of the user who initiated this operation.
  1085. string user = 4;
  1086. // The time this operation was enqueued in UTC timezone in
  1087. // [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example
  1088. // `2012-11-15T16:19:00.094Z`.
  1089. google.protobuf.Timestamp insert_time = 5;
  1090. // The time this operation actually started in UTC timezone in
  1091. // [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example
  1092. // `2012-11-15T16:19:00.094Z`.
  1093. google.protobuf.Timestamp start_time = 6;
  1094. // The time this operation finished in UTC timezone in
  1095. // [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example
  1096. // `2012-11-15T16:19:00.094Z`.
  1097. google.protobuf.Timestamp end_time = 7;
  1098. // If errors occurred during processing of this operation, this field will be
  1099. // populated.
  1100. OperationErrors error = 8;
  1101. // The type of the operation. Valid values are:
  1102. // * `CREATE`
  1103. // * `DELETE`
  1104. // * `UPDATE`
  1105. // * `RESTART`
  1106. // * `IMPORT`
  1107. // * `EXPORT`
  1108. // * `BACKUP_VOLUME`
  1109. // * `RESTORE_VOLUME`
  1110. // * `CREATE_USER`
  1111. // * `DELETE_USER`
  1112. // * `CREATE_DATABASE`
  1113. // * `DELETE_DATABASE`
  1114. SqlOperationType operation_type = 9;
  1115. // The context for import operation, if applicable.
  1116. ImportContext import_context = 10;
  1117. // The context for export operation, if applicable.
  1118. ExportContext export_context = 11;
  1119. // The context for backup operation, if applicable.
  1120. BackupContext backup_context = 17;
  1121. // An identifier that uniquely identifies the operation. You can use this
  1122. // identifier to retrieve the Operations resource that has information about
  1123. // the operation.
  1124. string name = 12;
  1125. // Name of the database instance related to this operation.
  1126. string target_id = 13;
  1127. // The URI of this resource.
  1128. string self_link = 14;
  1129. // The project ID of the target instance related to this operation.
  1130. string target_project = 15;
  1131. }
  1132. // Database instance operation error.
  1133. message OperationError {
  1134. // This is always `sql#operationError`.
  1135. string kind = 1;
  1136. // Identifies the specific error that occurred.
  1137. string code = 2;
  1138. // Additional information about the error encountered.
  1139. string message = 3;
  1140. }
  1141. // Database instance operation errors list wrapper.
  1142. message OperationErrors {
  1143. // This is always `sql#operationErrors`.
  1144. string kind = 1;
  1145. // The list of errors encountered while processing this operation.
  1146. repeated OperationError errors = 2;
  1147. }
  1148. // Database instance local user password validation policy
  1149. message PasswordValidationPolicy {
  1150. // The complexity choices of the password.
  1151. enum Complexity {
  1152. // Complexity check is not specified.
  1153. COMPLEXITY_UNSPECIFIED = 0;
  1154. // A combination of lowercase, uppercase, numeric, and non-alphanumeric
  1155. // characters.
  1156. COMPLEXITY_DEFAULT = 1;
  1157. }
  1158. // Minimum number of characters allowed.
  1159. google.protobuf.Int32Value min_length = 1;
  1160. // The complexity of the password.
  1161. Complexity complexity = 2;
  1162. // Number of previous passwords that cannot be reused.
  1163. google.protobuf.Int32Value reuse_interval = 3;
  1164. // Disallow username as a part of the password.
  1165. google.protobuf.BoolValue disallow_username_substring = 4;
  1166. // Minimum interval after which the password can be changed. This flag is only
  1167. // supported for PostgresSQL.
  1168. google.protobuf.Duration password_change_interval = 5;
  1169. // Whether the password policy is enabled or not.
  1170. google.protobuf.BoolValue enable_password_policy = 6;
  1171. }
  1172. // Operations list response.
  1173. message OperationsListResponse {
  1174. // This is always `sql#operationsList`.
  1175. string kind = 1;
  1176. // List of operation resources.
  1177. repeated Operation items = 2;
  1178. // The continuation token, used to page through large result sets. Provide
  1179. // this value in a subsequent request to return the next page of results.
  1180. string next_page_token = 3;
  1181. }
  1182. // Read-replica configuration for connecting to the primary instance.
  1183. message ReplicaConfiguration {
  1184. // This is always `sql#replicaConfiguration`.
  1185. string kind = 1;
  1186. // MySQL specific configuration when replicating from a MySQL on-premises
  1187. // primary instance. Replication configuration information such as the
  1188. // username, password, certificates, and keys are not stored in the instance
  1189. // metadata. The configuration information is used only to set up the
  1190. // replication connection and is stored by MySQL in a file named
  1191. // `master.info` in the data directory.
  1192. MySqlReplicaConfiguration mysql_replica_configuration = 2;
  1193. // Specifies if the replica is the failover target. If the field is set to
  1194. // `true` the replica will be designated as a failover replica. In case the
  1195. // primary instance fails, the replica instance will be promoted as the new
  1196. // primary instance. Only one replica can be specified as failover target, and
  1197. // the replica has to be in different zone with the primary instance.
  1198. google.protobuf.BoolValue failover_target = 3;
  1199. }
  1200. // Database instance restore from backup context.
  1201. // Backup context contains source instance id and project id.
  1202. message RestoreBackupContext {
  1203. // This is always `sql#restoreBackupContext`.
  1204. string kind = 1;
  1205. // The ID of the backup run to restore from.
  1206. int64 backup_run_id = 2;
  1207. // The ID of the instance that the backup was taken from.
  1208. string instance_id = 3;
  1209. // The full project ID of the source instance.
  1210. string project = 4;
  1211. }
  1212. // Instance rotate server CA context.
  1213. message RotateServerCaContext {
  1214. // This is always `sql#rotateServerCaContext`.
  1215. string kind = 1;
  1216. // The fingerprint of the next version to be rotated to. If left unspecified,
  1217. // will be rotated to the most recently added server CA version.
  1218. string next_version = 2;
  1219. }
  1220. // Database instance settings.
  1221. message Settings {
  1222. // Specifies when the instance is activated.
  1223. enum SqlActivationPolicy {
  1224. // Unknown activation plan.
  1225. SQL_ACTIVATION_POLICY_UNSPECIFIED = 0;
  1226. // The instance is always up and running.
  1227. ALWAYS = 1;
  1228. // The instance never starts.
  1229. NEVER = 2;
  1230. // The instance starts upon receiving requests.
  1231. ON_DEMAND = 3 [deprecated = true];
  1232. }
  1233. // The version of instance settings. This is a required field for update
  1234. // method to make sure concurrent updates are handled properly. During update,
  1235. // use the most recent settingsVersion value for this instance and do not try
  1236. // to update this value.
  1237. google.protobuf.Int64Value settings_version = 1;
  1238. // The App Engine app IDs that can access this instance.
  1239. // (Deprecated) Applied to First Generation instances only.
  1240. repeated string authorized_gae_applications = 2 [deprecated = true];
  1241. // The tier (or machine type) for this instance, for example
  1242. // `db-custom-1-3840`. WARNING: Changing this restarts the instance.
  1243. string tier = 3;
  1244. // This is always `sql#settings`.
  1245. string kind = 4;
  1246. // User-provided labels, represented as a dictionary where each label is a
  1247. // single key value pair.
  1248. map<string, string> user_labels = 5;
  1249. // Availability type. Potential values:
  1250. // * `ZONAL`: The instance serves data from only one zone. Outages in that
  1251. // zone affect data accessibility.
  1252. // * `REGIONAL`: The instance can serve data from more than one zone in a
  1253. // region (it is highly available)./
  1254. //
  1255. // For more information, see [Overview of the High Availability
  1256. // Configuration](https://cloud.google.com/sql/docs/mysql/high-availability).
  1257. SqlAvailabilityType availability_type = 6;
  1258. // The pricing plan for this instance. This can be either `PER_USE` or
  1259. // `PACKAGE`. Only `PER_USE` is supported for Second Generation instances.
  1260. SqlPricingPlan pricing_plan = 7;
  1261. // The type of replication this instance uses. This can be either
  1262. // `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only
  1263. // applicable to First Generation instances.
  1264. SqlReplicationType replication_type = 8 [deprecated = true];
  1265. // The maximum size to which storage capacity can be automatically increased.
  1266. // The default value is 0, which specifies that there is no limit.
  1267. google.protobuf.Int64Value storage_auto_resize_limit = 9;
  1268. // The activation policy specifies when the instance is activated; it is
  1269. // applicable only when the instance state is RUNNABLE. Valid values:
  1270. // * `ALWAYS`: The instance is on, and remains so even in the absence of
  1271. // connection requests.
  1272. // * `NEVER`: The instance is off; it is not activated, even if a
  1273. // connection request arrives.
  1274. SqlActivationPolicy activation_policy = 10;
  1275. // The settings for IP Management. This allows to enable or disable the
  1276. // instance IP and manage which external networks can connect to the instance.
  1277. // The IPv4 address cannot be disabled for Second Generation instances.
  1278. IpConfiguration ip_configuration = 11;
  1279. // Configuration to increase storage size automatically. The default value is
  1280. // true.
  1281. google.protobuf.BoolValue storage_auto_resize = 12;
  1282. // The location preference settings. This allows the instance to be located as
  1283. // near as possible to either an App Engine app or Compute Engine zone for
  1284. // better performance. App Engine co-location was only applicable to First
  1285. // Generation instances.
  1286. LocationPreference location_preference = 13;
  1287. // The database flags passed to the instance at startup.
  1288. repeated DatabaseFlags database_flags = 14;
  1289. // The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for
  1290. // First Generation instances.
  1291. SqlDataDiskType data_disk_type = 15;
  1292. // The maintenance window for this instance. This specifies when the instance
  1293. // can be restarted for maintenance purposes.
  1294. MaintenanceWindow maintenance_window = 16;
  1295. // The daily backup configuration for the instance.
  1296. BackupConfiguration backup_configuration = 17;
  1297. // Configuration specific to read replica instances. Indicates whether
  1298. // replication is enabled or not. WARNING: Changing this restarts the
  1299. // instance.
  1300. google.protobuf.BoolValue database_replication_enabled = 18;
  1301. // Configuration specific to read replica instances. Indicates whether
  1302. // database flags for crash-safe replication are enabled. This property was
  1303. // only applicable to First Generation instances.
  1304. google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true];
  1305. // The size of data disk, in GB. The data disk size minimum is 10GB.
  1306. google.protobuf.Int64Value data_disk_size_gb = 20;
  1307. // Active Directory configuration, relevant only for Cloud SQL for SQL Server.
  1308. SqlActiveDirectoryConfig active_directory_config = 22;
  1309. // The name of server Instance collation.
  1310. string collation = 23;
  1311. // Deny maintenance periods
  1312. repeated DenyMaintenancePeriod deny_maintenance_periods = 24;
  1313. // Insights configuration, for now relevant only for Postgres.
  1314. InsightsConfig insights_config = 25;
  1315. // The local user password validation policy of the instance.
  1316. PasswordValidationPolicy password_validation_policy = 27;
  1317. // SQL Server specific audit configuration.
  1318. SqlServerAuditConfig sql_server_audit_config = 29;
  1319. }
  1320. // SslCerts Resource
  1321. message SslCert {
  1322. // This is always `sql#sslCert`.
  1323. string kind = 1;
  1324. // Serial number, as extracted from the certificate.
  1325. string cert_serial_number = 2;
  1326. // PEM representation.
  1327. string cert = 3;
  1328. // The time when the certificate was created in
  1329. // [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example
  1330. // `2012-11-15T16:19:00.094Z`.
  1331. google.protobuf.Timestamp create_time = 4;
  1332. // User supplied name. Constrained to [a-zA-Z.-_ ]+.
  1333. string common_name = 5;
  1334. // The time when the certificate expires in
  1335. // [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example
  1336. // `2012-11-15T16:19:00.094Z`.
  1337. google.protobuf.Timestamp expiration_time = 6;
  1338. // Sha1 Fingerprint.
  1339. string sha1_fingerprint = 7;
  1340. // Name of the database instance.
  1341. string instance = 8;
  1342. // The URI of this resource.
  1343. string self_link = 9;
  1344. }
  1345. // SslCertDetail.
  1346. message SslCertDetail {
  1347. // The public information about the cert.
  1348. SslCert cert_info = 1;
  1349. // The private key for the client cert, in pem format. Keep private in order
  1350. // to protect your security.
  1351. string cert_private_key = 2;
  1352. }
  1353. // SslCerts create ephemeral certificate request.
  1354. message SslCertsCreateEphemeralRequest {
  1355. // PEM encoded public key to include in the signed certificate.
  1356. string public_key = 1;
  1357. // Access token to include in the signed certificate.
  1358. string access_token = 2;
  1359. }
  1360. // SslCerts insert request.
  1361. message SslCertsInsertRequest {
  1362. // User supplied name. Must be a distinct name from the other certificates
  1363. // for this instance.
  1364. string common_name = 1;
  1365. }
  1366. // Reschedule options for maintenance windows.
  1367. message SqlInstancesRescheduleMaintenanceRequestBody {
  1368. enum RescheduleType {
  1369. RESCHEDULE_TYPE_UNSPECIFIED = 0;
  1370. // Reschedules maintenance to happen now (within 5 minutes).
  1371. IMMEDIATE = 1;
  1372. // Reschedules maintenance to occur within one week from the originally
  1373. // scheduled day and time.
  1374. NEXT_AVAILABLE_WINDOW = 2;
  1375. // Reschedules maintenance to a specific time and day.
  1376. SPECIFIC_TIME = 3;
  1377. }
  1378. message Reschedule {
  1379. // Required. The type of the reschedule.
  1380. RescheduleType reschedule_type = 1;
  1381. // Optional. Timestamp when the maintenance shall be rescheduled to if
  1382. // reschedule_type=SPECIFIC_TIME, in
  1383. // [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example
  1384. // `2012-11-15T16:19:00.094Z`.
  1385. google.protobuf.Timestamp schedule_time = 2 [(google.api.field_behavior) = OPTIONAL];
  1386. }
  1387. // Required. The type of the reschedule the user wants.
  1388. Reschedule reschedule = 3;
  1389. }
  1390. // SslCert insert response.
  1391. message SslCertsInsertResponse {
  1392. // This is always `sql#sslCertsInsert`.
  1393. string kind = 1;
  1394. // The operation to track the ssl certs insert request.
  1395. Operation operation = 2;
  1396. // The server Certificate Authority's certificate. If this is missing you can
  1397. // force a new one to be generated by calling resetSslConfig method on
  1398. // instances resource.
  1399. SslCert server_ca_cert = 3;
  1400. // The new client certificate and private key.
  1401. SslCertDetail client_cert = 4;
  1402. }
  1403. // SslCerts list response.
  1404. message SslCertsListResponse {
  1405. // This is always `sql#sslCertsList`.
  1406. string kind = 1;
  1407. // List of client certificates for the instance.
  1408. repeated SslCert items = 2;
  1409. }
  1410. // Database Instance truncate log context.
  1411. message TruncateLogContext {
  1412. // This is always `sql#truncateLogContext`.
  1413. string kind = 1;
  1414. // The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and
  1415. // `MYSQL_SLOW_TABLE`.
  1416. string log_type = 2;
  1417. }
  1418. // Active Directory configuration, relevant only for Cloud SQL for SQL Server.
  1419. message SqlActiveDirectoryConfig {
  1420. // This is always sql#activeDirectoryConfig.
  1421. string kind = 1;
  1422. // The name of the domain (e.g., mydomain.com).
  1423. string domain = 2;
  1424. }
  1425. // SQL Server specific audit configuration.
  1426. message SqlServerAuditConfig {
  1427. // This is always sql#sqlServerAuditConfig
  1428. string kind = 1;
  1429. // The name of the destination bucket (e.g., gs://mybucket).
  1430. string bucket = 2;
  1431. // How long to keep generated audit files.
  1432. google.protobuf.Duration retention_interval = 3;
  1433. // How often to upload generated audit files.
  1434. google.protobuf.Duration upload_interval = 4;
  1435. }
  1436. // The status of a backup run.
  1437. enum SqlBackupRunStatus {
  1438. // The status of the run is unknown.
  1439. SQL_BACKUP_RUN_STATUS_UNSPECIFIED = 0;
  1440. // The backup operation was enqueued.
  1441. ENQUEUED = 1;
  1442. // The backup is overdue across a given backup window. Indicates a
  1443. // problem. Example: Long-running operation in progress during
  1444. // the whole window.
  1445. OVERDUE = 2;
  1446. // The backup is in progress.
  1447. RUNNING = 3;
  1448. // The backup failed.
  1449. FAILED = 4;
  1450. // The backup was successful.
  1451. SUCCESSFUL = 5;
  1452. // The backup was skipped (without problems) for a given backup
  1453. // window. Example: Instance was idle.
  1454. SKIPPED = 6;
  1455. // The backup is about to be deleted.
  1456. DELETION_PENDING = 7;
  1457. // The backup deletion failed.
  1458. DELETION_FAILED = 8;
  1459. // The backup has been deleted.
  1460. DELETED = 9;
  1461. }
  1462. enum SqlBackupRunType {
  1463. // This is an unknown BackupRun type.
  1464. SQL_BACKUP_RUN_TYPE_UNSPECIFIED = 0;
  1465. // The backup schedule automatically triggers a backup.
  1466. AUTOMATED = 1;
  1467. // The user manually triggers a backup.
  1468. ON_DEMAND = 2;
  1469. }
  1470. // Defines the supported backup kinds
  1471. enum SqlBackupKind {
  1472. // This is an unknown BackupKind.
  1473. SQL_BACKUP_KIND_UNSPECIFIED = 0;
  1474. // The snapshot based backups
  1475. SNAPSHOT = 1;
  1476. // Physical backups
  1477. PHYSICAL = 2;
  1478. }
  1479. enum SqlBackendType {
  1480. // This is an unknown backend type for instance.
  1481. SQL_BACKEND_TYPE_UNSPECIFIED = 0;
  1482. // V1 speckle instance.
  1483. FIRST_GEN = 1 [deprecated = true];
  1484. // V2 speckle instance.
  1485. SECOND_GEN = 2;
  1486. // On premises instance.
  1487. EXTERNAL = 3;
  1488. }
  1489. enum SqlIpAddressType {
  1490. // This is an unknown IP address type.
  1491. SQL_IP_ADDRESS_TYPE_UNSPECIFIED = 0;
  1492. // IP address the customer is supposed to connect to. Usually this is the
  1493. // load balancer's IP address
  1494. PRIMARY = 1;
  1495. // Source IP address of the connection a read replica establishes to its
  1496. // external primary instance. This IP address can be allowlisted by the
  1497. // customer in case it has a firewall that filters incoming connection to its
  1498. // on premises primary instance.
  1499. OUTGOING = 2;
  1500. // Private IP used when using private IPs and network peering.
  1501. PRIVATE = 3;
  1502. // V1 IP of a migrated instance. We want the user to
  1503. // decommission this IP as soon as the migration is complete.
  1504. // Note: V1 instances with V1 ip addresses will be counted as PRIMARY.
  1505. MIGRATED_1ST_GEN = 4;
  1506. }
  1507. enum SqlInstanceType {
  1508. // This is an unknown Cloud SQL instance type.
  1509. SQL_INSTANCE_TYPE_UNSPECIFIED = 0;
  1510. // A regular Cloud SQL instance that is not replicating from a primary
  1511. // instance.
  1512. CLOUD_SQL_INSTANCE = 1;
  1513. // An instance running on the customer's premises that is not managed by
  1514. // Cloud SQL.
  1515. ON_PREMISES_INSTANCE = 2;
  1516. // A Cloud SQL instance acting as a read-replica.
  1517. READ_REPLICA_INSTANCE = 3;
  1518. }
  1519. // The database engine type and version.
  1520. enum SqlDatabaseVersion {
  1521. // This is an unknown database version.
  1522. SQL_DATABASE_VERSION_UNSPECIFIED = 0;
  1523. // The database version is MySQL 5.1.
  1524. MYSQL_5_1 = 2 [deprecated = true];
  1525. // The database version is MySQL 5.5.
  1526. MYSQL_5_5 = 3 [deprecated = true];
  1527. // The database version is MySQL 5.6.
  1528. MYSQL_5_6 = 5;
  1529. // The database version is MySQL 5.7.
  1530. MYSQL_5_7 = 6;
  1531. // The database version is PostgreSQL 9.6.
  1532. POSTGRES_9_6 = 9;
  1533. // The database version is PostgreSQL 11.
  1534. POSTGRES_11 = 10;
  1535. // The database version is SQL Server 2017 Standard.
  1536. SQLSERVER_2017_STANDARD = 11;
  1537. // The database version is SQL Server 2017 Enterprise.
  1538. SQLSERVER_2017_ENTERPRISE = 14;
  1539. // The database version is SQL Server 2017 Express.
  1540. SQLSERVER_2017_EXPRESS = 15;
  1541. // The database version is SQL Server 2017 Web.
  1542. SQLSERVER_2017_WEB = 16;
  1543. // The database version is PostgreSQL 10.
  1544. POSTGRES_10 = 18;
  1545. // The database version is PostgreSQL 12.
  1546. POSTGRES_12 = 19;
  1547. // The database version is MySQL 8.
  1548. MYSQL_8_0 = 20;
  1549. // The database major version is MySQL 8.0 and the minor version is 18.
  1550. MYSQL_8_0_18 = 41;
  1551. // The database major version is MySQL 8.0 and the minor version is 26.
  1552. MYSQL_8_0_26 = 85;
  1553. // The database major version is MySQL 8.0 and the minor version is 27.
  1554. MYSQL_8_0_27 = 111;
  1555. // The database major version is MySQL 8.0 and the minor version is 28.
  1556. MYSQL_8_0_28 = 132;
  1557. // The database version is PostgreSQL 13.
  1558. POSTGRES_13 = 23;
  1559. // The database version is PostgreSQL 14.
  1560. POSTGRES_14 = 110;
  1561. // The database version is SQL Server 2019 Standard.
  1562. SQLSERVER_2019_STANDARD = 26;
  1563. // The database version is SQL Server 2019 Enterprise.
  1564. SQLSERVER_2019_ENTERPRISE = 27;
  1565. // The database version is SQL Server 2019 Express.
  1566. SQLSERVER_2019_EXPRESS = 28;
  1567. // The database version is SQL Server 2019 Web.
  1568. SQLSERVER_2019_WEB = 29;
  1569. }
  1570. // The suspension reason of the database instance if the state is SUSPENDED.
  1571. enum SqlSuspensionReason {
  1572. // This is an unknown suspension reason.
  1573. SQL_SUSPENSION_REASON_UNSPECIFIED = 0;
  1574. // The instance is suspended due to billing issues (for example:, GCP account
  1575. // issue)
  1576. BILLING_ISSUE = 2;
  1577. // The instance is suspended due to illegal content (for example:, child
  1578. // pornography, copyrighted material, etc.).
  1579. LEGAL_ISSUE = 3;
  1580. // The instance is causing operational issues (for example:, causing the
  1581. // database to crash).
  1582. OPERATIONAL_ISSUE = 4;
  1583. // The KMS key used by the instance is either revoked or denied access to
  1584. KMS_KEY_ISSUE = 5;
  1585. }
  1586. // The pricing plan for this instance.
  1587. enum SqlPricingPlan {
  1588. // This is an unknown pricing plan for this instance.
  1589. SQL_PRICING_PLAN_UNSPECIFIED = 0;
  1590. // The instance is billed at a monthly flat rate.
  1591. PACKAGE = 1;
  1592. // The instance is billed per usage.
  1593. PER_USE = 2;
  1594. }
  1595. enum SqlReplicationType {
  1596. // This is an unknown replication type for a Cloud SQL instance.
  1597. SQL_REPLICATION_TYPE_UNSPECIFIED = 0;
  1598. // The synchronous replication mode for First Generation instances. It is the
  1599. // default value.
  1600. SYNCHRONOUS = 1;
  1601. // The asynchronous replication mode for First Generation instances. It
  1602. // provides a slight performance gain, but if an outage occurs while this
  1603. // option is set to asynchronous, you can lose up to a few seconds of updates
  1604. // to your data.
  1605. ASYNCHRONOUS = 2;
  1606. }
  1607. // The type of disk that is used for a v2 instance to use.
  1608. enum SqlDataDiskType {
  1609. // This is an unknown data disk type.
  1610. SQL_DATA_DISK_TYPE_UNSPECIFIED = 0;
  1611. // An SSD data disk.
  1612. PD_SSD = 1;
  1613. // An HDD data disk.
  1614. PD_HDD = 2;
  1615. // This field is deprecated and will be removed from a future version of the
  1616. // API.
  1617. OBSOLETE_LOCAL_SSD = 3 [deprecated = true];
  1618. }
  1619. // The availability type of the given Cloud SQL instance.
  1620. enum SqlAvailabilityType {
  1621. // This is an unknown Availability type.
  1622. SQL_AVAILABILITY_TYPE_UNSPECIFIED = 0;
  1623. // Zonal available instance.
  1624. ZONAL = 1;
  1625. // Regional available instance.
  1626. REGIONAL = 2;
  1627. }
  1628. enum SqlUpdateTrack {
  1629. // This is an unknown maintenance timing preference.
  1630. SQL_UPDATE_TRACK_UNSPECIFIED = 0;
  1631. // For instance update that requires a restart, this update track indicates
  1632. // your instance prefer to restart for new version early in maintenance
  1633. // window.
  1634. canary = 1;
  1635. // For instance update that requires a restart, this update track indicates
  1636. // your instance prefer to let Cloud SQL choose the timing of restart (within
  1637. // its Maintenance window, if applicable).
  1638. stable = 2;
  1639. }
  1640. enum SqlFlagType {
  1641. // This is an unknown flag type.
  1642. SQL_FLAG_TYPE_UNSPECIFIED = 0;
  1643. // Boolean type flag.
  1644. BOOLEAN = 1;
  1645. // String type flag.
  1646. STRING = 2;
  1647. // Integer type flag.
  1648. INTEGER = 3;
  1649. // Flag type used for a server startup option.
  1650. NONE = 4;
  1651. // Type introduced specially for MySQL TimeZone offset. Accept a string value
  1652. // with the format [-12:59, 13:00].
  1653. MYSQL_TIMEZONE_OFFSET = 5;
  1654. // Float type flag.
  1655. FLOAT = 6;
  1656. // Comma-separated list of the strings in a SqlFlagType enum.
  1657. REPEATED_STRING = 7;
  1658. }