blob: 9dc05cd27b139823dd45f4b05a956ea6b759dd2d [file] [log] [blame]
Craig Citroe633be12015-03-02 13:40:36 -08001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="sqladmin_v1beta4.html">Cloud SQL Admin API</a> . <a href="sqladmin_v1beta4.instances.html">instances</a></h1>
Craig Citroe633be12015-03-02 13:40:36 -080076<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#addServerCa">addServerCa(project, instance, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070079<p class="firstline">Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070080<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#clone">clone(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070082<p class="firstline">Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.</p>
83<p class="toc_element">
84 <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
Craig Citroe633be12015-03-02 13:40:36 -080086<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#delete">delete(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080088<p class="firstline">Deletes a Cloud SQL instance.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070091<p class="firstline">Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#export">export(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070094<p class="firstline">Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.</p>
Craig Citroe633be12015-03-02 13:40:36 -080095<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#failover">failover(project, instance, body=None, x__xgafv=None)</a></code></p>
yoshi-code-bota36e3b12021-07-27 00:20:26 -070097<p class="firstline">Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary. For more information, see the Overview of high availability page in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the instance to failover to its failover replica instance.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080098<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#get">get(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800100<p class="firstline">Retrieves a resource containing information about a Cloud SQL instance.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#import_">import_(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103<p class="firstline">Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#insert">insert(project, body=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800106<p class="firstline">Creates a new Cloud SQL instance.</p>
107<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800108 <code><a href="#list">list(project, filter=None, maxResults=None, pageToken=None, x__xgafv=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700109<p class="firstline">Lists instances under a given project.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#listServerCas">listServerCas(project, instance, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700112<p class="firstline">Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700113<p class="toc_element">
Craig Citroe633be12015-03-02 13:40:36 -0800114 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
115<p class="firstline">Retrieves the next page of results.</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#patch">patch(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700118<p class="firstline">Updates settings of a Cloud SQL instance. This method supports patch semantics.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800119<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code><a href="#promoteReplica">promoteReplica(project, instance, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700121<p class="firstline">Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800122<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700123 <code><a href="#resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700124<p class="firstline">Deletes all client certificates and generates a new server SSL certificate for the instance.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800125<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700126 <code><a href="#restart">restart(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800127<p class="firstline">Restarts a Cloud SQL instance.</p>
128<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700129 <code><a href="#restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700130<p class="firstline">Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800131<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700132 <code><a href="#rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700133<p class="firstline">Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700134<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 <code><a href="#startReplica">startReplica(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800136<p class="firstline">Starts the replication in the read replica instance.</p>
137<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700138 <code><a href="#stopReplica">stopReplica(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800139<p class="firstline">Stops the replication in the read replica instance.</p>
140<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 <code><a href="#truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</a></code></p>
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700142<p class="firstline">Truncate MySQL general and slow query log tables MySQL only.</p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800143<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700144 <code><a href="#update">update(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700145<p class="firstline">Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800146<h3>Method Details</h3>
147<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700148 <code class="details" id="addServerCa">addServerCa(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700149 <pre>Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in.
Craig Citroe633be12015-03-02 13:40:36 -0800150
151Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700152 project: string, Project ID of the project that contains the instance. (required)
153 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700154 x__xgafv: string, V1 error format.
155 Allowed values
156 1 - v1 error format
157 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800158
159Returns:
160 An object of the form:
161
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700162 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800163 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
164 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
165 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
166 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800167 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
168 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
169 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
170 { # Database instance operation error.
171 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
172 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
173 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
174 },
175 ],
176 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
177 },
178 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800179 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800180 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800181 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700182 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800183 &quot;A String&quot;,
184 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800185 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800186 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
187 &quot;offload&quot;: True or False, # Option for export offload.
188 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
189 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800190 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800191 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800192 &quot;schemaOnly&quot;: True or False, # Export only schemas.
193 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800194 &quot;A String&quot;,
195 ],
196 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800197 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800198 },
199 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
200 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
201 &quot;encryptionOptions&quot;: {
202 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
203 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
204 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800205 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800206 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800207 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
208 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
209 &quot;A String&quot;,
210 ],
211 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
212 },
213 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
214 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
215 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
216 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800217 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs://bucketName/fileName*. Compressed gzip files (.gz) are supported when *fileType* is *SQL*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800218 },
219 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
220 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
221 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
222 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
223 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
224 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
225 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
226 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
227 &quot;targetLink&quot;: &quot;A String&quot;,
228 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
229 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
230}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700231</div>
232
233<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700234 <code class="details" id="clone">clone(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700235 <pre>Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700236
237Args:
238 project: string, Project ID of the source as well as the clone Cloud SQL instance. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700239 instance: string, The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700240 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700241 The object takes the form of:
242
243{ # Database instance clone request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800244 &quot;cloneContext&quot;: { # Database instance clone context. # Contains details about the clone operation.
245 &quot;binLogCoordinates&quot;: { # Binary log coordinates. # Binary log coordinates, if specified, identify the position up to which the source instance is cloned. If not specified, the source instance is cloned up to the most recent binary log coordinates.
246 &quot;binLogFileName&quot;: &quot;A String&quot;, # Name of the binary log file for a Cloud SQL instance.
247 &quot;binLogPosition&quot;: &quot;A String&quot;, # Position (offset) within the binary log file.
248 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#binLogCoordinates*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700249 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800250 &quot;destinationInstanceName&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance to be created as a clone.
251 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#cloneContext*.
252 &quot;pitrTimestampMs&quot;: &quot;A String&quot;, # Reserved for future use.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -0700253 &quot;pointInTime&quot;: &quot;A String&quot;, # Timestamp, if specified, identifies the time to which the source instance is cloned.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800254 },
255}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700256
Dan O'Mearadd494642020-05-01 07:42:23 -0700257 x__xgafv: string, V1 error format.
258 Allowed values
259 1 - v1 error format
260 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700261
262Returns:
263 An object of the form:
264
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700265 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800266 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
267 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
268 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
269 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800270 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
271 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
272 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
273 { # Database instance operation error.
274 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
275 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
276 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
277 },
278 ],
279 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
280 },
281 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800282 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800283 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800284 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700285 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800286 &quot;A String&quot;,
287 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800288 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800289 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
290 &quot;offload&quot;: True or False, # Option for export offload.
291 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
292 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800293 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800294 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800295 &quot;schemaOnly&quot;: True or False, # Export only schemas.
296 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800297 &quot;A String&quot;,
298 ],
299 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800300 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800301 },
302 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
303 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
304 &quot;encryptionOptions&quot;: {
305 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
306 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
307 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800308 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800309 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800310 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
311 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
312 &quot;A String&quot;,
313 ],
314 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
315 },
316 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
317 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
318 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
319 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800320 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs://bucketName/fileName*. Compressed gzip files (.gz) are supported when *fileType* is *SQL*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800321 },
322 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
323 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
324 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
325 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
326 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
327 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
328 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
329 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
330 &quot;targetLink&quot;: &quot;A String&quot;,
331 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
332 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
333}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800334</div>
335
336<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700337 <code class="details" id="close">close()</code>
338 <pre>Close httplib2 connections.</pre>
339</div>
340
341<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700342 <code class="details" id="delete">delete(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800343 <pre>Deletes a Cloud SQL instance.
344
345Args:
346 project: string, Project ID of the project that contains the instance to be deleted. (required)
347 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700348 x__xgafv: string, V1 error format.
349 Allowed values
350 1 - v1 error format
351 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800352
353Returns:
354 An object of the form:
355
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700356 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800357 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
358 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
359 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
360 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800361 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
362 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
363 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
364 { # Database instance operation error.
365 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
366 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
367 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
368 },
369 ],
370 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
371 },
372 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800373 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800374 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800375 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700376 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800377 &quot;A String&quot;,
378 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800379 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800380 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
381 &quot;offload&quot;: True or False, # Option for export offload.
382 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
383 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800384 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800385 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800386 &quot;schemaOnly&quot;: True or False, # Export only schemas.
387 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800388 &quot;A String&quot;,
389 ],
390 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800391 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800392 },
393 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
394 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
395 &quot;encryptionOptions&quot;: {
396 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
397 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
398 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800399 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800400 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800401 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
402 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
403 &quot;A String&quot;,
404 ],
405 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
406 },
407 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
408 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
409 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
410 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800411 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs://bucketName/fileName*. Compressed gzip files (.gz) are supported when *fileType* is *SQL*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800412 },
413 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
414 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
415 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
416 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
417 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
418 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
419 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
420 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
421 &quot;targetLink&quot;: &quot;A String&quot;,
422 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
423 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
424}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700425</div>
426
427<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700428 <code class="details" id="demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700429 <pre>Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700430
431Args:
432 project: string, ID of the project that contains the instance. (required)
433 instance: string, Cloud SQL instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700434 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700435 The object takes the form of:
436
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700437{ # Database demote primary instance request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800438 &quot;demoteMasterContext&quot;: { # Database instance demote primary instance context. # Contains details about the demoteMaster operation.
439 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#demoteMasterContext*.
440 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as on-premises primary instance in the replication setup.
441 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the on-premises primary instance. # Configuration specific to read-replicas replicating from the on-premises primary instance.
442 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#demoteMasterConfiguration*.
443 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory.
444 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
445 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
446 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate. The format of the replica&#x27;s private key can be either PKCS #1 or PKCS #8.
447 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#demoteMasterMysqlReplicaConfiguration*.
448 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
449 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800450 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700451 },
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700452 &quot;skipReplicationSetup&quot;: True or False, # Flag to skip replication setup on the instance.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700453 &quot;verifyGtidConsistency&quot;: True or False, # Verify GTID consistency for demote operation. Default value: *True*. Setting this flag to false enables you to bypass GTID consistency check between on-premises primary instance and Cloud SQL instance during the demotion operation but also exposes you to the risk of future replication failures. Change the value only if you know the reason for the GTID divergence and are confident that doing so will not cause any replication issues.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800454 },
455}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700456
Dan O'Mearadd494642020-05-01 07:42:23 -0700457 x__xgafv: string, V1 error format.
458 Allowed values
459 1 - v1 error format
460 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700461
462Returns:
463 An object of the form:
464
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700465 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800466 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
467 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
468 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
469 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800470 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
471 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
472 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
473 { # Database instance operation error.
474 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
475 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
476 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
477 },
478 ],
479 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
480 },
481 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800482 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800483 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800484 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700485 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800486 &quot;A String&quot;,
487 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800488 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800489 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
490 &quot;offload&quot;: True or False, # Option for export offload.
491 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
492 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800493 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800494 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800495 &quot;schemaOnly&quot;: True or False, # Export only schemas.
496 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800497 &quot;A String&quot;,
498 ],
499 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800500 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800501 },
502 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
503 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
504 &quot;encryptionOptions&quot;: {
505 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
506 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
507 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800508 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800509 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800510 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
511 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
512 &quot;A String&quot;,
513 ],
514 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
515 },
516 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
517 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
518 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
519 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800520 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs://bucketName/fileName*. Compressed gzip files (.gz) are supported when *fileType* is *SQL*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800521 },
522 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
523 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
524 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
525 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
526 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
527 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
528 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
529 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
530 &quot;targetLink&quot;: &quot;A String&quot;,
531 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
532 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
533}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800534</div>
535
536<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700537 <code class="details" id="export">export(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700538 <pre>Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.
Craig Citroe633be12015-03-02 13:40:36 -0800539
540Args:
541 project: string, Project ID of the project that contains the instance to be exported. (required)
542 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700543 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800544 The object takes the form of:
545
546{ # Database instance export request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800547 &quot;exportContext&quot;: { # Database instance export context. # Contains details about the export operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800548 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800549 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
550 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700551 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800552 &quot;A String&quot;,
553 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800554 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800555 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
556 &quot;offload&quot;: True or False, # Option for export offload.
557 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
558 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800559 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800560 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800561 &quot;schemaOnly&quot;: True or False, # Export only schemas.
562 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800563 &quot;A String&quot;,
564 ],
Craig Citroe633be12015-03-02 13:40:36 -0800565 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800566 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800567 },
568}
Craig Citroe633be12015-03-02 13:40:36 -0800569
Dan O'Mearadd494642020-05-01 07:42:23 -0700570 x__xgafv: string, V1 error format.
571 Allowed values
572 1 - v1 error format
573 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800574
575Returns:
576 An object of the form:
577
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700578 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800579 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
580 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
581 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
582 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800583 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
584 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
585 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
586 { # Database instance operation error.
587 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
588 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
589 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
590 },
591 ],
592 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
593 },
594 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800595 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800596 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800597 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700598 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800599 &quot;A String&quot;,
600 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800601 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800602 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
603 &quot;offload&quot;: True or False, # Option for export offload.
604 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
605 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800606 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800607 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800608 &quot;schemaOnly&quot;: True or False, # Export only schemas.
609 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800610 &quot;A String&quot;,
611 ],
612 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800613 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800614 },
615 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
616 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
617 &quot;encryptionOptions&quot;: {
618 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
619 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
620 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800621 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800622 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800623 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
624 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
625 &quot;A String&quot;,
626 ],
627 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
628 },
629 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
630 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
631 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
632 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800633 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs://bucketName/fileName*. Compressed gzip files (.gz) are supported when *fileType* is *SQL*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800634 },
635 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
636 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
637 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
638 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
639 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
640 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
641 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
642 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
643 &quot;targetLink&quot;: &quot;A String&quot;,
644 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
645 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
646}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800647</div>
648
649<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700650 <code class="details" id="failover">failover(project, instance, body=None, x__xgafv=None)</code>
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700651 <pre>Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary. For more information, see the Overview of high availability page in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the instance to failover to its failover replica instance.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800652
653Args:
654 project: string, ID of the project that contains the read replica. (required)
655 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700656 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800657 The object takes the form of:
658
659{ # Instance failover request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800660 &quot;failoverContext&quot;: { # Database instance failover context. # Failover Context.
661 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#failoverContext*.
662 &quot;settingsVersion&quot;: &quot;A String&quot;, # The current settings version of this instance. Request will be rejected if this version doesn&#x27;t match the current settings version.
663 },
664}
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800665
Dan O'Mearadd494642020-05-01 07:42:23 -0700666 x__xgafv: string, V1 error format.
667 Allowed values
668 1 - v1 error format
669 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800670
671Returns:
672 An object of the form:
673
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700674 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800675 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
676 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
677 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
678 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800679 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
680 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
681 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
682 { # Database instance operation error.
683 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
684 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
685 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
686 },
687 ],
688 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
689 },
690 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800691 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800692 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800693 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700694 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800695 &quot;A String&quot;,
696 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800697 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800698 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
699 &quot;offload&quot;: True or False, # Option for export offload.
700 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
701 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800702 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800703 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800704 &quot;schemaOnly&quot;: True or False, # Export only schemas.
705 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800706 &quot;A String&quot;,
707 ],
708 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800709 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800710 },
711 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
712 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
713 &quot;encryptionOptions&quot;: {
714 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
715 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
716 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800717 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800718 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800719 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
720 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
721 &quot;A String&quot;,
722 ],
723 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
724 },
725 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
726 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
727 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
728 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800729 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs://bucketName/fileName*. Compressed gzip files (.gz) are supported when *fileType* is *SQL*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800730 },
731 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
732 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
733 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
734 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
735 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
736 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
737 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
738 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
739 &quot;targetLink&quot;: &quot;A String&quot;,
740 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
741 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
742}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800743</div>
744
745<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700746 <code class="details" id="get">get(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800747 <pre>Retrieves a resource containing information about a Cloud SQL instance.
748
749Args:
750 project: string, Project ID of the project that contains the instance. (required)
751 instance: string, Database instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700752 x__xgafv: string, V1 error format.
753 Allowed values
754 1 - v1 error format
755 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800756
757Returns:
758 An object of the form:
759
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700760 { # A Cloud SQL instance resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800761 &quot;backendType&quot;: &quot;A String&quot;, # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type.
762 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700763 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the instance was created in RFC 3339 format (https://tools.ietf.org/html/rfc3339), for example 2012-11-15T16:19:00.094Z
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800764 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been deprecated. Use the &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud Monitoring API instead. Please see this announcement for details.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700765 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11*, *POSTGRES_12*, *POSTGRES_13* (default). SQL Server instances: *SQLSERVER_2019_STANDARD*, *SQLSERVER_2019_ENTERPRISE*, *SQLSERVER_2019_EXPRESS*, or *SQLSERVER_2019_WEB*, *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.
766 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800767 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
768 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
769 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700770 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800771 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
772 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
773 },
774 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700775 &quot;failoverReplica&quot;: { # The name and status of the failover replica.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800776 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700777 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn&#x27;t include the project ID.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800778 },
779 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone.
780 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer&#x27;s premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica.
781 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
782 { # Database instance IP Mapping.
783 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
784 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired.
785 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported.
786 },
787 ],
788 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
789 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
790 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
791 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
792 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
793 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
794 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
795 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
796 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
797 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
798 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
799 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
800 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700801 &quot;sourceInstance&quot;: { # Reference to another Cloud SQL instance. # The reference to Cloud SQL instance if the source is Cloud SQL.
802 &quot;name&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance being referenced. This does not include the project ID.
803 &quot;project&quot;: &quot;A String&quot;, # The project ID of the Cloud SQL instance being referenced. The default is the same project ID as the instance references it.
804 &quot;region&quot;: &quot;A String&quot;, # The region of the Cloud SQL instance being referenced.
805 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800806 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
807 },
yoshi-code-bot36591372021-06-16 00:22:06 -0700808 &quot;outOfDiskReport&quot;: { # This message wraps up the information written by out-of-disk detection job. # This field represents the report generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
809 &quot;sqlMinRecommendedIncreaseSizeGb&quot;: 42, # The minimum recommended increase size in GigaBytes This field is consumed by the frontend Writers: -- the proactive database wellness job for OOD.
810 &quot;sqlOutOfDiskState&quot;: &quot;A String&quot;, # This field represents the state generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
yoshi-code-bot64143a02021-04-27 05:08:04 -0700811 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800812 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
813 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation.
814 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
815 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance.
816 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
817 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800818 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800819 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800820 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800821 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
822 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump.
823 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
824 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
825 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
826 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
827 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
828 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the primary instance&#x27;s Common Name value in the certificate that it sends during the SSL handshake.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800829 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800830 },
831 &quot;replicaNames&quot;: [ # The replicas of the instance.
832 &quot;A String&quot;,
833 ],
834 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700835 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800836 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
837 &quot;canDefer&quot;: True or False,
838 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -0700839 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800840 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
841 },
842 &quot;secondaryGceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. Reserved for future use.
843 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
844 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
845 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
846 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
847 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
848 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*
849 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
850 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
851 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800852 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800853 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
854 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700855 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800856 &quot;settings&quot;: { # Database instance settings. # The user settings.
857 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives.
858 &quot;activeDirectoryConfig&quot;: { # Active Directory configuration, relevant only for Cloud SQL for SQL Server. # Active Directory configuration, relevant only for Cloud SQL for SQL Server.
859 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
860 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800861 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800862 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
863 &quot;A String&quot;,
864 ],
865 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration.
866 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
867 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
868 &quot;retainedBackups&quot;: 42, # Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is &#x27;COUNT&#x27;, we will retain this many backups.
869 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800870 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800871 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
872 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
873 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
874 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
yoshi-code-bot1a4514d2021-07-13 00:20:24 -0700875 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800876 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
877 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
878 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800879 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800880 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
881 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.
882 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
883 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
884 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
885 { # Database flags for Cloud SQL instances.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700886 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so include both server options and system variables. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800887 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn&#x27;t take a value.
888 },
889 ],
890 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
891 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
892 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
893 &quot;endDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
894 &quot;startDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
895 &quot;time&quot;: &quot;A String&quot;, # Time in UTC when the &quot;deny maintenance period&quot; starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00
896 },
897 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800898 &quot;insightsConfig&quot;: { # Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration. # Insights configuration, for now relevant only for Postgres.
899 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700900 &quot;queryPlansPerMinute&quot;: 42, # Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700901 &quot;queryStringLength&quot;: 42, # Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query length more than this field value will be truncated to this value. When unset, query length will be the default value. Changing query length will restart the database.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800902 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
903 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
904 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700905 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700906 &quot;allocatedIpRange&quot;: &quot;A String&quot;, # The name of the allocated ip range for the private ip CloudSQL instance. For example: &quot;google-managed-services-default&quot;. If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.` Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800907 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance using the IP. In &#x27;CIDR&#x27; notation, also known as &#x27;slash&#x27; notation (for example: *192.168.100.0/24*).
908 { # An entry for an Access Control list.
909 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
910 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
911 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
912 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
913 },
914 ],
915 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
916 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set.
917 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
918 },
919 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
920 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.
921 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
922 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
923 &quot;secondaryZone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). Reserved for future use.
924 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
925 },
926 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes.
927 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
928 &quot;hour&quot;: 42, # hour of day - 0 to 23.
929 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
930 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
931 },
932 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances.
933 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances.
934 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
935 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
936 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400937 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-custom-1-3840* .
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800938 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
939 &quot;a_key&quot;: &quot;A String&quot;,
940 },
941 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700942 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance is running, or has been stopped by owner. *SUSPENDED*: The instance is not available, for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800943 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
944 &quot;A String&quot;,
945 ],
946}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800947</div>
948
949<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700950 <code class="details" id="import_">import_(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700951 <pre>Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.
Craig Citroe633be12015-03-02 13:40:36 -0800952
953Args:
954 project: string, Project ID of the project that contains the instance. (required)
955 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700956 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800957 The object takes the form of:
958
959{ # Database instance import request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800960 &quot;importContext&quot;: { # Database instance import context. # Contains details about the import operation.
961 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
962 &quot;encryptionOptions&quot;: {
963 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
964 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
965 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800966 },
Craig Citroe633be12015-03-02 13:40:36 -0800967 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800968 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
969 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
970 &quot;A String&quot;,
971 ],
972 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
973 },
974 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
975 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
976 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
977 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800978 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs://bucketName/fileName*. Compressed gzip files (.gz) are supported when *fileType* is *SQL*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800979 },
980}
Craig Citroe633be12015-03-02 13:40:36 -0800981
Dan O'Mearadd494642020-05-01 07:42:23 -0700982 x__xgafv: string, V1 error format.
983 Allowed values
984 1 - v1 error format
985 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800986
987Returns:
988 An object of the form:
989
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700990 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800991 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
992 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
993 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
994 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800995 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
996 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
997 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
998 { # Database instance operation error.
999 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1000 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1001 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1002 },
1003 ],
1004 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
1005 },
1006 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001007 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001008 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001009 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001010 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001011 &quot;A String&quot;,
1012 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001013 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001014 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1015 &quot;offload&quot;: True or False, # Option for export offload.
1016 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1017 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001018 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001019 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001020 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1021 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001022 &quot;A String&quot;,
1023 ],
1024 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001025 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001026 },
1027 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1028 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1029 &quot;encryptionOptions&quot;: {
1030 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
1031 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1032 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001033 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001034 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001035 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1036 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1037 &quot;A String&quot;,
1038 ],
1039 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1040 },
1041 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
1042 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
1043 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1044 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001045 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs://bucketName/fileName*. Compressed gzip files (.gz) are supported when *fileType* is *SQL*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001046 },
1047 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1048 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1049 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1050 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
1051 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1052 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1053 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1054 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1055 &quot;targetLink&quot;: &quot;A String&quot;,
1056 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1057 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1058}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08001059</div>
1060
1061<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001062 <code class="details" id="insert">insert(project, body=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08001063 <pre>Creates a new Cloud SQL instance.
1064
1065Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001066 project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001067 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08001068 The object takes the form of:
1069
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001070{ # A Cloud SQL instance resource.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001071 &quot;backendType&quot;: &quot;A String&quot;, # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001072 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001073 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the instance was created in RFC 3339 format (https://tools.ietf.org/html/rfc3339), for example 2012-11-15T16:19:00.094Z
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001074 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been deprecated. Use the &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud Monitoring API instead. Please see this announcement for details.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001075 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11*, *POSTGRES_12*, *POSTGRES_13* (default). SQL Server instances: *SQLSERVER_2019_STANDARD*, *SQLSERVER_2019_ENTERPRISE*, *SQLSERVER_2019_EXPRESS*, or *SQLSERVER_2019_WEB*, *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.
1076 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001077 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
1078 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1079 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001080 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001081 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
1082 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1083 },
1084 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001085 &quot;failoverReplica&quot;: { # The name and status of the failover replica.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001086 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001087 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn&#x27;t include the project ID.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001088 },
1089 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone.
1090 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer&#x27;s premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica.
1091 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1092 { # Database instance IP Mapping.
1093 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1094 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired.
1095 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported.
1096 },
1097 ],
1098 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1099 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1100 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1101 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001102 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001103 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1104 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1105 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1106 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
1107 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1108 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1109 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1110 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001111 &quot;sourceInstance&quot;: { # Reference to another Cloud SQL instance. # The reference to Cloud SQL instance if the source is Cloud SQL.
1112 &quot;name&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance being referenced. This does not include the project ID.
1113 &quot;project&quot;: &quot;A String&quot;, # The project ID of the Cloud SQL instance being referenced. The default is the same project ID as the instance references it.
1114 &quot;region&quot;: &quot;A String&quot;, # The region of the Cloud SQL instance being referenced.
1115 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001116 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1117 },
yoshi-code-bot36591372021-06-16 00:22:06 -07001118 &quot;outOfDiskReport&quot;: { # This message wraps up the information written by out-of-disk detection job. # This field represents the report generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
1119 &quot;sqlMinRecommendedIncreaseSizeGb&quot;: 42, # The minimum recommended increase size in GigaBytes This field is consumed by the frontend Writers: -- the proactive database wellness job for OOD.
1120 &quot;sqlOutOfDiskState&quot;: &quot;A String&quot;, # This field represents the state generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
yoshi-code-bot64143a02021-04-27 05:08:04 -07001121 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001122 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
1123 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001124 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1125 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001126 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001127 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001128 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001129 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1130 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001131 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1132 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001133 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
1134 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1135 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1136 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001137 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1138 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the primary instance&#x27;s Common Name value in the certificate that it sends during the SSL handshake.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001139 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001140 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001141 &quot;replicaNames&quot;: [ # The replicas of the instance.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001142 &quot;A String&quot;,
1143 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001144 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001145 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001146 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001147 &quot;canDefer&quot;: True or False,
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001148 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001149 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001150 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1151 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001152 &quot;secondaryGceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. Reserved for future use.
1153 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1154 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1155 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1156 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1157 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1158 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*
1159 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1160 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1161 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1162 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1163 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1164 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001165 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001166 &quot;settings&quot;: { # Database instance settings. # The user settings.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001167 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001168 &quot;activeDirectoryConfig&quot;: { # Active Directory configuration, relevant only for Cloud SQL for SQL Server. # Active Directory configuration, relevant only for Cloud SQL for SQL Server.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001169 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001170 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001171 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001172 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001173 &quot;A String&quot;,
1174 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001175 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001176 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1177 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1178 &quot;retainedBackups&quot;: 42, # Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is &#x27;COUNT&#x27;, we will retain this many backups.
1179 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1180 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001181 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001182 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1183 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
1184 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001185 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001186 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1187 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
1188 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1189 },
1190 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1191 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.
1192 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1193 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
1194 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1195 { # Database flags for Cloud SQL instances.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001196 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so include both server options and system variables. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001197 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn&#x27;t take a value.
1198 },
1199 ],
1200 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1201 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1202 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1203 &quot;endDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1204 &quot;startDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1205 &quot;time&quot;: &quot;A String&quot;, # Time in UTC when the &quot;deny maintenance period&quot; starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00
1206 },
1207 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001208 &quot;insightsConfig&quot;: { # Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration. # Insights configuration, for now relevant only for Postgres.
1209 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001210 &quot;queryPlansPerMinute&quot;: 42, # Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001211 &quot;queryStringLength&quot;: 42, # Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query length more than this field value will be truncated to this value. When unset, query length will be the default value. Changing query length will restart the database.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001212 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1213 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1214 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001215 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001216 &quot;allocatedIpRange&quot;: &quot;A String&quot;, # The name of the allocated ip range for the private ip CloudSQL instance. For example: &quot;google-managed-services-default&quot;. If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.` Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001217 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance using the IP. In &#x27;CIDR&#x27; notation, also known as &#x27;slash&#x27; notation (for example: *192.168.100.0/24*).
1218 { # An entry for an Access Control list.
1219 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1220 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
1221 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1222 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1223 },
1224 ],
1225 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1226 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set.
1227 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1228 },
1229 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
1230 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.
1231 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
1232 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
1233 &quot;secondaryZone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). Reserved for future use.
1234 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001235 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001236 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes.
1237 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1238 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1239 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
1240 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001241 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001242 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances.
1243 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances.
1244 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
1245 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001246 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001247 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-custom-1-3840* .
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001248 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1249 &quot;a_key&quot;: &quot;A String&quot;,
1250 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001251 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001252 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance is running, or has been stopped by owner. *SUSPENDED*: The instance is not available, for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001253 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1254 &quot;A String&quot;,
1255 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001256}
Craig Citroe633be12015-03-02 13:40:36 -08001257
Dan O'Mearadd494642020-05-01 07:42:23 -07001258 x__xgafv: string, V1 error format.
1259 Allowed values
1260 1 - v1 error format
1261 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001262
1263Returns:
1264 An object of the form:
1265
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001266 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001267 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1268 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1269 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
1270 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001271 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1272 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1273 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1274 { # Database instance operation error.
1275 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1276 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1277 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1278 },
1279 ],
1280 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
1281 },
1282 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001283 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001284 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001285 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001286 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001287 &quot;A String&quot;,
1288 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001289 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001290 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1291 &quot;offload&quot;: True or False, # Option for export offload.
1292 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1293 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001294 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001295 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001296 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1297 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001298 &quot;A String&quot;,
1299 ],
1300 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001301 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001302 },
1303 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1304 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1305 &quot;encryptionOptions&quot;: {
1306 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
1307 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1308 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001309 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001310 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001311 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1312 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1313 &quot;A String&quot;,
1314 ],
1315 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1316 },
1317 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
1318 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
1319 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1320 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001321 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs://bucketName/fileName*. Compressed gzip files (.gz) are supported when *fileType* is *SQL*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001322 },
1323 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1324 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1325 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1326 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
1327 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1328 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1329 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1330 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1331 &quot;targetLink&quot;: &quot;A String&quot;,
1332 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1333 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1334}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08001335</div>
1336
1337<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001338 <code class="details" id="list">list(project, filter=None, maxResults=None, pageToken=None, x__xgafv=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -07001339 <pre>Lists instances under a given project.
Craig Citroe633be12015-03-02 13:40:36 -08001340
1341Args:
1342 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001343 filter: string, A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, &#x27;instanceType:CLOUD_SQL_INSTANCE&#x27;. Fields can be nested as needed as per their JSON representation, such as &#x27;settings.userLabels.auto_start:true&#x27;. Multiple filter queries are space-separated. For example. &#x27;state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE&#x27;. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001344 maxResults: integer, The maximum number of results to return per response.
1345 pageToken: string, A previously-returned page token representing part of the larger set of results to view.
Dan O'Mearadd494642020-05-01 07:42:23 -07001346 x__xgafv: string, V1 error format.
1347 Allowed values
1348 1 - v1 error format
1349 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001350
1351Returns:
1352 An object of the form:
1353
1354 { # Database instances list response.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001355 &quot;items&quot;: [ # List of database instance resources.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001356 { # A Cloud SQL instance resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001357 &quot;backendType&quot;: &quot;A String&quot;, # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type.
1358 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001359 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the instance was created in RFC 3339 format (https://tools.ietf.org/html/rfc3339), for example 2012-11-15T16:19:00.094Z
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001360 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been deprecated. Use the &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud Monitoring API instead. Please see this announcement for details.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001361 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11*, *POSTGRES_12*, *POSTGRES_13* (default). SQL Server instances: *SQLSERVER_2019_STANDARD*, *SQLSERVER_2019_ENTERPRISE*, *SQLSERVER_2019_EXPRESS*, or *SQLSERVER_2019_WEB*, *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.
1362 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001363 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
1364 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001365 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001366 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001367 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
1368 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1369 },
1370 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001371 &quot;failoverReplica&quot;: { # The name and status of the failover replica.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001372 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001373 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn&#x27;t include the project ID.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001374 },
1375 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone.
1376 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer&#x27;s premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica.
1377 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1378 { # Database instance IP Mapping.
1379 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1380 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired.
1381 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported.
1382 },
1383 ],
1384 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1385 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1386 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1387 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1388 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1389 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1390 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1391 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1392 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
1393 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1394 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1395 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1396 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001397 &quot;sourceInstance&quot;: { # Reference to another Cloud SQL instance. # The reference to Cloud SQL instance if the source is Cloud SQL.
1398 &quot;name&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance being referenced. This does not include the project ID.
1399 &quot;project&quot;: &quot;A String&quot;, # The project ID of the Cloud SQL instance being referenced. The default is the same project ID as the instance references it.
1400 &quot;region&quot;: &quot;A String&quot;, # The region of the Cloud SQL instance being referenced.
1401 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001402 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1403 },
yoshi-code-bot36591372021-06-16 00:22:06 -07001404 &quot;outOfDiskReport&quot;: { # This message wraps up the information written by out-of-disk detection job. # This field represents the report generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
1405 &quot;sqlMinRecommendedIncreaseSizeGb&quot;: 42, # The minimum recommended increase size in GigaBytes This field is consumed by the frontend Writers: -- the proactive database wellness job for OOD.
1406 &quot;sqlOutOfDiskState&quot;: &quot;A String&quot;, # This field represents the state generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
yoshi-code-bot64143a02021-04-27 05:08:04 -07001407 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001408 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
1409 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation.
1410 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1411 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance.
1412 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1413 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001414 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001415 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001416 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001417 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1418 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump.
1419 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
1420 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1421 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1422 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1423 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1424 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the primary instance&#x27;s Common Name value in the certificate that it sends during the SSL handshake.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001425 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001426 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001427 &quot;replicaNames&quot;: [ # The replicas of the instance.
1428 &quot;A String&quot;,
1429 ],
1430 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001431 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001432 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1433 &quot;canDefer&quot;: True or False,
1434 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001435 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001436 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1437 },
1438 &quot;secondaryGceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. Reserved for future use.
1439 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1440 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1441 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1442 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1443 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1444 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*
1445 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1446 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1447 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1448 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1449 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1450 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001451 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001452 &quot;settings&quot;: { # Database instance settings. # The user settings.
1453 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives.
1454 &quot;activeDirectoryConfig&quot;: { # Active Directory configuration, relevant only for Cloud SQL for SQL Server. # Active Directory configuration, relevant only for Cloud SQL for SQL Server.
1455 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
1456 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
1457 },
1458 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
1459 &quot;A String&quot;,
1460 ],
1461 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration.
1462 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1463 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1464 &quot;retainedBackups&quot;: 42, # Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is &#x27;COUNT&#x27;, we will retain this many backups.
1465 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1466 },
1467 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1468 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1469 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
1470 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001471 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001472 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1473 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
1474 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1475 },
1476 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1477 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.
1478 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1479 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
1480 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1481 { # Database flags for Cloud SQL instances.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001482 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so include both server options and system variables. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001483 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn&#x27;t take a value.
1484 },
1485 ],
1486 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1487 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1488 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1489 &quot;endDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1490 &quot;startDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1491 &quot;time&quot;: &quot;A String&quot;, # Time in UTC when the &quot;deny maintenance period&quot; starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00
1492 },
1493 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001494 &quot;insightsConfig&quot;: { # Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration. # Insights configuration, for now relevant only for Postgres.
1495 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001496 &quot;queryPlansPerMinute&quot;: 42, # Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001497 &quot;queryStringLength&quot;: 42, # Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query length more than this field value will be truncated to this value. When unset, query length will be the default value. Changing query length will restart the database.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001498 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1499 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1500 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001501 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001502 &quot;allocatedIpRange&quot;: &quot;A String&quot;, # The name of the allocated ip range for the private ip CloudSQL instance. For example: &quot;google-managed-services-default&quot;. If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.` Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001503 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance using the IP. In &#x27;CIDR&#x27; notation, also known as &#x27;slash&#x27; notation (for example: *192.168.100.0/24*).
1504 { # An entry for an Access Control list.
1505 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1506 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
1507 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1508 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1509 },
1510 ],
1511 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1512 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set.
1513 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1514 },
1515 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
1516 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.
1517 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
1518 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
1519 &quot;secondaryZone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). Reserved for future use.
1520 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1521 },
1522 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes.
1523 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1524 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1525 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
1526 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
1527 },
1528 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances.
1529 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances.
1530 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
1531 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1532 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001533 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-custom-1-3840* .
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001534 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1535 &quot;a_key&quot;: &quot;A String&quot;,
1536 },
1537 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001538 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance is running, or has been stopped by owner. *SUSPENDED*: The instance is not available, for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001539 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1540 &quot;A String&quot;,
1541 ],
1542 },
1543 ],
1544 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instancesList*.
1545 &quot;nextPageToken&quot;: &quot;A String&quot;, # The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
1546 &quot;warnings&quot;: [ # List of warnings that occurred while handling the request.
1547 { # An Admin API warning message.
1548 &quot;code&quot;: &quot;A String&quot;, # Code to uniquely identify the warning type.
1549 &quot;message&quot;: &quot;A String&quot;, # The warning message.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001550 &quot;region&quot;: &quot;A String&quot;, # The region name for REGION_UNREACHABLE warning.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001551 },
1552 ],
1553}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001554</div>
1555
1556<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001557 <code class="details" id="listServerCas">listServerCas(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001558 <pre>Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001559
1560Args:
1561 project: string, Project ID of the project that contains the instance. (required)
1562 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001563 x__xgafv: string, V1 error format.
1564 Allowed values
1565 1 - v1 error format
1566 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001567
1568Returns:
1569 An object of the form:
1570
1571 { # Instances ListServerCas response.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001572 &quot;activeVersion&quot;: &quot;A String&quot;,
1573 &quot;certs&quot;: [ # List of server CA certificates for the instance.
1574 { # SslCerts Resource
1575 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1576 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1577 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1578 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*
1579 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1580 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1581 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1582 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1583 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1584 },
1585 ],
1586 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instancesListServerCas*.
1587}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08001588</div>
1589
1590<div class="method">
1591 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1592 <pre>Retrieves the next page of results.
1593
1594Args:
1595 previous_request: The request for the previous page. (required)
1596 previous_response: The response from the request for the previous page. (required)
1597
1598Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001599 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citroe633be12015-03-02 13:40:36 -08001600 page. Returns None if there are no more items in the collection.
1601 </pre>
1602</div>
1603
1604<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001605 <code class="details" id="patch">patch(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001606 <pre>Updates settings of a Cloud SQL instance. This method supports patch semantics.
Craig Citroe633be12015-03-02 13:40:36 -08001607
1608Args:
1609 project: string, Project ID of the project that contains the instance. (required)
1610 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001611 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08001612 The object takes the form of:
1613
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001614{ # A Cloud SQL instance resource.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001615 &quot;backendType&quot;: &quot;A String&quot;, # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001616 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001617 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the instance was created in RFC 3339 format (https://tools.ietf.org/html/rfc3339), for example 2012-11-15T16:19:00.094Z
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001618 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been deprecated. Use the &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud Monitoring API instead. Please see this announcement for details.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001619 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11*, *POSTGRES_12*, *POSTGRES_13* (default). SQL Server instances: *SQLSERVER_2019_STANDARD*, *SQLSERVER_2019_ENTERPRISE*, *SQLSERVER_2019_EXPRESS*, or *SQLSERVER_2019_WEB*, *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.
1620 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001621 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
1622 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1623 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001624 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001625 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
1626 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1627 },
1628 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001629 &quot;failoverReplica&quot;: { # The name and status of the failover replica.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001630 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001631 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn&#x27;t include the project ID.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001632 },
1633 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone.
1634 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer&#x27;s premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica.
1635 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1636 { # Database instance IP Mapping.
1637 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1638 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired.
1639 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported.
1640 },
1641 ],
1642 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1643 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1644 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1645 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001646 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001647 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1648 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1649 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1650 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
1651 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1652 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1653 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1654 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001655 &quot;sourceInstance&quot;: { # Reference to another Cloud SQL instance. # The reference to Cloud SQL instance if the source is Cloud SQL.
1656 &quot;name&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance being referenced. This does not include the project ID.
1657 &quot;project&quot;: &quot;A String&quot;, # The project ID of the Cloud SQL instance being referenced. The default is the same project ID as the instance references it.
1658 &quot;region&quot;: &quot;A String&quot;, # The region of the Cloud SQL instance being referenced.
1659 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001660 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1661 },
yoshi-code-bot36591372021-06-16 00:22:06 -07001662 &quot;outOfDiskReport&quot;: { # This message wraps up the information written by out-of-disk detection job. # This field represents the report generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
1663 &quot;sqlMinRecommendedIncreaseSizeGb&quot;: 42, # The minimum recommended increase size in GigaBytes This field is consumed by the frontend Writers: -- the proactive database wellness job for OOD.
1664 &quot;sqlOutOfDiskState&quot;: &quot;A String&quot;, # This field represents the state generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
yoshi-code-bot64143a02021-04-27 05:08:04 -07001665 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001666 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
1667 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001668 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1669 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001670 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001671 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001672 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001673 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1674 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001675 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1676 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001677 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
1678 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1679 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1680 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001681 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1682 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the primary instance&#x27;s Common Name value in the certificate that it sends during the SSL handshake.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001683 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001684 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001685 &quot;replicaNames&quot;: [ # The replicas of the instance.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001686 &quot;A String&quot;,
1687 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001688 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001689 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001690 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001691 &quot;canDefer&quot;: True or False,
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001692 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001693 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001694 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1695 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001696 &quot;secondaryGceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. Reserved for future use.
1697 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1698 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1699 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1700 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1701 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1702 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*
1703 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1704 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1705 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1706 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1707 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1708 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001709 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001710 &quot;settings&quot;: { # Database instance settings. # The user settings.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001711 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001712 &quot;activeDirectoryConfig&quot;: { # Active Directory configuration, relevant only for Cloud SQL for SQL Server. # Active Directory configuration, relevant only for Cloud SQL for SQL Server.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001713 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001714 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001715 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001716 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001717 &quot;A String&quot;,
1718 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001719 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001720 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1721 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1722 &quot;retainedBackups&quot;: 42, # Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is &#x27;COUNT&#x27;, we will retain this many backups.
1723 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1724 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001725 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001726 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1727 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
1728 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001729 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001730 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1731 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
1732 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1733 },
1734 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1735 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.
1736 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1737 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
1738 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1739 { # Database flags for Cloud SQL instances.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001740 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so include both server options and system variables. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001741 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn&#x27;t take a value.
1742 },
1743 ],
1744 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1745 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1746 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1747 &quot;endDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1748 &quot;startDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1749 &quot;time&quot;: &quot;A String&quot;, # Time in UTC when the &quot;deny maintenance period&quot; starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00
1750 },
1751 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001752 &quot;insightsConfig&quot;: { # Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration. # Insights configuration, for now relevant only for Postgres.
1753 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001754 &quot;queryPlansPerMinute&quot;: 42, # Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001755 &quot;queryStringLength&quot;: 42, # Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query length more than this field value will be truncated to this value. When unset, query length will be the default value. Changing query length will restart the database.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001756 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1757 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1758 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001759 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001760 &quot;allocatedIpRange&quot;: &quot;A String&quot;, # The name of the allocated ip range for the private ip CloudSQL instance. For example: &quot;google-managed-services-default&quot;. If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.` Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001761 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance using the IP. In &#x27;CIDR&#x27; notation, also known as &#x27;slash&#x27; notation (for example: *192.168.100.0/24*).
1762 { # An entry for an Access Control list.
1763 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1764 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
1765 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1766 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1767 },
1768 ],
1769 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1770 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set.
1771 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1772 },
1773 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
1774 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.
1775 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
1776 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
1777 &quot;secondaryZone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). Reserved for future use.
1778 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001779 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001780 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes.
1781 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1782 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1783 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
1784 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001785 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001786 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances.
1787 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances.
1788 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
1789 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001790 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001791 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-custom-1-3840* .
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001792 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1793 &quot;a_key&quot;: &quot;A String&quot;,
1794 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001795 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001796 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance is running, or has been stopped by owner. *SUSPENDED*: The instance is not available, for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001797 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1798 &quot;A String&quot;,
1799 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001800}
Craig Citroe633be12015-03-02 13:40:36 -08001801
Dan O'Mearadd494642020-05-01 07:42:23 -07001802 x__xgafv: string, V1 error format.
1803 Allowed values
1804 1 - v1 error format
1805 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001806
1807Returns:
1808 An object of the form:
1809
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001810 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001811 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1812 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1813 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
1814 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001815 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1816 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1817 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1818 { # Database instance operation error.
1819 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1820 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1821 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1822 },
1823 ],
1824 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
1825 },
1826 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001827 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001828 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001829 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001830 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001831 &quot;A String&quot;,
1832 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001833 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001834 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1835 &quot;offload&quot;: True or False, # Option for export offload.
1836 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1837 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001838 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001839 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001840 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1841 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001842 &quot;A String&quot;,
1843 ],
1844 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001845 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001846 },
1847 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1848 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1849 &quot;encryptionOptions&quot;: {
1850 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
1851 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1852 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001853 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001854 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001855 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1856 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1857 &quot;A String&quot;,
1858 ],
1859 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1860 },
1861 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
1862 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
1863 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1864 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001865 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs://bucketName/fileName*. Compressed gzip files (.gz) are supported when *fileType* is *SQL*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001866 },
1867 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1868 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1869 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1870 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
1871 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1872 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1873 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1874 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1875 &quot;targetLink&quot;: &quot;A String&quot;,
1876 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1877 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1878}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08001879</div>
1880
1881<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001882 <code class="details" id="promoteReplica">promoteReplica(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001883 <pre>Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.
Craig Citroe633be12015-03-02 13:40:36 -08001884
1885Args:
1886 project: string, ID of the project that contains the read replica. (required)
1887 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001888 x__xgafv: string, V1 error format.
1889 Allowed values
1890 1 - v1 error format
1891 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001892
1893Returns:
1894 An object of the form:
1895
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001896 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001897 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1898 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1899 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
1900 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001901 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1902 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1903 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1904 { # Database instance operation error.
1905 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1906 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1907 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1908 },
1909 ],
1910 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
1911 },
1912 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001913 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001914 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001915 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001916 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001917 &quot;A String&quot;,
1918 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001919 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001920 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1921 &quot;offload&quot;: True or False, # Option for export offload.
1922 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1923 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001924 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001925 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001926 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1927 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001928 &quot;A String&quot;,
1929 ],
1930 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001931 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001932 },
1933 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1934 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1935 &quot;encryptionOptions&quot;: {
1936 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
1937 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1938 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001939 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001940 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001941 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1942 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1943 &quot;A String&quot;,
1944 ],
1945 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1946 },
1947 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
1948 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
1949 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1950 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001951 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs://bucketName/fileName*. Compressed gzip files (.gz) are supported when *fileType* is *SQL*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001952 },
1953 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1954 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1955 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1956 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
1957 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1958 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1959 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1960 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1961 &quot;targetLink&quot;: &quot;A String&quot;,
1962 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1963 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1964}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08001965</div>
1966
1967<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001968 <code class="details" id="resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001969 <pre>Deletes all client certificates and generates a new server SSL certificate for the instance.
Craig Citroe633be12015-03-02 13:40:36 -08001970
1971Args:
1972 project: string, Project ID of the project that contains the instance. (required)
1973 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001974 x__xgafv: string, V1 error format.
1975 Allowed values
1976 1 - v1 error format
1977 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001978
1979Returns:
1980 An object of the form:
1981
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001982 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001983 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1984 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1985 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
1986 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001987 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1988 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1989 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1990 { # Database instance operation error.
1991 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1992 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1993 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1994 },
1995 ],
1996 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
1997 },
1998 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001999 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002000 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002001 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002002 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002003 &quot;A String&quot;,
2004 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002005 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002006 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2007 &quot;offload&quot;: True or False, # Option for export offload.
2008 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2009 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002010 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002011 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002012 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2013 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002014 &quot;A String&quot;,
2015 ],
2016 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002017 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002018 },
2019 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2020 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2021 &quot;encryptionOptions&quot;: {
2022 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2023 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2024 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002025 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002026 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002027 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2028 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
2029 &quot;A String&quot;,
2030 ],
2031 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2032 },
2033 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
2034 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2035 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2036 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002037 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs://bucketName/fileName*. Compressed gzip files (.gz) are supported when *fileType* is *SQL*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002038 },
2039 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2040 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2041 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
2042 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
2043 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2044 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2045 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2046 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2047 &quot;targetLink&quot;: &quot;A String&quot;,
2048 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2049 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2050}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08002051</div>
2052
2053<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002054 <code class="details" id="restart">restart(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08002055 <pre>Restarts a Cloud SQL instance.
2056
2057Args:
2058 project: string, Project ID of the project that contains the instance to be restarted. (required)
2059 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002060 x__xgafv: string, V1 error format.
2061 Allowed values
2062 1 - v1 error format
2063 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002064
2065Returns:
2066 An object of the form:
2067
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002068 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002069 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2070 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2071 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2072 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002073 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2074 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2075 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2076 { # Database instance operation error.
2077 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2078 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2079 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2080 },
2081 ],
2082 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2083 },
2084 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002085 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002086 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002087 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002088 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002089 &quot;A String&quot;,
2090 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002091 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002092 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2093 &quot;offload&quot;: True or False, # Option for export offload.
2094 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2095 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002096 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002097 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002098 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2099 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002100 &quot;A String&quot;,
2101 ],
2102 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002103 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002104 },
2105 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2106 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2107 &quot;encryptionOptions&quot;: {
2108 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2109 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2110 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002111 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002112 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002113 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2114 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
2115 &quot;A String&quot;,
2116 ],
2117 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2118 },
2119 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
2120 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2121 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2122 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002123 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs://bucketName/fileName*. Compressed gzip files (.gz) are supported when *fileType* is *SQL*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002124 },
2125 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2126 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2127 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
2128 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
2129 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2130 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2131 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2132 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2133 &quot;targetLink&quot;: &quot;A String&quot;,
2134 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2135 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2136}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08002137</div>
2138
2139<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002140 <code class="details" id="restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002141 <pre>Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.
Craig Citroe633be12015-03-02 13:40:36 -08002142
2143Args:
2144 project: string, Project ID of the project that contains the instance. (required)
2145 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002146 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08002147 The object takes the form of:
2148
2149{ # Database instance restore backup request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002150 &quot;restoreBackupContext&quot;: { # Database instance restore from backup context. Backup context contains source instance id and project id. # Parameters required to perform the restore backup operation.
2151 &quot;backupRunId&quot;: &quot;A String&quot;, # The ID of the backup run to restore from.
2152 &quot;instanceId&quot;: &quot;A String&quot;, # The ID of the instance that the backup was taken from.
2153 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#restoreBackupContext*.
2154 &quot;project&quot;: &quot;A String&quot;, # The full project ID of the source instance.
2155 },
2156}
Craig Citroe633be12015-03-02 13:40:36 -08002157
Dan O'Mearadd494642020-05-01 07:42:23 -07002158 x__xgafv: string, V1 error format.
2159 Allowed values
2160 1 - v1 error format
2161 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002162
2163Returns:
2164 An object of the form:
2165
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002166 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002167 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2168 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2169 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2170 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002171 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2172 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2173 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2174 { # Database instance operation error.
2175 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2176 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2177 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2178 },
2179 ],
2180 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2181 },
2182 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002183 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002184 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002185 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002186 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002187 &quot;A String&quot;,
2188 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002189 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002190 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2191 &quot;offload&quot;: True or False, # Option for export offload.
2192 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2193 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002194 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002195 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002196 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2197 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002198 &quot;A String&quot;,
2199 ],
2200 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002201 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002202 },
2203 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2204 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2205 &quot;encryptionOptions&quot;: {
2206 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2207 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2208 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002209 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002210 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002211 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2212 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
2213 &quot;A String&quot;,
2214 ],
2215 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2216 },
2217 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
2218 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2219 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2220 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002221 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs://bucketName/fileName*. Compressed gzip files (.gz) are supported when *fileType* is *SQL*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002222 },
2223 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2224 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2225 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
2226 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
2227 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2228 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2229 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2230 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2231 &quot;targetLink&quot;: &quot;A String&quot;,
2232 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2233 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2234}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002235</div>
2236
2237<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002238 <code class="details" id="rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002239 <pre>Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002240
2241Args:
2242 project: string, Project ID of the project that contains the instance. (required)
2243 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002244 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002245 The object takes the form of:
2246
2247{ # Rotate Server CA request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002248 &quot;rotateServerCaContext&quot;: { # Instance rotate server CA context. # Contains details about the rotate server CA operation.
2249 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#rotateServerCaContext*.
2250 &quot;nextVersion&quot;: &quot;A String&quot;, # The fingerprint of the next version to be rotated to. If left unspecified, will be rotated to the most recently added server CA version.
2251 },
2252}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002253
Dan O'Mearadd494642020-05-01 07:42:23 -07002254 x__xgafv: string, V1 error format.
2255 Allowed values
2256 1 - v1 error format
2257 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002258
2259Returns:
2260 An object of the form:
2261
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002262 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002263 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2264 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2265 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2266 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002267 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2268 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2269 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2270 { # Database instance operation error.
2271 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2272 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2273 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2274 },
2275 ],
2276 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2277 },
2278 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002279 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002280 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002281 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002282 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002283 &quot;A String&quot;,
2284 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002285 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002286 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2287 &quot;offload&quot;: True or False, # Option for export offload.
2288 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2289 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002290 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002291 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002292 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2293 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002294 &quot;A String&quot;,
2295 ],
2296 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002297 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002298 },
2299 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2300 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2301 &quot;encryptionOptions&quot;: {
2302 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2303 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2304 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002305 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002306 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002307 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2308 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
2309 &quot;A String&quot;,
2310 ],
2311 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2312 },
2313 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
2314 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2315 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2316 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002317 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs://bucketName/fileName*. Compressed gzip files (.gz) are supported when *fileType* is *SQL*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002318 },
2319 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2320 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2321 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
2322 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
2323 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2324 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2325 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2326 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2327 &quot;targetLink&quot;: &quot;A String&quot;,
2328 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2329 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2330}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08002331</div>
2332
2333<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002334 <code class="details" id="startReplica">startReplica(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08002335 <pre>Starts the replication in the read replica instance.
2336
2337Args:
2338 project: string, ID of the project that contains the read replica. (required)
2339 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002340 x__xgafv: string, V1 error format.
2341 Allowed values
2342 1 - v1 error format
2343 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002344
2345Returns:
2346 An object of the form:
2347
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002348 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002349 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2350 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2351 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2352 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002353 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2354 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2355 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2356 { # Database instance operation error.
2357 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2358 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2359 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2360 },
2361 ],
2362 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2363 },
2364 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002365 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002366 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002367 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002368 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002369 &quot;A String&quot;,
2370 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002371 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002372 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2373 &quot;offload&quot;: True or False, # Option for export offload.
2374 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2375 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002376 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002377 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002378 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2379 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002380 &quot;A String&quot;,
2381 ],
2382 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002383 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002384 },
2385 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2386 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2387 &quot;encryptionOptions&quot;: {
2388 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2389 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2390 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002391 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002392 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002393 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2394 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
2395 &quot;A String&quot;,
2396 ],
2397 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2398 },
2399 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
2400 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2401 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2402 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002403 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs://bucketName/fileName*. Compressed gzip files (.gz) are supported when *fileType* is *SQL*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002404 },
2405 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2406 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2407 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
2408 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
2409 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2410 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2411 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2412 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2413 &quot;targetLink&quot;: &quot;A String&quot;,
2414 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2415 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2416}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08002417</div>
2418
2419<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002420 <code class="details" id="stopReplica">stopReplica(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08002421 <pre>Stops the replication in the read replica instance.
2422
2423Args:
2424 project: string, ID of the project that contains the read replica. (required)
2425 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002426 x__xgafv: string, V1 error format.
2427 Allowed values
2428 1 - v1 error format
2429 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002430
2431Returns:
2432 An object of the form:
2433
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002434 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002435 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2436 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2437 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2438 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002439 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2440 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2441 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2442 { # Database instance operation error.
2443 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2444 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2445 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2446 },
2447 ],
2448 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2449 },
2450 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002451 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002452 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002453 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002454 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002455 &quot;A String&quot;,
2456 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002457 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002458 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2459 &quot;offload&quot;: True or False, # Option for export offload.
2460 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2461 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002462 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002463 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002464 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2465 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002466 &quot;A String&quot;,
2467 ],
2468 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002469 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002470 },
2471 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2472 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2473 &quot;encryptionOptions&quot;: {
2474 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2475 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2476 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002477 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002478 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002479 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2480 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
2481 &quot;A String&quot;,
2482 ],
2483 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2484 },
2485 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
2486 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2487 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2488 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002489 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs://bucketName/fileName*. Compressed gzip files (.gz) are supported when *fileType* is *SQL*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002490 },
2491 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2492 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2493 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
2494 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
2495 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2496 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2497 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2498 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2499 &quot;targetLink&quot;: &quot;A String&quot;,
2500 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2501 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2502}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08002503</div>
2504
2505<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002506 <code class="details" id="truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</code>
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002507 <pre>Truncate MySQL general and slow query log tables MySQL only.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002508
2509Args:
2510 project: string, Project ID of the Cloud SQL project. (required)
2511 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002512 body: object, The request body.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002513 The object takes the form of:
2514
2515{ # Instance truncate log request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002516 &quot;truncateLogContext&quot;: { # Database Instance truncate log context. # Contains details about the truncate log operation.
2517 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#truncateLogContext*.
2518 &quot;logType&quot;: &quot;A String&quot;, # The type of log to truncate. Valid values are *MYSQL_GENERAL_TABLE* and *MYSQL_SLOW_TABLE*.
2519 },
2520}
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002521
Dan O'Mearadd494642020-05-01 07:42:23 -07002522 x__xgafv: string, V1 error format.
2523 Allowed values
2524 1 - v1 error format
2525 2 - v2 error format
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002526
2527Returns:
2528 An object of the form:
2529
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002530 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002531 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2532 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2533 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2534 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002535 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2536 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2537 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2538 { # Database instance operation error.
2539 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2540 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2541 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2542 },
2543 ],
2544 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2545 },
2546 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002547 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002548 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002549 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002550 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002551 &quot;A String&quot;,
2552 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002553 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002554 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2555 &quot;offload&quot;: True or False, # Option for export offload.
2556 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2557 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002558 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002559 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002560 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2561 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002562 &quot;A String&quot;,
2563 ],
2564 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002565 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002566 },
2567 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2568 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2569 &quot;encryptionOptions&quot;: {
2570 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2571 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2572 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002573 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002574 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002575 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2576 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
2577 &quot;A String&quot;,
2578 ],
2579 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2580 },
2581 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
2582 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2583 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2584 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002585 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs://bucketName/fileName*. Compressed gzip files (.gz) are supported when *fileType* is *SQL*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002586 },
2587 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2588 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2589 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
2590 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
2591 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2592 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2593 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2594 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2595 &quot;targetLink&quot;: &quot;A String&quot;,
2596 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2597 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2598}</pre>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002599</div>
2600
2601<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002602 <code class="details" id="update">update(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002603 <pre>Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.
Craig Citroe633be12015-03-02 13:40:36 -08002604
2605Args:
2606 project: string, Project ID of the project that contains the instance. (required)
2607 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002608 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08002609 The object takes the form of:
2610
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002611{ # A Cloud SQL instance resource.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002612 &quot;backendType&quot;: &quot;A String&quot;, # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002613 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07002614 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the instance was created in RFC 3339 format (https://tools.ietf.org/html/rfc3339), for example 2012-11-15T16:19:00.094Z
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002615 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been deprecated. Use the &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud Monitoring API instead. Please see this announcement for details.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002616 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11*, *POSTGRES_12*, *POSTGRES_13* (default). SQL Server instances: *SQLSERVER_2019_STANDARD*, *SQLSERVER_2019_ENTERPRISE*, *SQLSERVER_2019_EXPRESS*, or *SQLSERVER_2019_WEB*, *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.
2617 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002618 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
2619 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
2620 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002621 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002622 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
2623 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
2624 },
2625 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002626 &quot;failoverReplica&quot;: { # The name and status of the failover replica.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002627 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002628 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn&#x27;t include the project ID.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002629 },
2630 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone.
2631 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer&#x27;s premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica.
2632 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
2633 { # Database instance IP Mapping.
2634 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
2635 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired.
2636 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported.
2637 },
2638 ],
2639 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
2640 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
2641 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
2642 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002643 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002644 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
2645 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2646 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
2647 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
2648 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
2649 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
2650 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
2651 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07002652 &quot;sourceInstance&quot;: { # Reference to another Cloud SQL instance. # The reference to Cloud SQL instance if the source is Cloud SQL.
2653 &quot;name&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance being referenced. This does not include the project ID.
2654 &quot;project&quot;: &quot;A String&quot;, # The project ID of the Cloud SQL instance being referenced. The default is the same project ID as the instance references it.
2655 &quot;region&quot;: &quot;A String&quot;, # The region of the Cloud SQL instance being referenced.
2656 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002657 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
2658 },
yoshi-code-bot36591372021-06-16 00:22:06 -07002659 &quot;outOfDiskReport&quot;: { # This message wraps up the information written by out-of-disk detection job. # This field represents the report generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
2660 &quot;sqlMinRecommendedIncreaseSizeGb&quot;: 42, # The minimum recommended increase size in GigaBytes This field is consumed by the frontend Writers: -- the proactive database wellness job for OOD.
2661 &quot;sqlOutOfDiskState&quot;: &quot;A String&quot;, # This field represents the state generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
yoshi-code-bot64143a02021-04-27 05:08:04 -07002662 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002663 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
2664 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002665 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
2666 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002667 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002668 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002669 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002670 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
2671 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002672 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
2673 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002674 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
2675 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
2676 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
2677 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002678 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
2679 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the primary instance&#x27;s Common Name value in the certificate that it sends during the SSL handshake.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002680 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002681 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002682 &quot;replicaNames&quot;: [ # The replicas of the instance.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002683 &quot;A String&quot;,
2684 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002685 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002686 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002687 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002688 &quot;canDefer&quot;: True or False,
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002689 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07002690 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002691 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
2692 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002693 &quot;secondaryGceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. Reserved for future use.
2694 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2695 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
2696 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
2697 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
2698 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
2699 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*
2700 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2701 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
2702 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
2703 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2704 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
2705 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07002706 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002707 &quot;settings&quot;: { # Database instance settings. # The user settings.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002708 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002709 &quot;activeDirectoryConfig&quot;: { # Active Directory configuration, relevant only for Cloud SQL for SQL Server. # Active Directory configuration, relevant only for Cloud SQL for SQL Server.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002710 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002711 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002712 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002713 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002714 &quot;A String&quot;,
2715 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002716 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002717 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
2718 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
2719 &quot;retainedBackups&quot;: 42, # Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is &#x27;COUNT&#x27;, we will retain this many backups.
2720 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
2721 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002722 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002723 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
2724 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
2725 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07002726 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002727 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
2728 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
2729 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
2730 },
2731 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
2732 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.
2733 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
2734 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
2735 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
2736 { # Database flags for Cloud SQL instances.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002737 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so include both server options and system variables. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002738 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn&#x27;t take a value.
2739 },
2740 ],
2741 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
2742 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
2743 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
2744 &quot;endDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
2745 &quot;startDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
2746 &quot;time&quot;: &quot;A String&quot;, # Time in UTC when the &quot;deny maintenance period&quot; starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00
2747 },
2748 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002749 &quot;insightsConfig&quot;: { # Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration. # Insights configuration, for now relevant only for Postgres.
2750 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002751 &quot;queryPlansPerMinute&quot;: 42, # Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002752 &quot;queryStringLength&quot;: 42, # Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query length more than this field value will be truncated to this value. When unset, query length will be the default value. Changing query length will restart the database.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002753 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
2754 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
2755 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002756 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07002757 &quot;allocatedIpRange&quot;: &quot;A String&quot;, # The name of the allocated ip range for the private ip CloudSQL instance. For example: &quot;google-managed-services-default&quot;. If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.` Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002758 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance using the IP. In &#x27;CIDR&#x27; notation, also known as &#x27;slash&#x27; notation (for example: *192.168.100.0/24*).
2759 { # An entry for an Access Control list.
2760 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2761 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
2762 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
2763 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
2764 },
2765 ],
2766 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
2767 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set.
2768 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
2769 },
2770 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
2771 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.
2772 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
2773 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
2774 &quot;secondaryZone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). Reserved for future use.
2775 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002776 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002777 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes.
2778 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
2779 &quot;hour&quot;: 42, # hour of day - 0 to 23.
2780 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
2781 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002782 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002783 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances.
2784 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances.
2785 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
2786 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002787 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04002788 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-custom-1-3840* .
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002789 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
2790 &quot;a_key&quot;: &quot;A String&quot;,
2791 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002792 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002793 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance is running, or has been stopped by owner. *SUSPENDED*: The instance is not available, for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002794 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
2795 &quot;A String&quot;,
2796 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002797}
Craig Citroe633be12015-03-02 13:40:36 -08002798
Dan O'Mearadd494642020-05-01 07:42:23 -07002799 x__xgafv: string, V1 error format.
2800 Allowed values
2801 1 - v1 error format
2802 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002803
2804Returns:
2805 An object of the form:
2806
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002807 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002808 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2809 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2810 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2811 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002812 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2813 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2814 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2815 { # Database instance operation error.
2816 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2817 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2818 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2819 },
2820 ],
2821 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2822 },
2823 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002824 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002825 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002826 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002827 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002828 &quot;A String&quot;,
2829 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002830 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002831 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2832 &quot;offload&quot;: True or False, # Option for export offload.
2833 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2834 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002835 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002836 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002837 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2838 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002839 &quot;A String&quot;,
2840 ],
2841 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002842 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002843 },
2844 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2845 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2846 &quot;encryptionOptions&quot;: {
2847 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2848 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2849 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002850 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002851 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002852 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2853 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
2854 &quot;A String&quot;,
2855 ],
2856 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2857 },
2858 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
2859 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2860 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2861 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002862 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs://bucketName/fileName*. Compressed gzip files (.gz) are supported when *fileType* is *SQL*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002863 },
2864 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2865 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2866 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
2867 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
2868 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2869 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2870 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2871 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2872 &quot;targetLink&quot;: &quot;A String&quot;,
2873 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2874 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2875}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08002876</div>
2877
2878</body></html>