cloud_sql_resources.proto 64 KB

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