blob: 7e59129ca8b1c2b6baeef4c44c4a954e415520c1 [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -07001<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
75<h1><a href="sql_v1beta4.html">Cloud SQL Admin API</a> . <a href="sql_v1beta4.instances.html">instances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#addServerCa">addServerCa(project, instance, x__xgafv=None)</a></code></p>
79<p class="firstline">Add a new trusted Certificate Authority (CA) version for the specified</p>
80<p class="toc_element">
81 <code><a href="#clone">clone(project, instance, body=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Creates a Cloud SQL instance as a clone of the source instance. Using this</p>
83<p class="toc_element">
84 <code><a href="#delete">delete(project, instance, x__xgafv=None)</a></code></p>
85<p class="firstline">Deletes a Cloud SQL instance.</p>
86<p class="toc_element">
87 <code><a href="#demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Demotes the stand-alone instance to be a Cloud SQL read replica for an</p>
89<p class="toc_element">
90 <code><a href="#export">export(project, instance, body=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL</p>
92<p class="toc_element">
93 <code><a href="#failover">failover(project, instance, body=None, x__xgafv=None)</a></code></p>
94<p class="firstline">Failover the instance to its failover replica instance. Using this</p>
95<p class="toc_element">
96 <code><a href="#get">get(project, instance, x__xgafv=None)</a></code></p>
97<p class="firstline">Retrieves a resource containing information about a Cloud SQL instance.</p>
98<p class="toc_element">
99 <code><a href="#import_">import_(project, instance, body=None, x__xgafv=None)</a></code></p>
100<p class="firstline">Imports data into a Cloud SQL instance from a SQL dump or CSV file in</p>
101<p class="toc_element">
102 <code><a href="#insert">insert(project, body=None, x__xgafv=None)</a></code></p>
103<p class="firstline">Creates a new Cloud SQL instance.</p>
104<p class="toc_element">
105 <code><a href="#list">list(project, pageToken=None, maxResults=None, filter=None, x__xgafv=None)</a></code></p>
106<p class="firstline">Lists instances under a given project.</p>
107<p class="toc_element">
108 <code><a href="#listServerCas">listServerCas(project, instance, x__xgafv=None)</a></code></p>
109<p class="firstline">Lists all of the trusted Certificate Authorities (CAs) for the specified</p>
110<p class="toc_element">
111 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
112<p class="firstline">Retrieves the next page of results.</p>
113<p class="toc_element">
114 <code><a href="#patch">patch(project, instance, body=None, x__xgafv=None)</a></code></p>
115<p class="firstline">Updates settings of a Cloud SQL instance.</p>
116<p class="toc_element">
117 <code><a href="#promoteReplica">promoteReplica(project, instance, x__xgafv=None)</a></code></p>
118<p class="firstline">Promotes the read replica instance to be a stand-alone Cloud SQL instance.</p>
119<p class="toc_element">
120 <code><a href="#resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</a></code></p>
121<p class="firstline">Deletes all client certificates and generates a new server SSL certificate</p>
122<p class="toc_element">
123 <code><a href="#restart">restart(project, instance, x__xgafv=None)</a></code></p>
124<p class="firstline">Restarts a Cloud SQL instance.</p>
125<p class="toc_element">
126 <code><a href="#restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</a></code></p>
127<p class="firstline">Restores a backup of a Cloud SQL instance. Using this operation might cause</p>
128<p class="toc_element">
129 <code><a href="#rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</a></code></p>
130<p class="firstline">Rotates the server certificate to one signed by the Certificate Authority</p>
131<p class="toc_element">
132 <code><a href="#startReplica">startReplica(project, instance, x__xgafv=None)</a></code></p>
133<p class="firstline">Starts the replication in the read replica instance.</p>
134<p class="toc_element">
135 <code><a href="#stopReplica">stopReplica(project, instance, x__xgafv=None)</a></code></p>
136<p class="firstline">Stops the replication in the read replica instance.</p>
137<p class="toc_element">
138 <code><a href="#truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</a></code></p>
139<p class="firstline">Truncate MySQL general and slow query log tables</p>
140<p class="toc_element">
141 <code><a href="#update">update(project, instance, body=None, x__xgafv=None)</a></code></p>
142<p class="firstline">Updates settings of a Cloud SQL instance. Using this operation might cause</p>
143<h3>Method Details</h3>
144<div class="method">
145 <code class="details" id="addServerCa">addServerCa(project, instance, x__xgafv=None)</code>
146 <pre>Add a new trusted Certificate Authority (CA) version for the specified
147instance. Required to prepare for a certificate rotation. If a CA version
148was previously added but never used in a certificate rotation, this
149operation replaces that version. There cannot be more than one CA version
150waiting to be rotated in.
151
152Args:
153 project: string, Project ID of the project that contains the instance. (required)
154 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
155 x__xgafv: string, V1 error format.
156 Allowed values
157 1 - v1 error format
158 2 - v2 error format
159
160Returns:
161 An object of the form:
162
163 { # An Operation resource.&amp;nbsp;For successful operations that return an
164 # Operation resource, only the fields relevant to the operation are populated
165 # in the resource.
166 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
167 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
168 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
169 &quot;targetLink&quot;: &quot;A String&quot;,
170 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
171 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
172 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
173 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
174 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
175 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
176 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
177 # populated.
178 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
179 { # Database instance operation error.
180 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
181 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
182 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
183 },
184 ],
185 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
186 },
187 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
188 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
189 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
190 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
191 # of the database table are loaded with CSV data.
192 &quot;A String&quot;,
193 ],
194 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
195 },
196 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
197 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
198 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
199 # specify a database, and is overridden by any database specification in the
200 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
201 # must be specified.
202 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
203 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
204 &quot;encryptionOptions&quot;: {
205 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
206 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
207 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
208 # write permissions to the bucket and read access to the file.
209 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
210 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
211 # write permissions to the bucket and read access to the file.
212 },
213 },
214 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
215 # &lt;code&gt;gs:
216 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
217 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
218 # // write permissions to the bucket and read access to the file.
219 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
220 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
221 },
222 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
223 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
224 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
225 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
226 # identifier to retrieve the Operations resource that has information about
227 # the operation.
228 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
229 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
230 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
231 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
232 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
233 # either by using this property or by using the
234 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
235 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
236 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
237 # this database must match the one specified in the
238 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
239 &quot;A String&quot;,
240 ],
241 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
242 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
243 # you specify tables, specify one and only one database. For PostgreSQL
244 # instances, you can specify only one table.
245 &quot;A String&quot;,
246 ],
247 &quot;schemaOnly&quot;: True or False, # Export only schemas.
248 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
249 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
250 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
251 # a CHANGE MASTER TO statement with the binary log coordinates.
252 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
253 # a SQL comment, and has no effect.
254 # All other values are ignored.
255 },
256 },
257 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
258 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
259 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
260 # stored. The URI is in the form &lt;code&gt;gs:
261 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
262 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
263 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
264 # // compressed.
265 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
266 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
267 },
268 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
269 },
270 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
271 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
272 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
273 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
274 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
275 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
276 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
277 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
278 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
279 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
280 }</pre>
281</div>
282
283<div class="method">
284 <code class="details" id="clone">clone(project, instance, body=None, x__xgafv=None)</code>
285 <pre>Creates a Cloud SQL instance as a clone of the source instance. Using this
286operation might cause your instance to restart.
287
288Args:
289 project: string, Project ID of the source as well as the clone Cloud SQL instance. (required)
290 instance: string, The ID of the Cloud SQL instance to be cloned (source). This does not
291include the project ID. (required)
292 body: object, The request body.
293 The object takes the form of:
294
295{ # Database instance clone request.
296 &quot;cloneContext&quot;: { # Database instance clone context. # Contains details about the clone operation.
297 &quot;pitrTimestampMs&quot;: &quot;A String&quot;, # Reserved for future use.
298 &quot;binLogCoordinates&quot;: { # Binary log coordinates. # Binary log coordinates, if specified, identify the position up to which the
299 # source instance should be cloned. If not specified, the source instance is
300 # cloned up to the most recent binary log coordinates.
301 &quot;binLogPosition&quot;: &quot;A String&quot;, # Position (offset) within the binary log file.
302 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#binLogCoordinates&lt;/code&gt;.
303 &quot;binLogFileName&quot;: &quot;A String&quot;, # Name of the binary log file for a Cloud SQL instance.
304 },
305 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#cloneContext&lt;/code&gt;.
306 &quot;pointInTime&quot;: &quot;A String&quot;, # Reserved for future use.
307 &quot;destinationInstanceName&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance to be created as a clone.
308 },
309 }
310
311 x__xgafv: string, V1 error format.
312 Allowed values
313 1 - v1 error format
314 2 - v2 error format
315
316Returns:
317 An object of the form:
318
319 { # An Operation resource.&amp;nbsp;For successful operations that return an
320 # Operation resource, only the fields relevant to the operation are populated
321 # in the resource.
322 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
323 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
324 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
325 &quot;targetLink&quot;: &quot;A String&quot;,
326 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
327 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
328 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
329 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
330 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
331 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
332 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
333 # populated.
334 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
335 { # Database instance operation error.
336 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
337 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
338 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
339 },
340 ],
341 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
342 },
343 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
344 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
345 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
346 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
347 # of the database table are loaded with CSV data.
348 &quot;A String&quot;,
349 ],
350 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
351 },
352 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
353 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
354 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
355 # specify a database, and is overridden by any database specification in the
356 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
357 # must be specified.
358 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
359 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
360 &quot;encryptionOptions&quot;: {
361 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
362 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
363 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
364 # write permissions to the bucket and read access to the file.
365 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
366 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
367 # write permissions to the bucket and read access to the file.
368 },
369 },
370 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
371 # &lt;code&gt;gs:
372 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
373 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
374 # // write permissions to the bucket and read access to the file.
375 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
376 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
377 },
378 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
379 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
380 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
381 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
382 # identifier to retrieve the Operations resource that has information about
383 # the operation.
384 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
385 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
386 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
387 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
388 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
389 # either by using this property or by using the
390 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
391 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
392 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
393 # this database must match the one specified in the
394 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
395 &quot;A String&quot;,
396 ],
397 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
398 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
399 # you specify tables, specify one and only one database. For PostgreSQL
400 # instances, you can specify only one table.
401 &quot;A String&quot;,
402 ],
403 &quot;schemaOnly&quot;: True or False, # Export only schemas.
404 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
405 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
406 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
407 # a CHANGE MASTER TO statement with the binary log coordinates.
408 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
409 # a SQL comment, and has no effect.
410 # All other values are ignored.
411 },
412 },
413 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
414 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
415 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
416 # stored. The URI is in the form &lt;code&gt;gs:
417 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
418 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
419 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
420 # // compressed.
421 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
422 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
423 },
424 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
425 },
426 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
427 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
428 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
429 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
430 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
431 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
432 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
433 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
434 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
435 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
436 }</pre>
437</div>
438
439<div class="method">
440 <code class="details" id="delete">delete(project, instance, x__xgafv=None)</code>
441 <pre>Deletes a Cloud SQL instance.
442
443Args:
444 project: string, Project ID of the project that contains the instance to be deleted. (required)
445 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
446 x__xgafv: string, V1 error format.
447 Allowed values
448 1 - v1 error format
449 2 - v2 error format
450
451Returns:
452 An object of the form:
453
454 { # An Operation resource.&amp;nbsp;For successful operations that return an
455 # Operation resource, only the fields relevant to the operation are populated
456 # in the resource.
457 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
458 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
459 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
460 &quot;targetLink&quot;: &quot;A String&quot;,
461 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
462 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
463 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
464 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
465 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
466 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
467 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
468 # populated.
469 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
470 { # Database instance operation error.
471 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
472 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
473 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
474 },
475 ],
476 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
477 },
478 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
479 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
480 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
481 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
482 # of the database table are loaded with CSV data.
483 &quot;A String&quot;,
484 ],
485 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
486 },
487 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
488 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
489 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
490 # specify a database, and is overridden by any database specification in the
491 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
492 # must be specified.
493 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
494 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
495 &quot;encryptionOptions&quot;: {
496 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
497 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
498 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
499 # write permissions to the bucket and read access to the file.
500 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
501 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
502 # write permissions to the bucket and read access to the file.
503 },
504 },
505 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
506 # &lt;code&gt;gs:
507 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
508 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
509 # // write permissions to the bucket and read access to the file.
510 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
511 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
512 },
513 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
514 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
515 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
516 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
517 # identifier to retrieve the Operations resource that has information about
518 # the operation.
519 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
520 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
521 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
522 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
523 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
524 # either by using this property or by using the
525 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
526 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
527 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
528 # this database must match the one specified in the
529 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
530 &quot;A String&quot;,
531 ],
532 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
533 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
534 # you specify tables, specify one and only one database. For PostgreSQL
535 # instances, you can specify only one table.
536 &quot;A String&quot;,
537 ],
538 &quot;schemaOnly&quot;: True or False, # Export only schemas.
539 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
540 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
541 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
542 # a CHANGE MASTER TO statement with the binary log coordinates.
543 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
544 # a SQL comment, and has no effect.
545 # All other values are ignored.
546 },
547 },
548 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
549 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
550 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
551 # stored. The URI is in the form &lt;code&gt;gs:
552 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
553 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
554 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
555 # // compressed.
556 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
557 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
558 },
559 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
560 },
561 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
562 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
563 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
564 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
565 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
566 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
567 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
568 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
569 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
570 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
571 }</pre>
572</div>
573
574<div class="method">
575 <code class="details" id="demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</code>
576 <pre>Demotes the stand-alone instance to be a Cloud SQL read replica for an
577external database server.
578
579Args:
580 project: string, ID of the project that contains the instance. (required)
581 instance: string, Cloud SQL instance name. (required)
582 body: object, The request body.
583 The object takes the form of:
584
585{ # Database demote master request.
586 &quot;demoteMasterContext&quot;: { # Database instance demote master context. # Contains details about the demoteMaster operation.
587 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the on-premises master. # Configuration specific to read-replicas replicating from the on-premises
588 # master.
589 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#demoteMasterConfiguration&lt;/code&gt;.
590 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
591 # master. Replication configuration information such as the username,
592 # password, certificates, and keys are not stored in the instance metadata.
593 # The configuration information is used only to set up the replication
594 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
595 # in the data directory.
596 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
597 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
598 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
599 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#demoteMasterMysqlReplicaConfiguration&lt;/code&gt;.
600 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
601 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
602 # is encoded in the client&#x27;s certificate. The format of the slave&#x27;s private
603 # key can be either PKCS #1 or PKCS #8.
604 },
605 },
606 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#demoteMasterContext&lt;/code&gt;.
607 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as on-premises master in the
608 # replication setup.
609 &quot;verifyGtidConsistency&quot;: True or False, # Verify GTID consistency for demote operation. Default value:
610 # &lt;code&gt;True&lt;/code&gt;. Second Generation instances only. Setting this flag to
611 # false enables you to bypass GTID consistency check between on-premises
612 # master and Cloud SQL instance during the demotion operation but also
613 # exposes you to the risk of future replication failures. Change the value
614 # only if you know the reason for the GTID divergence and are confident that
615 # doing so will not cause any replication issues.
616 },
617 }
618
619 x__xgafv: string, V1 error format.
620 Allowed values
621 1 - v1 error format
622 2 - v2 error format
623
624Returns:
625 An object of the form:
626
627 { # An Operation resource.&amp;nbsp;For successful operations that return an
628 # Operation resource, only the fields relevant to the operation are populated
629 # in the resource.
630 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
631 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
632 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
633 &quot;targetLink&quot;: &quot;A String&quot;,
634 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
635 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
636 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
637 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
638 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
639 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
640 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
641 # populated.
642 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
643 { # Database instance operation error.
644 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
645 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
646 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
647 },
648 ],
649 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
650 },
651 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
652 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
653 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
654 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
655 # of the database table are loaded with CSV data.
656 &quot;A String&quot;,
657 ],
658 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
659 },
660 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
661 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
662 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
663 # specify a database, and is overridden by any database specification in the
664 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
665 # must be specified.
666 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
667 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
668 &quot;encryptionOptions&quot;: {
669 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
670 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
671 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
672 # write permissions to the bucket and read access to the file.
673 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
674 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
675 # write permissions to the bucket and read access to the file.
676 },
677 },
678 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
679 # &lt;code&gt;gs:
680 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
681 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
682 # // write permissions to the bucket and read access to the file.
683 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
684 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
685 },
686 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
687 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
688 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
689 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
690 # identifier to retrieve the Operations resource that has information about
691 # the operation.
692 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
693 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
694 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
695 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
696 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
697 # either by using this property or by using the
698 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
699 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
700 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
701 # this database must match the one specified in the
702 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
703 &quot;A String&quot;,
704 ],
705 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
706 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
707 # you specify tables, specify one and only one database. For PostgreSQL
708 # instances, you can specify only one table.
709 &quot;A String&quot;,
710 ],
711 &quot;schemaOnly&quot;: True or False, # Export only schemas.
712 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
713 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
714 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
715 # a CHANGE MASTER TO statement with the binary log coordinates.
716 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
717 # a SQL comment, and has no effect.
718 # All other values are ignored.
719 },
720 },
721 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
722 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
723 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
724 # stored. The URI is in the form &lt;code&gt;gs:
725 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
726 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
727 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
728 # // compressed.
729 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
730 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
731 },
732 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
733 },
734 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
735 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
736 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
737 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
738 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
739 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
740 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
741 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
742 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
743 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
744 }</pre>
745</div>
746
747<div class="method">
748 <code class="details" id="export">export(project, instance, body=None, x__xgafv=None)</code>
749 <pre>Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL
750dump or CSV file.
751
752Args:
753 project: string, Project ID of the project that contains the instance to be exported. (required)
754 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
755 body: object, The request body.
756 The object takes the form of:
757
758{ # Database instance export request.
759 &quot;exportContext&quot;: { # Database instance export context. # Contains details about the export operation.
760 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
761 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
762 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
763 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
764 # either by using this property or by using the
765 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
766 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
767 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
768 # this database must match the one specified in the
769 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
770 &quot;A String&quot;,
771 ],
772 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
773 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
774 # you specify tables, specify one and only one database. For PostgreSQL
775 # instances, you can specify only one table.
776 &quot;A String&quot;,
777 ],
778 &quot;schemaOnly&quot;: True or False, # Export only schemas.
779 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
780 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
781 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
782 # a CHANGE MASTER TO statement with the binary log coordinates.
783 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
784 # a SQL comment, and has no effect.
785 # All other values are ignored.
786 },
787 },
788 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
789 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
790 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
791 # stored. The URI is in the form &lt;code&gt;gs:
792 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
793 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
794 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
795 # // compressed.
796 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
797 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
798 },
799 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
800 },
801 }
802
803 x__xgafv: string, V1 error format.
804 Allowed values
805 1 - v1 error format
806 2 - v2 error format
807
808Returns:
809 An object of the form:
810
811 { # An Operation resource.&amp;nbsp;For successful operations that return an
812 # Operation resource, only the fields relevant to the operation are populated
813 # in the resource.
814 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
815 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
816 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
817 &quot;targetLink&quot;: &quot;A String&quot;,
818 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
819 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
820 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
821 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
822 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
823 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
824 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
825 # populated.
826 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
827 { # Database instance operation error.
828 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
829 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
830 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
831 },
832 ],
833 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
834 },
835 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
836 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
837 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
838 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
839 # of the database table are loaded with CSV data.
840 &quot;A String&quot;,
841 ],
842 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
843 },
844 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
845 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
846 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
847 # specify a database, and is overridden by any database specification in the
848 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
849 # must be specified.
850 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
851 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
852 &quot;encryptionOptions&quot;: {
853 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
854 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
855 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
856 # write permissions to the bucket and read access to the file.
857 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
858 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
859 # write permissions to the bucket and read access to the file.
860 },
861 },
862 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
863 # &lt;code&gt;gs:
864 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
865 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
866 # // write permissions to the bucket and read access to the file.
867 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
868 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
869 },
870 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
871 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
872 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
873 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
874 # identifier to retrieve the Operations resource that has information about
875 # the operation.
876 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
877 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
878 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
879 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
880 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
881 # either by using this property or by using the
882 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
883 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
884 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
885 # this database must match the one specified in the
886 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
887 &quot;A String&quot;,
888 ],
889 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
890 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
891 # you specify tables, specify one and only one database. For PostgreSQL
892 # instances, you can specify only one table.
893 &quot;A String&quot;,
894 ],
895 &quot;schemaOnly&quot;: True or False, # Export only schemas.
896 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
897 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
898 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
899 # a CHANGE MASTER TO statement with the binary log coordinates.
900 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
901 # a SQL comment, and has no effect.
902 # All other values are ignored.
903 },
904 },
905 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
906 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
907 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
908 # stored. The URI is in the form &lt;code&gt;gs:
909 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
910 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
911 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
912 # // compressed.
913 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
914 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
915 },
916 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
917 },
918 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
919 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
920 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
921 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
922 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
923 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
924 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
925 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
926 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
927 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
928 }</pre>
929</div>
930
931<div class="method">
932 <code class="details" id="failover">failover(project, instance, body=None, x__xgafv=None)</code>
933 <pre>Failover the instance to its failover replica instance. Using this
934operation might cause your instance to restart.
935
936Args:
937 project: string, ID of the project that contains the read replica. (required)
938 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
939 body: object, The request body.
940 The object takes the form of:
941
942{ # Instance failover request.
943 &quot;failoverContext&quot;: { # Database instance failover context. # Failover Context.
944 &quot;settingsVersion&quot;: &quot;A String&quot;, # The current settings version of this instance. Request will be rejected if
945 # this version doesn&#x27;t match the current settings version.
946 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#failoverContext&lt;/code&gt;.
947 },
948 }
949
950 x__xgafv: string, V1 error format.
951 Allowed values
952 1 - v1 error format
953 2 - v2 error format
954
955Returns:
956 An object of the form:
957
958 { # An Operation resource.&amp;nbsp;For successful operations that return an
959 # Operation resource, only the fields relevant to the operation are populated
960 # in the resource.
961 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
962 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
963 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
964 &quot;targetLink&quot;: &quot;A String&quot;,
965 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
966 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
967 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
968 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
969 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
970 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
971 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
972 # populated.
973 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
974 { # Database instance operation error.
975 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
976 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
977 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
978 },
979 ],
980 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
981 },
982 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
983 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
984 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
985 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
986 # of the database table are loaded with CSV data.
987 &quot;A String&quot;,
988 ],
989 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
990 },
991 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
992 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
993 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
994 # specify a database, and is overridden by any database specification in the
995 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
996 # must be specified.
997 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
998 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
999 &quot;encryptionOptions&quot;: {
1000 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1001 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
1002 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1003 # write permissions to the bucket and read access to the file.
1004 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
1005 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1006 # write permissions to the bucket and read access to the file.
1007 },
1008 },
1009 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
1010 # &lt;code&gt;gs:
1011 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
1012 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
1013 # // write permissions to the bucket and read access to the file.
1014 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1015 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1016 },
1017 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
1018 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
1019 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
1020 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
1021 # identifier to retrieve the Operations resource that has information about
1022 # the operation.
1023 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1024 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
1025 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
1026 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
1027 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
1028 # either by using this property or by using the
1029 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
1030 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
1031 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
1032 # this database must match the one specified in the
1033 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
1034 &quot;A String&quot;,
1035 ],
1036 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1037 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
1038 # you specify tables, specify one and only one database. For PostgreSQL
1039 # instances, you can specify only one table.
1040 &quot;A String&quot;,
1041 ],
1042 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1043 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1044 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
1045 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
1046 # a CHANGE MASTER TO statement with the binary log coordinates.
1047 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
1048 # a SQL comment, and has no effect.
1049 # All other values are ignored.
1050 },
1051 },
1052 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1053 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1054 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
1055 # stored. The URI is in the form &lt;code&gt;gs:
1056 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
1057 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
1058 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
1059 # // compressed.
1060 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
1061 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1062 },
1063 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
1064 },
1065 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1066 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
1067 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1068 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1069 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
1070 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1071 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1072 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
1073 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1074 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1075 }</pre>
1076</div>
1077
1078<div class="method">
1079 <code class="details" id="get">get(project, instance, x__xgafv=None)</code>
1080 <pre>Retrieves a resource containing information about a Cloud SQL instance.
1081
1082Args:
1083 project: string, Project ID of the project that contains the instance. (required)
1084 instance: string, Database instance ID. This does not include the project ID. (required)
1085 x__xgafv: string, V1 error format.
1086 Allowed values
1087 1 - v1 error format
1088 2 - v2 error format
1089
1090Returns:
1091 An object of the form:
1092
1093 { # A Cloud SQL instance resource.
1094 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. This property is applicable only
1095 # to First Generation instances.
1096 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1097 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
1098 # Applies only to Second Generation instances.
1099 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1100 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
1101 },
1102 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
1103 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
1104 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
1105 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
1106 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
1107 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
1108 # or Second Generation). The region can not be changed after instance
1109 # creation.
1110 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the
1111 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
1112 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
1113 # available, for example due to problems with billing.
1114 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
1115 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
1116 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
1117 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
1118 &quot;backendType&quot;: &quot;A String&quot;, # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
1119 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
1120 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
1121 # managed by Google. &lt;br&gt;This property is read-only; use the
1122 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
1123 # the database type and Second or First Generation.
1124 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1125 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1126 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1127 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
1128 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1129 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1130 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
1131 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1132 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
1133 # is encoded in the client&#x27;s certificate.
1134 },
1135 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google
1136 # apps domain is prefixed if applicable.
1137 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property
1138 # is applicable only to Second Generation instances.
1139 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
1140 # field can not be changed after instance creation. MySQL Second Generation
1141 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
1142 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
1143 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
1144 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
1145 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1146 &quot;A String&quot;,
1147 ],
1148 &quot;settings&quot;: { # Database instance settings. # The user settings.
1149 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
1150 # instance IP and manage which external networks can connect to the instance.
1151 # The IPv4 address cannot be disabled for Second Generation instances.
1152 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is
1153 # accessible for private IP. For example,
1154 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
1155 # be updated, but it cannot be removed after it is set.
1156 &quot;ipv4Enabled&quot;: True or False, # Whether the instance should be assigned an IP address or not.
1157 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance
1158 # using the IP. In &lt;a
1159 # href=&quot;http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation&quot;&gt;CIDR
1160 # notation&lt;/a&gt;, also known as &#x27;slash&#x27; notation (e.g.
1161 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
1162 { # An entry for an Access Control list.
1163 &quot;value&quot;: &quot;A String&quot;, # The whitelisted value for the access control list.
1164 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in &lt;a
1165 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1166 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1167 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1168 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
1169 },
1170 ],
1171 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP should be enforced or not.
1172 },
1173 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type (PostgreSQL and MySQL instances only). Potential values:
1174 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
1175 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
1176 # The instance can serve data from more than one zone in a region (it is
1177 # highly available). &lt;br&gt;For more information, see &lt;a
1178 # href=&quot;https://cloud.google.com/sql/docs/postgres/high-availability&quot;&gt;Overview
1179 # of the High Availability Configuration&lt;/a&gt;.
1180 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update
1181 # method to make sure concurrent updates are handled properly. During update,
1182 # use the most recent settingsVersion value for this instance and do not try
1183 # to update this value.
1184 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1185 { # Database flags for Cloud SQL instances.
1186 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans should be set to &lt;code&gt;on&lt;/code&gt; for true
1187 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
1188 # doesn&#x27;t take a value.
1189 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so
1190 # include both server options and system variables for MySQL. Flags should be
1191 # specified with underscores, not hyphens. For more information, see &lt;a
1192 # href=&quot;/sql/docs/mysql/flags&quot;&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
1193 # SQL documentation.
1194 },
1195 ],
1196 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance
1197 # can be restarted for maintenance purposes. Not used for First Generation
1198 # instances.
1199 # preferably be restarted for system maintenance purposes.
1200 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: &lt;code&gt;canary&lt;/code&gt; (Earlier) or
1201 # &lt;code&gt;stable&lt;/code&gt; (Later). &lt;br /&gt;&lt;a
1202 # href=&quot;/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen&quot;&gt;
1203 # Learn more&lt;/a&gt;.
1204 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1205 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1206 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
1207 },
1208 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either &lt;code&gt;PER_USE&lt;/code&gt;
1209 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
1210 # Generation instances.
1211 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is
1212 # true. Not used for First Generation instances.
1213 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased.
1214 # The default value is 0, which specifies that there is no limit. Not used
1215 # for First Generation instances.
1216 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. First Generation
1217 # instances only.
1218 &quot;A String&quot;,
1219 ],
1220 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example
1221 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
1222 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
1223 # this property determines whether the instance is First or Second
1224 # Generation. For more information, see &lt;a
1225 # href=&quot;/sql/docs/db_path/instance-settings&quot;&gt;Instance Settings&lt;/a&gt;.
1226 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
1227 # for First Generation instances.
1228 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
1229 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
1230 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
1231 # replication is enabled or not.
1232 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
1233 # database flags for crash-safe replication are enabled. This property is
1234 # only applicable to First Generation instances.
1235 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1236 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
1237 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24
1238 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
1239 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
1240 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1241 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
1242 # disabled, binarylog must be disabled as well.
1243 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1244 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1245 },
1246 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a
1247 # single key value pair.
1248 &quot;a_key&quot;: &quot;A String&quot;,
1249 },
1250 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as
1251 # near as possible to either an App Engine app or Compute Engine zone for
1252 # better performance. App Engine co-location is only applicable to First
1253 # Generation instances.
1254 # preferably be located, either in a specific Compute Engine zone, or
1255 # co-located with an App Engine application. Note that if the preferred
1256 # location is not available, the instance will be located as close as possible
1257 # within the region. Only one location may be specified.
1258 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The AppEngine application to follow, it must be in the same region as the
1259 # Cloud SQL instance.
1260 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
1261 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
1262 # etc.).
1263 },
1264 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
1265 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either
1266 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
1267 # only applicable to First Generation instances.
1268 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is
1269 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
1270 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
1271 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
1272 # off; it is not activated, even if a connection request arrives.
1273 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
1274 # responds to incoming requests, and turns itself off when not in use.
1275 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
1276 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
1277 # 12 hours of inactivity.
1278 },
1279 &quot;replicaNames&quot;: [ # The replicas of the instance.
1280 &quot;A String&quot;,
1281 ],
1282 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
1283 # Applies only to Second Generation instances.
1284 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
1285 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1286 },
1287 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
1288 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1289 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1290 &quot;canDefer&quot;: True or False,
1291 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1292 },
1293 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
1294 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
1295 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1296 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1297 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in &lt;a
1298 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1299 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1300 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1301 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1302 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1303 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
1304 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1305 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in &lt;a
1306 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1307 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
1308 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1309 },
1310 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1311 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1312 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as master in the replication setup.
1313 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following.
1314 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
1315 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
1316 # instance running on the
1317 # customer&#x27;s premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
1318 # instance configured as a read-replica.
1319 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This
1320 # value could be different from the zone that was specified when the instance
1321 # was created if the instance has failed over to its secondary zone.
1322 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been
1323 # deprecated. Users should use the
1324 # &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud
1325 # Monitoring API instead. Please see &lt;a
1326 # href=&quot;https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ&quot;&gt;this
1327 # announcement&lt;/a&gt; for details.
1328 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
1329 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
1330 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
1331 # master. Replication configuration information such as the username,
1332 # password, certificates, and keys are not stored in the instance metadata.
1333 # The configuration information is used only to set up the replication
1334 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
1335 # in the data directory.
1336 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
1337 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1338 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the master&#x27;s Common Name value in the certificate
1339 # that it sends during the SSL handshake.
1340 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
1341 # is encoded in the client&#x27;s certificate.
1342 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1343 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1344 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1345 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the slave
1346 # instance is to be created. The URI is in the form gs:
1347 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
1348 # // Dumps should have the binlog co-ordinates from which replication should
1349 # // begin. This can be accomplished by setting --master-data to 1 when using
1350 # // mysqldump.
1351 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
1352 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1353 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1354 },
1355 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to
1356 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
1357 # case the master instance fails, the replica instance will be promoted as
1358 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
1359 # target, and the replica has to be in different zone with the master
1360 # instance.
1361 },
1362 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
1363 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable
1364 # only to Second Generation instances.
1365 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates
1366 # that the failover replica is out of sync. The master can only failover to
1367 # the failover replica when the status is true.
1368 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a
1369 # failover replica is created for the instance. The name
1370 # doesn&#x27;t include the project ID. This property is applicable only to
1371 # Second Generation instances.
1372 },
1373 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1374 { # Database instance IP Mapping.
1375 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in &lt;a
1376 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1377 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
1378 # the IP is scheduled to be retired.
1379 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A &lt;code&gt;PRIMARY&lt;/code&gt; address is a public
1380 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
1381 # address is a private address that can accept incoming connections. An
1382 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
1383 # originating from the instance, if supported.
1384 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1385 },
1386 ],
1387 }</pre>
1388</div>
1389
1390<div class="method">
1391 <code class="details" id="import_">import_(project, instance, body=None, x__xgafv=None)</code>
1392 <pre>Imports data into a Cloud SQL instance from a SQL dump or CSV file in
1393Cloud Storage.
1394
1395Args:
1396 project: string, Project ID of the project that contains the instance. (required)
1397 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1398 body: object, The request body.
1399 The object takes the form of:
1400
1401{ # Database instance import request.
1402 &quot;importContext&quot;: { # Database instance import context. # Contains details about the import operation.
1403 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1404 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
1405 # of the database table are loaded with CSV data.
1406 &quot;A String&quot;,
1407 ],
1408 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1409 },
1410 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
1411 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
1412 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
1413 # specify a database, and is overridden by any database specification in the
1414 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
1415 # must be specified.
1416 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1417 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1418 &quot;encryptionOptions&quot;: {
1419 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1420 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
1421 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1422 # write permissions to the bucket and read access to the file.
1423 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
1424 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1425 # write permissions to the bucket and read access to the file.
1426 },
1427 },
1428 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
1429 # &lt;code&gt;gs:
1430 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
1431 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
1432 # // write permissions to the bucket and read access to the file.
1433 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1434 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1435 },
1436 }
1437
1438 x__xgafv: string, V1 error format.
1439 Allowed values
1440 1 - v1 error format
1441 2 - v2 error format
1442
1443Returns:
1444 An object of the form:
1445
1446 { # An Operation resource.&amp;nbsp;For successful operations that return an
1447 # Operation resource, only the fields relevant to the operation are populated
1448 # in the resource.
1449 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1450 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1451 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1452 &quot;targetLink&quot;: &quot;A String&quot;,
1453 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
1454 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
1455 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
1456 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
1457 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
1458 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
1459 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
1460 # populated.
1461 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1462 { # Database instance operation error.
1463 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1464 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1465 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
1466 },
1467 ],
1468 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
1469 },
1470 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
1471 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1472 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1473 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
1474 # of the database table are loaded with CSV data.
1475 &quot;A String&quot;,
1476 ],
1477 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1478 },
1479 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
1480 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
1481 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
1482 # specify a database, and is overridden by any database specification in the
1483 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
1484 # must be specified.
1485 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1486 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1487 &quot;encryptionOptions&quot;: {
1488 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1489 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
1490 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1491 # write permissions to the bucket and read access to the file.
1492 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
1493 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1494 # write permissions to the bucket and read access to the file.
1495 },
1496 },
1497 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
1498 # &lt;code&gt;gs:
1499 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
1500 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
1501 # // write permissions to the bucket and read access to the file.
1502 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1503 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1504 },
1505 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
1506 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
1507 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
1508 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
1509 # identifier to retrieve the Operations resource that has information about
1510 # the operation.
1511 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1512 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
1513 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
1514 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
1515 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
1516 # either by using this property or by using the
1517 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
1518 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
1519 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
1520 # this database must match the one specified in the
1521 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
1522 &quot;A String&quot;,
1523 ],
1524 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1525 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
1526 # you specify tables, specify one and only one database. For PostgreSQL
1527 # instances, you can specify only one table.
1528 &quot;A String&quot;,
1529 ],
1530 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1531 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1532 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
1533 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
1534 # a CHANGE MASTER TO statement with the binary log coordinates.
1535 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
1536 # a SQL comment, and has no effect.
1537 # All other values are ignored.
1538 },
1539 },
1540 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1541 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1542 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
1543 # stored. The URI is in the form &lt;code&gt;gs:
1544 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
1545 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
1546 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
1547 # // compressed.
1548 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
1549 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1550 },
1551 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
1552 },
1553 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1554 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
1555 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1556 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1557 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
1558 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1559 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1560 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
1561 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1562 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1563 }</pre>
1564</div>
1565
1566<div class="method">
1567 <code class="details" id="insert">insert(project, body=None, x__xgafv=None)</code>
1568 <pre>Creates a new Cloud SQL instance.
1569
1570Args:
1571 project: string, Project ID of the project to which the newly created Cloud SQL instances
1572should belong. (required)
1573 body: object, The request body.
1574 The object takes the form of:
1575
1576{ # A Cloud SQL instance resource.
1577 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. This property is applicable only
1578 # to First Generation instances.
1579 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1580 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
1581 # Applies only to Second Generation instances.
1582 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1583 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
1584 },
1585 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
1586 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
1587 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
1588 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
1589 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
1590 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
1591 # or Second Generation). The region can not be changed after instance
1592 # creation.
1593 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the
1594 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
1595 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
1596 # available, for example due to problems with billing.
1597 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
1598 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
1599 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
1600 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
1601 &quot;backendType&quot;: &quot;A String&quot;, # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
1602 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
1603 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
1604 # managed by Google. &lt;br&gt;This property is read-only; use the
1605 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
1606 # the database type and Second or First Generation.
1607 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1608 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1609 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1610 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
1611 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1612 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1613 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
1614 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1615 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
1616 # is encoded in the client&#x27;s certificate.
1617 },
1618 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google
1619 # apps domain is prefixed if applicable.
1620 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property
1621 # is applicable only to Second Generation instances.
1622 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
1623 # field can not be changed after instance creation. MySQL Second Generation
1624 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
1625 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
1626 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
1627 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
1628 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1629 &quot;A String&quot;,
1630 ],
1631 &quot;settings&quot;: { # Database instance settings. # The user settings.
1632 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
1633 # instance IP and manage which external networks can connect to the instance.
1634 # The IPv4 address cannot be disabled for Second Generation instances.
1635 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is
1636 # accessible for private IP. For example,
1637 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
1638 # be updated, but it cannot be removed after it is set.
1639 &quot;ipv4Enabled&quot;: True or False, # Whether the instance should be assigned an IP address or not.
1640 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance
1641 # using the IP. In &lt;a
1642 # href=&quot;http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation&quot;&gt;CIDR
1643 # notation&lt;/a&gt;, also known as &#x27;slash&#x27; notation (e.g.
1644 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
1645 { # An entry for an Access Control list.
1646 &quot;value&quot;: &quot;A String&quot;, # The whitelisted value for the access control list.
1647 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in &lt;a
1648 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1649 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1650 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1651 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
1652 },
1653 ],
1654 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP should be enforced or not.
1655 },
1656 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type (PostgreSQL and MySQL instances only). Potential values:
1657 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
1658 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
1659 # The instance can serve data from more than one zone in a region (it is
1660 # highly available). &lt;br&gt;For more information, see &lt;a
1661 # href=&quot;https://cloud.google.com/sql/docs/postgres/high-availability&quot;&gt;Overview
1662 # of the High Availability Configuration&lt;/a&gt;.
1663 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update
1664 # method to make sure concurrent updates are handled properly. During update,
1665 # use the most recent settingsVersion value for this instance and do not try
1666 # to update this value.
1667 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1668 { # Database flags for Cloud SQL instances.
1669 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans should be set to &lt;code&gt;on&lt;/code&gt; for true
1670 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
1671 # doesn&#x27;t take a value.
1672 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so
1673 # include both server options and system variables for MySQL. Flags should be
1674 # specified with underscores, not hyphens. For more information, see &lt;a
1675 # href=&quot;/sql/docs/mysql/flags&quot;&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
1676 # SQL documentation.
1677 },
1678 ],
1679 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance
1680 # can be restarted for maintenance purposes. Not used for First Generation
1681 # instances.
1682 # preferably be restarted for system maintenance purposes.
1683 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: &lt;code&gt;canary&lt;/code&gt; (Earlier) or
1684 # &lt;code&gt;stable&lt;/code&gt; (Later). &lt;br /&gt;&lt;a
1685 # href=&quot;/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen&quot;&gt;
1686 # Learn more&lt;/a&gt;.
1687 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1688 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1689 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
1690 },
1691 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either &lt;code&gt;PER_USE&lt;/code&gt;
1692 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
1693 # Generation instances.
1694 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is
1695 # true. Not used for First Generation instances.
1696 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased.
1697 # The default value is 0, which specifies that there is no limit. Not used
1698 # for First Generation instances.
1699 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. First Generation
1700 # instances only.
1701 &quot;A String&quot;,
1702 ],
1703 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example
1704 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
1705 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
1706 # this property determines whether the instance is First or Second
1707 # Generation. For more information, see &lt;a
1708 # href=&quot;/sql/docs/db_path/instance-settings&quot;&gt;Instance Settings&lt;/a&gt;.
1709 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
1710 # for First Generation instances.
1711 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
1712 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
1713 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
1714 # replication is enabled or not.
1715 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
1716 # database flags for crash-safe replication are enabled. This property is
1717 # only applicable to First Generation instances.
1718 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1719 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
1720 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24
1721 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
1722 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
1723 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1724 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
1725 # disabled, binarylog must be disabled as well.
1726 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1727 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1728 },
1729 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a
1730 # single key value pair.
1731 &quot;a_key&quot;: &quot;A String&quot;,
1732 },
1733 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as
1734 # near as possible to either an App Engine app or Compute Engine zone for
1735 # better performance. App Engine co-location is only applicable to First
1736 # Generation instances.
1737 # preferably be located, either in a specific Compute Engine zone, or
1738 # co-located with an App Engine application. Note that if the preferred
1739 # location is not available, the instance will be located as close as possible
1740 # within the region. Only one location may be specified.
1741 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The AppEngine application to follow, it must be in the same region as the
1742 # Cloud SQL instance.
1743 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
1744 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
1745 # etc.).
1746 },
1747 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
1748 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either
1749 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
1750 # only applicable to First Generation instances.
1751 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is
1752 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
1753 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
1754 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
1755 # off; it is not activated, even if a connection request arrives.
1756 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
1757 # responds to incoming requests, and turns itself off when not in use.
1758 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
1759 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
1760 # 12 hours of inactivity.
1761 },
1762 &quot;replicaNames&quot;: [ # The replicas of the instance.
1763 &quot;A String&quot;,
1764 ],
1765 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
1766 # Applies only to Second Generation instances.
1767 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
1768 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1769 },
1770 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
1771 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1772 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1773 &quot;canDefer&quot;: True or False,
1774 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1775 },
1776 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
1777 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
1778 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1779 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1780 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in &lt;a
1781 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1782 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1783 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1784 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1785 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1786 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
1787 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1788 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in &lt;a
1789 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1790 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
1791 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1792 },
1793 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1794 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1795 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as master in the replication setup.
1796 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following.
1797 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
1798 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
1799 # instance running on the
1800 # customer&#x27;s premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
1801 # instance configured as a read-replica.
1802 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This
1803 # value could be different from the zone that was specified when the instance
1804 # was created if the instance has failed over to its secondary zone.
1805 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been
1806 # deprecated. Users should use the
1807 # &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud
1808 # Monitoring API instead. Please see &lt;a
1809 # href=&quot;https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ&quot;&gt;this
1810 # announcement&lt;/a&gt; for details.
1811 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
1812 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
1813 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
1814 # master. Replication configuration information such as the username,
1815 # password, certificates, and keys are not stored in the instance metadata.
1816 # The configuration information is used only to set up the replication
1817 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
1818 # in the data directory.
1819 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
1820 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1821 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the master&#x27;s Common Name value in the certificate
1822 # that it sends during the SSL handshake.
1823 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
1824 # is encoded in the client&#x27;s certificate.
1825 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1826 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1827 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1828 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the slave
1829 # instance is to be created. The URI is in the form gs:
1830 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
1831 # // Dumps should have the binlog co-ordinates from which replication should
1832 # // begin. This can be accomplished by setting --master-data to 1 when using
1833 # // mysqldump.
1834 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
1835 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1836 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1837 },
1838 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to
1839 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
1840 # case the master instance fails, the replica instance will be promoted as
1841 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
1842 # target, and the replica has to be in different zone with the master
1843 # instance.
1844 },
1845 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
1846 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable
1847 # only to Second Generation instances.
1848 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates
1849 # that the failover replica is out of sync. The master can only failover to
1850 # the failover replica when the status is true.
1851 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a
1852 # failover replica is created for the instance. The name
1853 # doesn&#x27;t include the project ID. This property is applicable only to
1854 # Second Generation instances.
1855 },
1856 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1857 { # Database instance IP Mapping.
1858 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in &lt;a
1859 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1860 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
1861 # the IP is scheduled to be retired.
1862 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A &lt;code&gt;PRIMARY&lt;/code&gt; address is a public
1863 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
1864 # address is a private address that can accept incoming connections. An
1865 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
1866 # originating from the instance, if supported.
1867 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1868 },
1869 ],
1870 }
1871
1872 x__xgafv: string, V1 error format.
1873 Allowed values
1874 1 - v1 error format
1875 2 - v2 error format
1876
1877Returns:
1878 An object of the form:
1879
1880 { # An Operation resource.&amp;nbsp;For successful operations that return an
1881 # Operation resource, only the fields relevant to the operation are populated
1882 # in the resource.
1883 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1884 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1885 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1886 &quot;targetLink&quot;: &quot;A String&quot;,
1887 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
1888 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
1889 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
1890 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
1891 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
1892 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
1893 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
1894 # populated.
1895 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1896 { # Database instance operation error.
1897 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1898 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1899 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
1900 },
1901 ],
1902 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
1903 },
1904 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
1905 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1906 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1907 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
1908 # of the database table are loaded with CSV data.
1909 &quot;A String&quot;,
1910 ],
1911 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1912 },
1913 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
1914 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
1915 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
1916 # specify a database, and is overridden by any database specification in the
1917 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
1918 # must be specified.
1919 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1920 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1921 &quot;encryptionOptions&quot;: {
1922 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1923 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
1924 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1925 # write permissions to the bucket and read access to the file.
1926 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
1927 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1928 # write permissions to the bucket and read access to the file.
1929 },
1930 },
1931 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
1932 # &lt;code&gt;gs:
1933 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
1934 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
1935 # // write permissions to the bucket and read access to the file.
1936 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1937 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1938 },
1939 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
1940 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
1941 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
1942 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
1943 # identifier to retrieve the Operations resource that has information about
1944 # the operation.
1945 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1946 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
1947 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
1948 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
1949 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
1950 # either by using this property or by using the
1951 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
1952 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
1953 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
1954 # this database must match the one specified in the
1955 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
1956 &quot;A String&quot;,
1957 ],
1958 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1959 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
1960 # you specify tables, specify one and only one database. For PostgreSQL
1961 # instances, you can specify only one table.
1962 &quot;A String&quot;,
1963 ],
1964 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1965 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1966 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
1967 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
1968 # a CHANGE MASTER TO statement with the binary log coordinates.
1969 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
1970 # a SQL comment, and has no effect.
1971 # All other values are ignored.
1972 },
1973 },
1974 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1975 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1976 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
1977 # stored. The URI is in the form &lt;code&gt;gs:
1978 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
1979 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
1980 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
1981 # // compressed.
1982 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
1983 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1984 },
1985 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
1986 },
1987 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1988 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
1989 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1990 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1991 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
1992 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1993 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1994 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
1995 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1996 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1997 }</pre>
1998</div>
1999
2000<div class="method">
2001 <code class="details" id="list">list(project, pageToken=None, maxResults=None, filter=None, x__xgafv=None)</code>
2002 <pre>Lists instances under a given project.
2003
2004Args:
2005 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
2006 pageToken: string, A previously-returned page token representing part of the larger set of
2007results to view.
2008 maxResults: integer, The maximum number of results to return per response.
2009 filter: string, A filter expression that filters resources listed in the response.
2010The expression is in the form of field:value. For example,
2011&#x27;instanceType:CLOUD_SQL_INSTANCE&#x27;. Fields can be nested as needed as per
2012their JSON representation, such as &#x27;settings.userLabels.auto_start:true&#x27;.
2013
2014Multiple filter queries are space-separated. For example.
2015&#x27;state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE&#x27;. By default, each
2016expression is an AND expression. However, you can include AND and OR
2017expressions explicitly.
2018 x__xgafv: string, V1 error format.
2019 Allowed values
2020 1 - v1 error format
2021 2 - v2 error format
2022
2023Returns:
2024 An object of the form:
2025
2026 { # Database instances list response.
2027 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instancesList&lt;/code&gt;.
2028 &quot;items&quot;: [ # List of database instance resources.
2029 { # A Cloud SQL instance resource.
2030 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. This property is applicable only
2031 # to First Generation instances.
2032 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2033 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
2034 # Applies only to Second Generation instances.
2035 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
2036 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
2037 },
2038 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
2039 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
2040 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
2041 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
2042 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
2043 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
2044 # or Second Generation). The region can not be changed after instance
2045 # creation.
2046 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the
2047 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
2048 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
2049 # available, for example due to problems with billing.
2050 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
2051 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
2052 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
2053 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
2054 &quot;backendType&quot;: &quot;A String&quot;, # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
2055 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
2056 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
2057 # managed by Google. &lt;br&gt;This property is read-only; use the
2058 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
2059 # the database type and Second or First Generation.
2060 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
2061 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
2062 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
2063 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
2064 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
2065 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2066 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
2067 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
2068 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
2069 # is encoded in the client&#x27;s certificate.
2070 },
2071 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google
2072 # apps domain is prefixed if applicable.
2073 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property
2074 # is applicable only to Second Generation instances.
2075 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
2076 # field can not be changed after instance creation. MySQL Second Generation
2077 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
2078 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
2079 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
2080 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
2081 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
2082 &quot;A String&quot;,
2083 ],
2084 &quot;settings&quot;: { # Database instance settings. # The user settings.
2085 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
2086 # instance IP and manage which external networks can connect to the instance.
2087 # The IPv4 address cannot be disabled for Second Generation instances.
2088 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is
2089 # accessible for private IP. For example,
2090 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
2091 # be updated, but it cannot be removed after it is set.
2092 &quot;ipv4Enabled&quot;: True or False, # Whether the instance should be assigned an IP address or not.
2093 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance
2094 # using the IP. In &lt;a
2095 # href=&quot;http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation&quot;&gt;CIDR
2096 # notation&lt;/a&gt;, also known as &#x27;slash&#x27; notation (e.g.
2097 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
2098 { # An entry for an Access Control list.
2099 &quot;value&quot;: &quot;A String&quot;, # The whitelisted value for the access control list.
2100 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in &lt;a
2101 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2102 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2103 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
2104 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
2105 },
2106 ],
2107 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP should be enforced or not.
2108 },
2109 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type (PostgreSQL and MySQL instances only). Potential values:
2110 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
2111 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
2112 # The instance can serve data from more than one zone in a region (it is
2113 # highly available). &lt;br&gt;For more information, see &lt;a
2114 # href=&quot;https://cloud.google.com/sql/docs/postgres/high-availability&quot;&gt;Overview
2115 # of the High Availability Configuration&lt;/a&gt;.
2116 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update
2117 # method to make sure concurrent updates are handled properly. During update,
2118 # use the most recent settingsVersion value for this instance and do not try
2119 # to update this value.
2120 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
2121 { # Database flags for Cloud SQL instances.
2122 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans should be set to &lt;code&gt;on&lt;/code&gt; for true
2123 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
2124 # doesn&#x27;t take a value.
2125 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so
2126 # include both server options and system variables for MySQL. Flags should be
2127 # specified with underscores, not hyphens. For more information, see &lt;a
2128 # href=&quot;/sql/docs/mysql/flags&quot;&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
2129 # SQL documentation.
2130 },
2131 ],
2132 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance
2133 # can be restarted for maintenance purposes. Not used for First Generation
2134 # instances.
2135 # preferably be restarted for system maintenance purposes.
2136 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: &lt;code&gt;canary&lt;/code&gt; (Earlier) or
2137 # &lt;code&gt;stable&lt;/code&gt; (Later). &lt;br /&gt;&lt;a
2138 # href=&quot;/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen&quot;&gt;
2139 # Learn more&lt;/a&gt;.
2140 &quot;hour&quot;: 42, # hour of day - 0 to 23.
2141 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
2142 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
2143 },
2144 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either &lt;code&gt;PER_USE&lt;/code&gt;
2145 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
2146 # Generation instances.
2147 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is
2148 # true. Not used for First Generation instances.
2149 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased.
2150 # The default value is 0, which specifies that there is no limit. Not used
2151 # for First Generation instances.
2152 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. First Generation
2153 # instances only.
2154 &quot;A String&quot;,
2155 ],
2156 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example
2157 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
2158 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
2159 # this property determines whether the instance is First or Second
2160 # Generation. For more information, see &lt;a
2161 # href=&quot;/sql/docs/db_path/instance-settings&quot;&gt;Instance Settings&lt;/a&gt;.
2162 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
2163 # for First Generation instances.
2164 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
2165 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
2166 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
2167 # replication is enabled or not.
2168 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
2169 # database flags for crash-safe replication are enabled. This property is
2170 # only applicable to First Generation instances.
2171 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
2172 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
2173 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24
2174 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
2175 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
2176 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
2177 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
2178 # disabled, binarylog must be disabled as well.
2179 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
2180 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
2181 },
2182 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a
2183 # single key value pair.
2184 &quot;a_key&quot;: &quot;A String&quot;,
2185 },
2186 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as
2187 # near as possible to either an App Engine app or Compute Engine zone for
2188 # better performance. App Engine co-location is only applicable to First
2189 # Generation instances.
2190 # preferably be located, either in a specific Compute Engine zone, or
2191 # co-located with an App Engine application. Note that if the preferred
2192 # location is not available, the instance will be located as close as possible
2193 # within the region. Only one location may be specified.
2194 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The AppEngine application to follow, it must be in the same region as the
2195 # Cloud SQL instance.
2196 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
2197 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
2198 # etc.).
2199 },
2200 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
2201 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either
2202 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
2203 # only applicable to First Generation instances.
2204 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is
2205 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
2206 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
2207 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
2208 # off; it is not activated, even if a connection request arrives.
2209 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
2210 # responds to incoming requests, and turns itself off when not in use.
2211 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
2212 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
2213 # 12 hours of inactivity.
2214 },
2215 &quot;replicaNames&quot;: [ # The replicas of the instance.
2216 &quot;A String&quot;,
2217 ],
2218 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
2219 # Applies only to Second Generation instances.
2220 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
2221 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
2222 },
2223 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
2224 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
2225 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
2226 &quot;canDefer&quot;: True or False,
2227 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
2228 },
2229 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
2230 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
2231 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
2232 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2233 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in &lt;a
2234 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2235 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2236 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
2237 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
2238 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
2239 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
2240 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
2241 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in &lt;a
2242 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2243 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
2244 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
2245 },
2246 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
2247 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
2248 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as master in the replication setup.
2249 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following.
2250 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
2251 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
2252 # instance running on the
2253 # customer&#x27;s premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
2254 # instance configured as a read-replica.
2255 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This
2256 # value could be different from the zone that was specified when the instance
2257 # was created if the instance has failed over to its secondary zone.
2258 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been
2259 # deprecated. Users should use the
2260 # &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud
2261 # Monitoring API instead. Please see &lt;a
2262 # href=&quot;https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ&quot;&gt;this
2263 # announcement&lt;/a&gt; for details.
2264 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
2265 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
2266 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
2267 # master. Replication configuration information such as the username,
2268 # password, certificates, and keys are not stored in the instance metadata.
2269 # The configuration information is used only to set up the replication
2270 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
2271 # in the data directory.
2272 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
2273 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
2274 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the master&#x27;s Common Name value in the certificate
2275 # that it sends during the SSL handshake.
2276 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
2277 # is encoded in the client&#x27;s certificate.
2278 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
2279 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
2280 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
2281 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the slave
2282 # instance is to be created. The URI is in the form gs:
2283 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
2284 # // Dumps should have the binlog co-ordinates from which replication should
2285 # // begin. This can be accomplished by setting --master-data to 1 when using
2286 # // mysqldump.
2287 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
2288 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
2289 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2290 },
2291 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to
2292 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
2293 # case the master instance fails, the replica instance will be promoted as
2294 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
2295 # target, and the replica has to be in different zone with the master
2296 # instance.
2297 },
2298 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
2299 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable
2300 # only to Second Generation instances.
2301 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates
2302 # that the failover replica is out of sync. The master can only failover to
2303 # the failover replica when the status is true.
2304 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a
2305 # failover replica is created for the instance. The name
2306 # doesn&#x27;t include the project ID. This property is applicable only to
2307 # Second Generation instances.
2308 },
2309 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
2310 { # Database instance IP Mapping.
2311 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in &lt;a
2312 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2313 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
2314 # the IP is scheduled to be retired.
2315 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A &lt;code&gt;PRIMARY&lt;/code&gt; address is a public
2316 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
2317 # address is a private address that can accept incoming connections. An
2318 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
2319 # originating from the instance, if supported.
2320 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
2321 },
2322 ],
2323 },
2324 ],
2325 &quot;warnings&quot;: [ # List of warnings that occurred while handling the request.
2326 { # An Admin API warning message.
2327 &quot;code&quot;: &quot;A String&quot;, # Code to uniquely identify the warning type.
2328 &quot;message&quot;: &quot;A String&quot;, # The warning message.
2329 },
2330 ],
2331 &quot;nextPageToken&quot;: &quot;A String&quot;, # The continuation token, used to page through large result sets. Provide
2332 # this value in a subsequent request to return the next page of results.
2333 }</pre>
2334</div>
2335
2336<div class="method">
2337 <code class="details" id="listServerCas">listServerCas(project, instance, x__xgafv=None)</code>
2338 <pre>Lists all of the trusted Certificate Authorities (CAs) for the specified
2339instance. There can be up to three CAs listed: the CA that was used to sign
2340the certificate that is currently in use, a CA that has been added but not
2341yet used to sign a certificate, and a CA used to sign a certificate that
2342has previously rotated out.
2343
2344Args:
2345 project: string, Project ID of the project that contains the instance. (required)
2346 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
2347 x__xgafv: string, V1 error format.
2348 Allowed values
2349 1 - v1 error format
2350 2 - v2 error format
2351
2352Returns:
2353 An object of the form:
2354
2355 { # Instances ListServerCas response.
2356 &quot;activeVersion&quot;: &quot;A String&quot;,
2357 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instancesListServerCas&lt;/code&gt;.
2358 &quot;certs&quot;: [ # List of server CA certificates for the instance.
2359 { # SslCerts Resource
2360 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2361 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in &lt;a
2362 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2363 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2364 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
2365 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
2366 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
2367 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
2368 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
2369 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in &lt;a
2370 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2371 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
2372 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
2373 },
2374 ],
2375 }</pre>
2376</div>
2377
2378<div class="method">
2379 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2380 <pre>Retrieves the next page of results.
2381
2382Args:
2383 previous_request: The request for the previous page. (required)
2384 previous_response: The response from the request for the previous page. (required)
2385
2386Returns:
2387 A request object that you can call &#x27;execute()&#x27; on to request the next
2388 page. Returns None if there are no more items in the collection.
2389 </pre>
2390</div>
2391
2392<div class="method">
2393 <code class="details" id="patch">patch(project, instance, body=None, x__xgafv=None)</code>
2394 <pre>Updates settings of a Cloud SQL instance.
2395This method supports patch semantics.
2396
2397Args:
2398 project: string, Project ID of the project that contains the instance. (required)
2399 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
2400 body: object, The request body.
2401 The object takes the form of:
2402
2403{ # A Cloud SQL instance resource.
2404 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. This property is applicable only
2405 # to First Generation instances.
2406 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2407 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
2408 # Applies only to Second Generation instances.
2409 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
2410 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
2411 },
2412 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
2413 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
2414 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
2415 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
2416 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
2417 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
2418 # or Second Generation). The region can not be changed after instance
2419 # creation.
2420 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the
2421 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
2422 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
2423 # available, for example due to problems with billing.
2424 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
2425 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
2426 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
2427 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
2428 &quot;backendType&quot;: &quot;A String&quot;, # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
2429 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
2430 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
2431 # managed by Google. &lt;br&gt;This property is read-only; use the
2432 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
2433 # the database type and Second or First Generation.
2434 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
2435 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
2436 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
2437 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
2438 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
2439 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2440 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
2441 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
2442 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
2443 # is encoded in the client&#x27;s certificate.
2444 },
2445 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google
2446 # apps domain is prefixed if applicable.
2447 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property
2448 # is applicable only to Second Generation instances.
2449 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
2450 # field can not be changed after instance creation. MySQL Second Generation
2451 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
2452 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
2453 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
2454 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
2455 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
2456 &quot;A String&quot;,
2457 ],
2458 &quot;settings&quot;: { # Database instance settings. # The user settings.
2459 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
2460 # instance IP and manage which external networks can connect to the instance.
2461 # The IPv4 address cannot be disabled for Second Generation instances.
2462 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is
2463 # accessible for private IP. For example,
2464 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
2465 # be updated, but it cannot be removed after it is set.
2466 &quot;ipv4Enabled&quot;: True or False, # Whether the instance should be assigned an IP address or not.
2467 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance
2468 # using the IP. In &lt;a
2469 # href=&quot;http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation&quot;&gt;CIDR
2470 # notation&lt;/a&gt;, also known as &#x27;slash&#x27; notation (e.g.
2471 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
2472 { # An entry for an Access Control list.
2473 &quot;value&quot;: &quot;A String&quot;, # The whitelisted value for the access control list.
2474 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in &lt;a
2475 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2476 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2477 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
2478 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
2479 },
2480 ],
2481 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP should be enforced or not.
2482 },
2483 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type (PostgreSQL and MySQL instances only). Potential values:
2484 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
2485 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
2486 # The instance can serve data from more than one zone in a region (it is
2487 # highly available). &lt;br&gt;For more information, see &lt;a
2488 # href=&quot;https://cloud.google.com/sql/docs/postgres/high-availability&quot;&gt;Overview
2489 # of the High Availability Configuration&lt;/a&gt;.
2490 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update
2491 # method to make sure concurrent updates are handled properly. During update,
2492 # use the most recent settingsVersion value for this instance and do not try
2493 # to update this value.
2494 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
2495 { # Database flags for Cloud SQL instances.
2496 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans should be set to &lt;code&gt;on&lt;/code&gt; for true
2497 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
2498 # doesn&#x27;t take a value.
2499 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so
2500 # include both server options and system variables for MySQL. Flags should be
2501 # specified with underscores, not hyphens. For more information, see &lt;a
2502 # href=&quot;/sql/docs/mysql/flags&quot;&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
2503 # SQL documentation.
2504 },
2505 ],
2506 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance
2507 # can be restarted for maintenance purposes. Not used for First Generation
2508 # instances.
2509 # preferably be restarted for system maintenance purposes.
2510 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: &lt;code&gt;canary&lt;/code&gt; (Earlier) or
2511 # &lt;code&gt;stable&lt;/code&gt; (Later). &lt;br /&gt;&lt;a
2512 # href=&quot;/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen&quot;&gt;
2513 # Learn more&lt;/a&gt;.
2514 &quot;hour&quot;: 42, # hour of day - 0 to 23.
2515 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
2516 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
2517 },
2518 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either &lt;code&gt;PER_USE&lt;/code&gt;
2519 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
2520 # Generation instances.
2521 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is
2522 # true. Not used for First Generation instances.
2523 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased.
2524 # The default value is 0, which specifies that there is no limit. Not used
2525 # for First Generation instances.
2526 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. First Generation
2527 # instances only.
2528 &quot;A String&quot;,
2529 ],
2530 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example
2531 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
2532 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
2533 # this property determines whether the instance is First or Second
2534 # Generation. For more information, see &lt;a
2535 # href=&quot;/sql/docs/db_path/instance-settings&quot;&gt;Instance Settings&lt;/a&gt;.
2536 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
2537 # for First Generation instances.
2538 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
2539 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
2540 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
2541 # replication is enabled or not.
2542 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
2543 # database flags for crash-safe replication are enabled. This property is
2544 # only applicable to First Generation instances.
2545 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
2546 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
2547 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24
2548 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
2549 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
2550 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
2551 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
2552 # disabled, binarylog must be disabled as well.
2553 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
2554 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
2555 },
2556 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a
2557 # single key value pair.
2558 &quot;a_key&quot;: &quot;A String&quot;,
2559 },
2560 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as
2561 # near as possible to either an App Engine app or Compute Engine zone for
2562 # better performance. App Engine co-location is only applicable to First
2563 # Generation instances.
2564 # preferably be located, either in a specific Compute Engine zone, or
2565 # co-located with an App Engine application. Note that if the preferred
2566 # location is not available, the instance will be located as close as possible
2567 # within the region. Only one location may be specified.
2568 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The AppEngine application to follow, it must be in the same region as the
2569 # Cloud SQL instance.
2570 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
2571 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
2572 # etc.).
2573 },
2574 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
2575 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either
2576 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
2577 # only applicable to First Generation instances.
2578 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is
2579 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
2580 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
2581 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
2582 # off; it is not activated, even if a connection request arrives.
2583 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
2584 # responds to incoming requests, and turns itself off when not in use.
2585 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
2586 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
2587 # 12 hours of inactivity.
2588 },
2589 &quot;replicaNames&quot;: [ # The replicas of the instance.
2590 &quot;A String&quot;,
2591 ],
2592 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
2593 # Applies only to Second Generation instances.
2594 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
2595 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
2596 },
2597 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
2598 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
2599 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
2600 &quot;canDefer&quot;: True or False,
2601 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
2602 },
2603 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
2604 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
2605 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
2606 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2607 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in &lt;a
2608 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2609 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2610 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
2611 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
2612 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
2613 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
2614 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
2615 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in &lt;a
2616 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2617 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
2618 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
2619 },
2620 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
2621 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
2622 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as master in the replication setup.
2623 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following.
2624 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
2625 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
2626 # instance running on the
2627 # customer&#x27;s premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
2628 # instance configured as a read-replica.
2629 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This
2630 # value could be different from the zone that was specified when the instance
2631 # was created if the instance has failed over to its secondary zone.
2632 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been
2633 # deprecated. Users should use the
2634 # &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud
2635 # Monitoring API instead. Please see &lt;a
2636 # href=&quot;https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ&quot;&gt;this
2637 # announcement&lt;/a&gt; for details.
2638 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
2639 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
2640 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
2641 # master. Replication configuration information such as the username,
2642 # password, certificates, and keys are not stored in the instance metadata.
2643 # The configuration information is used only to set up the replication
2644 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
2645 # in the data directory.
2646 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
2647 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
2648 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the master&#x27;s Common Name value in the certificate
2649 # that it sends during the SSL handshake.
2650 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
2651 # is encoded in the client&#x27;s certificate.
2652 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
2653 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
2654 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
2655 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the slave
2656 # instance is to be created. The URI is in the form gs:
2657 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
2658 # // Dumps should have the binlog co-ordinates from which replication should
2659 # // begin. This can be accomplished by setting --master-data to 1 when using
2660 # // mysqldump.
2661 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
2662 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
2663 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2664 },
2665 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to
2666 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
2667 # case the master instance fails, the replica instance will be promoted as
2668 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
2669 # target, and the replica has to be in different zone with the master
2670 # instance.
2671 },
2672 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
2673 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable
2674 # only to Second Generation instances.
2675 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates
2676 # that the failover replica is out of sync. The master can only failover to
2677 # the failover replica when the status is true.
2678 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a
2679 # failover replica is created for the instance. The name
2680 # doesn&#x27;t include the project ID. This property is applicable only to
2681 # Second Generation instances.
2682 },
2683 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
2684 { # Database instance IP Mapping.
2685 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in &lt;a
2686 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2687 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
2688 # the IP is scheduled to be retired.
2689 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A &lt;code&gt;PRIMARY&lt;/code&gt; address is a public
2690 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
2691 # address is a private address that can accept incoming connections. An
2692 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
2693 # originating from the instance, if supported.
2694 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
2695 },
2696 ],
2697 }
2698
2699 x__xgafv: string, V1 error format.
2700 Allowed values
2701 1 - v1 error format
2702 2 - v2 error format
2703
2704Returns:
2705 An object of the form:
2706
2707 { # An Operation resource.&amp;nbsp;For successful operations that return an
2708 # Operation resource, only the fields relevant to the operation are populated
2709 # in the resource.
2710 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2711 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2712 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2713 &quot;targetLink&quot;: &quot;A String&quot;,
2714 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
2715 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
2716 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
2717 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
2718 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
2719 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
2720 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
2721 # populated.
2722 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2723 { # Database instance operation error.
2724 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2725 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2726 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
2727 },
2728 ],
2729 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
2730 },
2731 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
2732 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2733 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2734 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
2735 # of the database table are loaded with CSV data.
2736 &quot;A String&quot;,
2737 ],
2738 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2739 },
2740 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
2741 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
2742 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
2743 # specify a database, and is overridden by any database specification in the
2744 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
2745 # must be specified.
2746 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2747 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2748 &quot;encryptionOptions&quot;: {
2749 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2750 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
2751 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
2752 # write permissions to the bucket and read access to the file.
2753 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
2754 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
2755 # write permissions to the bucket and read access to the file.
2756 },
2757 },
2758 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
2759 # &lt;code&gt;gs:
2760 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
2761 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
2762 # // write permissions to the bucket and read access to the file.
2763 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
2764 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
2765 },
2766 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
2767 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
2768 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
2769 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
2770 # identifier to retrieve the Operations resource that has information about
2771 # the operation.
2772 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2773 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
2774 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
2775 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
2776 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
2777 # either by using this property or by using the
2778 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
2779 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
2780 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
2781 # this database must match the one specified in the
2782 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
2783 &quot;A String&quot;,
2784 ],
2785 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2786 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
2787 # you specify tables, specify one and only one database. For PostgreSQL
2788 # instances, you can specify only one table.
2789 &quot;A String&quot;,
2790 ],
2791 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2792 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2793 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
2794 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
2795 # a CHANGE MASTER TO statement with the binary log coordinates.
2796 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
2797 # a SQL comment, and has no effect.
2798 # All other values are ignored.
2799 },
2800 },
2801 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
2802 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
2803 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
2804 # stored. The URI is in the form &lt;code&gt;gs:
2805 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
2806 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
2807 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
2808 # // compressed.
2809 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
2810 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2811 },
2812 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
2813 },
2814 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2815 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
2816 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2817 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2818 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
2819 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2820 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2821 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
2822 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2823 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2824 }</pre>
2825</div>
2826
2827<div class="method">
2828 <code class="details" id="promoteReplica">promoteReplica(project, instance, x__xgafv=None)</code>
2829 <pre>Promotes the read replica instance to be a stand-alone Cloud SQL instance.
2830Using this operation might cause your instance to restart.
2831
2832Args:
2833 project: string, ID of the project that contains the read replica. (required)
2834 instance: string, Cloud SQL read replica instance name. (required)
2835 x__xgafv: string, V1 error format.
2836 Allowed values
2837 1 - v1 error format
2838 2 - v2 error format
2839
2840Returns:
2841 An object of the form:
2842
2843 { # An Operation resource.&amp;nbsp;For successful operations that return an
2844 # Operation resource, only the fields relevant to the operation are populated
2845 # in the resource.
2846 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2847 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2848 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2849 &quot;targetLink&quot;: &quot;A String&quot;,
2850 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
2851 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
2852 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
2853 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
2854 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
2855 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
2856 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
2857 # populated.
2858 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2859 { # Database instance operation error.
2860 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2861 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2862 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
2863 },
2864 ],
2865 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
2866 },
2867 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
2868 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2869 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2870 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
2871 # of the database table are loaded with CSV data.
2872 &quot;A String&quot;,
2873 ],
2874 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2875 },
2876 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
2877 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
2878 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
2879 # specify a database, and is overridden by any database specification in the
2880 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
2881 # must be specified.
2882 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2883 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2884 &quot;encryptionOptions&quot;: {
2885 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2886 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
2887 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
2888 # write permissions to the bucket and read access to the file.
2889 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
2890 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
2891 # write permissions to the bucket and read access to the file.
2892 },
2893 },
2894 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
2895 # &lt;code&gt;gs:
2896 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
2897 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
2898 # // write permissions to the bucket and read access to the file.
2899 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
2900 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
2901 },
2902 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
2903 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
2904 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
2905 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
2906 # identifier to retrieve the Operations resource that has information about
2907 # the operation.
2908 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2909 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
2910 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
2911 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
2912 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
2913 # either by using this property or by using the
2914 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
2915 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
2916 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
2917 # this database must match the one specified in the
2918 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
2919 &quot;A String&quot;,
2920 ],
2921 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2922 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
2923 # you specify tables, specify one and only one database. For PostgreSQL
2924 # instances, you can specify only one table.
2925 &quot;A String&quot;,
2926 ],
2927 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2928 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2929 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
2930 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
2931 # a CHANGE MASTER TO statement with the binary log coordinates.
2932 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
2933 # a SQL comment, and has no effect.
2934 # All other values are ignored.
2935 },
2936 },
2937 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
2938 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
2939 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
2940 # stored. The URI is in the form &lt;code&gt;gs:
2941 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
2942 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
2943 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
2944 # // compressed.
2945 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
2946 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2947 },
2948 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
2949 },
2950 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2951 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
2952 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2953 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2954 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
2955 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2956 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2957 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
2958 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2959 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2960 }</pre>
2961</div>
2962
2963<div class="method">
2964 <code class="details" id="resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</code>
2965 <pre>Deletes all client certificates and generates a new server SSL certificate
2966for the instance.
2967
2968Args:
2969 project: string, Project ID of the project that contains the instance. (required)
2970 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
2971 x__xgafv: string, V1 error format.
2972 Allowed values
2973 1 - v1 error format
2974 2 - v2 error format
2975
2976Returns:
2977 An object of the form:
2978
2979 { # An Operation resource.&amp;nbsp;For successful operations that return an
2980 # Operation resource, only the fields relevant to the operation are populated
2981 # in the resource.
2982 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2983 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2984 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2985 &quot;targetLink&quot;: &quot;A String&quot;,
2986 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
2987 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
2988 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
2989 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
2990 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
2991 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
2992 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
2993 # populated.
2994 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2995 { # Database instance operation error.
2996 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2997 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2998 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
2999 },
3000 ],
3001 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3002 },
3003 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3004 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
3005 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3006 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3007 # of the database table are loaded with CSV data.
3008 &quot;A String&quot;,
3009 ],
3010 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3011 },
3012 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3013 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3014 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3015 # specify a database, and is overridden by any database specification in the
3016 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3017 # must be specified.
3018 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3019 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3020 &quot;encryptionOptions&quot;: {
3021 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3022 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3023 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3024 # write permissions to the bucket and read access to the file.
3025 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3026 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3027 # write permissions to the bucket and read access to the file.
3028 },
3029 },
3030 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
3031 # &lt;code&gt;gs:
3032 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3033 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3034 # // write permissions to the bucket and read access to the file.
3035 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3036 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3037 },
3038 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3039 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3040 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
3041 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
3042 # identifier to retrieve the Operations resource that has information about
3043 # the operation.
3044 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3045 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3046 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3047 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3048 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3049 # either by using this property or by using the
3050 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3051 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3052 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3053 # this database must match the one specified in the
3054 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
3055 &quot;A String&quot;,
3056 ],
3057 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3058 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
3059 # you specify tables, specify one and only one database. For PostgreSQL
3060 # instances, you can specify only one table.
3061 &quot;A String&quot;,
3062 ],
3063 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3064 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3065 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
3066 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3067 # a CHANGE MASTER TO statement with the binary log coordinates.
3068 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3069 # a SQL comment, and has no effect.
3070 # All other values are ignored.
3071 },
3072 },
3073 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3074 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3075 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3076 # stored. The URI is in the form &lt;code&gt;gs:
3077 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3078 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3079 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3080 # // compressed.
3081 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3082 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3083 },
3084 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3085 },
3086 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
3087 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3088 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3089 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3090 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3091 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3092 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3093 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3094 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3095 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3096 }</pre>
3097</div>
3098
3099<div class="method">
3100 <code class="details" id="restart">restart(project, instance, x__xgafv=None)</code>
3101 <pre>Restarts a Cloud SQL instance.
3102
3103Args:
3104 project: string, Project ID of the project that contains the instance to be restarted. (required)
3105 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
3106 x__xgafv: string, V1 error format.
3107 Allowed values
3108 1 - v1 error format
3109 2 - v2 error format
3110
3111Returns:
3112 An object of the form:
3113
3114 { # An Operation resource.&amp;nbsp;For successful operations that return an
3115 # Operation resource, only the fields relevant to the operation are populated
3116 # in the resource.
3117 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3118 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3119 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3120 &quot;targetLink&quot;: &quot;A String&quot;,
3121 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3122 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3123 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3124 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3125 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3126 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3127 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3128 # populated.
3129 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3130 { # Database instance operation error.
3131 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3132 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
3133 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
3134 },
3135 ],
3136 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3137 },
3138 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3139 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
3140 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3141 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3142 # of the database table are loaded with CSV data.
3143 &quot;A String&quot;,
3144 ],
3145 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3146 },
3147 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3148 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3149 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3150 # specify a database, and is overridden by any database specification in the
3151 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3152 # must be specified.
3153 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3154 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3155 &quot;encryptionOptions&quot;: {
3156 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3157 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3158 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3159 # write permissions to the bucket and read access to the file.
3160 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3161 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3162 # write permissions to the bucket and read access to the file.
3163 },
3164 },
3165 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
3166 # &lt;code&gt;gs:
3167 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3168 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3169 # // write permissions to the bucket and read access to the file.
3170 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3171 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3172 },
3173 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3174 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3175 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
3176 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
3177 # identifier to retrieve the Operations resource that has information about
3178 # the operation.
3179 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3180 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3181 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3182 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3183 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3184 # either by using this property or by using the
3185 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3186 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3187 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3188 # this database must match the one specified in the
3189 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
3190 &quot;A String&quot;,
3191 ],
3192 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3193 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
3194 # you specify tables, specify one and only one database. For PostgreSQL
3195 # instances, you can specify only one table.
3196 &quot;A String&quot;,
3197 ],
3198 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3199 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3200 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
3201 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3202 # a CHANGE MASTER TO statement with the binary log coordinates.
3203 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3204 # a SQL comment, and has no effect.
3205 # All other values are ignored.
3206 },
3207 },
3208 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3209 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3210 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3211 # stored. The URI is in the form &lt;code&gt;gs:
3212 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3213 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3214 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3215 # // compressed.
3216 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3217 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3218 },
3219 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3220 },
3221 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
3222 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3223 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3224 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3225 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3226 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3227 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3228 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3229 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3230 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3231 }</pre>
3232</div>
3233
3234<div class="method">
3235 <code class="details" id="restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</code>
3236 <pre>Restores a backup of a Cloud SQL instance. Using this operation might cause
3237your instance to restart.
3238
3239Args:
3240 project: string, Project ID of the project that contains the instance. (required)
3241 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
3242 body: object, The request body.
3243 The object takes the form of:
3244
3245{ # Database instance restore backup request.
3246 &quot;restoreBackupContext&quot;: { # Database instance restore from backup context. # Parameters required to perform the restore backup operation.
3247 # Backup context contains source instance id and project id.
3248 &quot;instanceId&quot;: &quot;A String&quot;, # The ID of the instance that the backup was taken from.
3249 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#restoreBackupContext&lt;/code&gt;.
3250 &quot;project&quot;: &quot;A String&quot;, # The full project ID of the source instance.
3251 &quot;backupRunId&quot;: &quot;A String&quot;, # The ID of the backup run to restore from.
3252 },
3253 }
3254
3255 x__xgafv: string, V1 error format.
3256 Allowed values
3257 1 - v1 error format
3258 2 - v2 error format
3259
3260Returns:
3261 An object of the form:
3262
3263 { # An Operation resource.&amp;nbsp;For successful operations that return an
3264 # Operation resource, only the fields relevant to the operation are populated
3265 # in the resource.
3266 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3267 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3268 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3269 &quot;targetLink&quot;: &quot;A String&quot;,
3270 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3271 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3272 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3273 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3274 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3275 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3276 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3277 # populated.
3278 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3279 { # Database instance operation error.
3280 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3281 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
3282 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
3283 },
3284 ],
3285 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3286 },
3287 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3288 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
3289 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3290 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3291 # of the database table are loaded with CSV data.
3292 &quot;A String&quot;,
3293 ],
3294 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3295 },
3296 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3297 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3298 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3299 # specify a database, and is overridden by any database specification in the
3300 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3301 # must be specified.
3302 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3303 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3304 &quot;encryptionOptions&quot;: {
3305 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3306 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3307 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3308 # write permissions to the bucket and read access to the file.
3309 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3310 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3311 # write permissions to the bucket and read access to the file.
3312 },
3313 },
3314 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
3315 # &lt;code&gt;gs:
3316 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3317 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3318 # // write permissions to the bucket and read access to the file.
3319 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3320 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3321 },
3322 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3323 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3324 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
3325 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
3326 # identifier to retrieve the Operations resource that has information about
3327 # the operation.
3328 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3329 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3330 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3331 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3332 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3333 # either by using this property or by using the
3334 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3335 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3336 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3337 # this database must match the one specified in the
3338 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
3339 &quot;A String&quot;,
3340 ],
3341 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3342 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
3343 # you specify tables, specify one and only one database. For PostgreSQL
3344 # instances, you can specify only one table.
3345 &quot;A String&quot;,
3346 ],
3347 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3348 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3349 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
3350 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3351 # a CHANGE MASTER TO statement with the binary log coordinates.
3352 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3353 # a SQL comment, and has no effect.
3354 # All other values are ignored.
3355 },
3356 },
3357 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3358 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3359 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3360 # stored. The URI is in the form &lt;code&gt;gs:
3361 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3362 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3363 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3364 # // compressed.
3365 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3366 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3367 },
3368 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3369 },
3370 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
3371 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3372 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3373 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3374 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3375 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3376 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3377 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3378 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3379 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3380 }</pre>
3381</div>
3382
3383<div class="method">
3384 <code class="details" id="rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</code>
3385 <pre>Rotates the server certificate to one signed by the Certificate Authority
3386(CA) version previously added with the addServerCA method.
3387
3388Args:
3389 project: string, Project ID of the project that contains the instance. (required)
3390 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
3391 body: object, The request body.
3392 The object takes the form of:
3393
3394{ # Rotate Server CA request.
3395 &quot;rotateServerCaContext&quot;: { # Instance rotate server CA context. # Contains details about the rotate server CA operation.
3396 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#rotateServerCaContext&lt;/code&gt;.
3397 &quot;nextVersion&quot;: &quot;A String&quot;, # The fingerprint of the next version to be rotated to. If left unspecified,
3398 # will be rotated to the most recently added server CA version.
3399 },
3400 }
3401
3402 x__xgafv: string, V1 error format.
3403 Allowed values
3404 1 - v1 error format
3405 2 - v2 error format
3406
3407Returns:
3408 An object of the form:
3409
3410 { # An Operation resource.&amp;nbsp;For successful operations that return an
3411 # Operation resource, only the fields relevant to the operation are populated
3412 # in the resource.
3413 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3414 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3415 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3416 &quot;targetLink&quot;: &quot;A String&quot;,
3417 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3418 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3419 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3420 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3421 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3422 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3423 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3424 # populated.
3425 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3426 { # Database instance operation error.
3427 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3428 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
3429 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
3430 },
3431 ],
3432 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3433 },
3434 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3435 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
3436 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3437 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3438 # of the database table are loaded with CSV data.
3439 &quot;A String&quot;,
3440 ],
3441 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3442 },
3443 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3444 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3445 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3446 # specify a database, and is overridden by any database specification in the
3447 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3448 # must be specified.
3449 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3450 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3451 &quot;encryptionOptions&quot;: {
3452 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3453 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3454 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3455 # write permissions to the bucket and read access to the file.
3456 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3457 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3458 # write permissions to the bucket and read access to the file.
3459 },
3460 },
3461 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
3462 # &lt;code&gt;gs:
3463 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3464 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3465 # // write permissions to the bucket and read access to the file.
3466 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3467 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3468 },
3469 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3470 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3471 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
3472 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
3473 # identifier to retrieve the Operations resource that has information about
3474 # the operation.
3475 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3476 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3477 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3478 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3479 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3480 # either by using this property or by using the
3481 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3482 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3483 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3484 # this database must match the one specified in the
3485 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
3486 &quot;A String&quot;,
3487 ],
3488 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3489 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
3490 # you specify tables, specify one and only one database. For PostgreSQL
3491 # instances, you can specify only one table.
3492 &quot;A String&quot;,
3493 ],
3494 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3495 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3496 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
3497 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3498 # a CHANGE MASTER TO statement with the binary log coordinates.
3499 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3500 # a SQL comment, and has no effect.
3501 # All other values are ignored.
3502 },
3503 },
3504 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3505 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3506 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3507 # stored. The URI is in the form &lt;code&gt;gs:
3508 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3509 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3510 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3511 # // compressed.
3512 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3513 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3514 },
3515 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3516 },
3517 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
3518 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3519 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3520 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3521 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3522 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3523 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3524 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3525 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3526 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3527 }</pre>
3528</div>
3529
3530<div class="method">
3531 <code class="details" id="startReplica">startReplica(project, instance, x__xgafv=None)</code>
3532 <pre>Starts the replication in the read replica instance.
3533
3534Args:
3535 project: string, ID of the project that contains the read replica. (required)
3536 instance: string, Cloud SQL read replica instance name. (required)
3537 x__xgafv: string, V1 error format.
3538 Allowed values
3539 1 - v1 error format
3540 2 - v2 error format
3541
3542Returns:
3543 An object of the form:
3544
3545 { # An Operation resource.&amp;nbsp;For successful operations that return an
3546 # Operation resource, only the fields relevant to the operation are populated
3547 # in the resource.
3548 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3549 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3550 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3551 &quot;targetLink&quot;: &quot;A String&quot;,
3552 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3553 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3554 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3555 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3556 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3557 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3558 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3559 # populated.
3560 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3561 { # Database instance operation error.
3562 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3563 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
3564 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
3565 },
3566 ],
3567 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3568 },
3569 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3570 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
3571 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3572 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3573 # of the database table are loaded with CSV data.
3574 &quot;A String&quot;,
3575 ],
3576 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3577 },
3578 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3579 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3580 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3581 # specify a database, and is overridden by any database specification in the
3582 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3583 # must be specified.
3584 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3585 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3586 &quot;encryptionOptions&quot;: {
3587 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3588 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3589 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3590 # write permissions to the bucket and read access to the file.
3591 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3592 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3593 # write permissions to the bucket and read access to the file.
3594 },
3595 },
3596 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
3597 # &lt;code&gt;gs:
3598 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3599 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3600 # // write permissions to the bucket and read access to the file.
3601 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3602 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3603 },
3604 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3605 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3606 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
3607 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
3608 # identifier to retrieve the Operations resource that has information about
3609 # the operation.
3610 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3611 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3612 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3613 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3614 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3615 # either by using this property or by using the
3616 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3617 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3618 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3619 # this database must match the one specified in the
3620 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
3621 &quot;A String&quot;,
3622 ],
3623 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3624 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
3625 # you specify tables, specify one and only one database. For PostgreSQL
3626 # instances, you can specify only one table.
3627 &quot;A String&quot;,
3628 ],
3629 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3630 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3631 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
3632 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3633 # a CHANGE MASTER TO statement with the binary log coordinates.
3634 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3635 # a SQL comment, and has no effect.
3636 # All other values are ignored.
3637 },
3638 },
3639 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3640 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3641 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3642 # stored. The URI is in the form &lt;code&gt;gs:
3643 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3644 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3645 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3646 # // compressed.
3647 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3648 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3649 },
3650 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3651 },
3652 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
3653 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3654 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3655 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3656 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3657 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3658 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3659 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3660 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3661 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3662 }</pre>
3663</div>
3664
3665<div class="method">
3666 <code class="details" id="stopReplica">stopReplica(project, instance, x__xgafv=None)</code>
3667 <pre>Stops the replication in the read replica instance.
3668
3669Args:
3670 project: string, ID of the project that contains the read replica. (required)
3671 instance: string, Cloud SQL read replica instance name. (required)
3672 x__xgafv: string, V1 error format.
3673 Allowed values
3674 1 - v1 error format
3675 2 - v2 error format
3676
3677Returns:
3678 An object of the form:
3679
3680 { # An Operation resource.&amp;nbsp;For successful operations that return an
3681 # Operation resource, only the fields relevant to the operation are populated
3682 # in the resource.
3683 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3684 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3685 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3686 &quot;targetLink&quot;: &quot;A String&quot;,
3687 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3688 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3689 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3690 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3691 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3692 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3693 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3694 # populated.
3695 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3696 { # Database instance operation error.
3697 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3698 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
3699 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
3700 },
3701 ],
3702 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3703 },
3704 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3705 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
3706 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3707 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3708 # of the database table are loaded with CSV data.
3709 &quot;A String&quot;,
3710 ],
3711 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3712 },
3713 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3714 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3715 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3716 # specify a database, and is overridden by any database specification in the
3717 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3718 # must be specified.
3719 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3720 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3721 &quot;encryptionOptions&quot;: {
3722 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3723 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3724 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3725 # write permissions to the bucket and read access to the file.
3726 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3727 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3728 # write permissions to the bucket and read access to the file.
3729 },
3730 },
3731 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
3732 # &lt;code&gt;gs:
3733 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3734 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3735 # // write permissions to the bucket and read access to the file.
3736 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3737 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3738 },
3739 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3740 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3741 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
3742 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
3743 # identifier to retrieve the Operations resource that has information about
3744 # the operation.
3745 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3746 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3747 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3748 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3749 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3750 # either by using this property or by using the
3751 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3752 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3753 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3754 # this database must match the one specified in the
3755 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
3756 &quot;A String&quot;,
3757 ],
3758 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3759 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
3760 # you specify tables, specify one and only one database. For PostgreSQL
3761 # instances, you can specify only one table.
3762 &quot;A String&quot;,
3763 ],
3764 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3765 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3766 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
3767 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3768 # a CHANGE MASTER TO statement with the binary log coordinates.
3769 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3770 # a SQL comment, and has no effect.
3771 # All other values are ignored.
3772 },
3773 },
3774 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3775 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3776 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3777 # stored. The URI is in the form &lt;code&gt;gs:
3778 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3779 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3780 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3781 # // compressed.
3782 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3783 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3784 },
3785 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3786 },
3787 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
3788 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3789 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3790 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3791 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3792 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3793 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3794 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3795 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3796 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3797 }</pre>
3798</div>
3799
3800<div class="method">
3801 <code class="details" id="truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</code>
3802 <pre>Truncate MySQL general and slow query log tables
3803
3804Args:
3805 project: string, Project ID of the Cloud SQL project. (required)
3806 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
3807 body: object, The request body.
3808 The object takes the form of:
3809
3810{ # Instance truncate log request.
3811 &quot;truncateLogContext&quot;: { # Database Instance truncate log context. # Contains details about the truncate log operation.
3812 &quot;logType&quot;: &quot;A String&quot;, # The type of log to truncate. Valid values are
3813 # &lt;code&gt;MYSQL_GENERAL_TABLE&lt;/code&gt; and &lt;code&gt;MYSQL_SLOW_TABLE&lt;/code&gt;.
3814 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#truncateLogContext&lt;/code&gt;.
3815 },
3816 }
3817
3818 x__xgafv: string, V1 error format.
3819 Allowed values
3820 1 - v1 error format
3821 2 - v2 error format
3822
3823Returns:
3824 An object of the form:
3825
3826 { # An Operation resource.&amp;nbsp;For successful operations that return an
3827 # Operation resource, only the fields relevant to the operation are populated
3828 # in the resource.
3829 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3830 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3831 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3832 &quot;targetLink&quot;: &quot;A String&quot;,
3833 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3834 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3835 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3836 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3837 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3838 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3839 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3840 # populated.
3841 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3842 { # Database instance operation error.
3843 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3844 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
3845 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
3846 },
3847 ],
3848 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3849 },
3850 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3851 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
3852 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3853 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3854 # of the database table are loaded with CSV data.
3855 &quot;A String&quot;,
3856 ],
3857 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3858 },
3859 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3860 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3861 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3862 # specify a database, and is overridden by any database specification in the
3863 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3864 # must be specified.
3865 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3866 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3867 &quot;encryptionOptions&quot;: {
3868 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3869 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3870 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3871 # write permissions to the bucket and read access to the file.
3872 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3873 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3874 # write permissions to the bucket and read access to the file.
3875 },
3876 },
3877 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
3878 # &lt;code&gt;gs:
3879 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3880 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3881 # // write permissions to the bucket and read access to the file.
3882 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3883 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3884 },
3885 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3886 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3887 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
3888 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
3889 # identifier to retrieve the Operations resource that has information about
3890 # the operation.
3891 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3892 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3893 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3894 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3895 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3896 # either by using this property or by using the
3897 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3898 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3899 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3900 # this database must match the one specified in the
3901 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
3902 &quot;A String&quot;,
3903 ],
3904 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3905 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
3906 # you specify tables, specify one and only one database. For PostgreSQL
3907 # instances, you can specify only one table.
3908 &quot;A String&quot;,
3909 ],
3910 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3911 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3912 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
3913 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3914 # a CHANGE MASTER TO statement with the binary log coordinates.
3915 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3916 # a SQL comment, and has no effect.
3917 # All other values are ignored.
3918 },
3919 },
3920 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3921 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3922 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3923 # stored. The URI is in the form &lt;code&gt;gs:
3924 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3925 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3926 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3927 # // compressed.
3928 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3929 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3930 },
3931 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3932 },
3933 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
3934 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3935 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3936 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3937 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3938 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3939 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3940 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3941 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3942 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3943 }</pre>
3944</div>
3945
3946<div class="method">
3947 <code class="details" id="update">update(project, instance, body=None, x__xgafv=None)</code>
3948 <pre>Updates settings of a Cloud SQL instance. Using this operation might cause
3949your instance to restart.
3950
3951Args:
3952 project: string, Project ID of the project that contains the instance. (required)
3953 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
3954 body: object, The request body.
3955 The object takes the form of:
3956
3957{ # A Cloud SQL instance resource.
3958 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. This property is applicable only
3959 # to First Generation instances.
3960 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3961 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
3962 # Applies only to Second Generation instances.
3963 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
3964 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
3965 },
3966 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
3967 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
3968 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
3969 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
3970 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
3971 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
3972 # or Second Generation). The region can not be changed after instance
3973 # creation.
3974 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the
3975 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
3976 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
3977 # available, for example due to problems with billing.
3978 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
3979 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
3980 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
3981 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
3982 &quot;backendType&quot;: &quot;A String&quot;, # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
3983 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
3984 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
3985 # managed by Google. &lt;br&gt;This property is read-only; use the
3986 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
3987 # the database type and Second or First Generation.
3988 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
3989 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
3990 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
3991 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
3992 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
3993 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
3994 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
3995 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
3996 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
3997 # is encoded in the client&#x27;s certificate.
3998 },
3999 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google
4000 # apps domain is prefixed if applicable.
4001 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property
4002 # is applicable only to Second Generation instances.
4003 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
4004 # field can not be changed after instance creation. MySQL Second Generation
4005 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
4006 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
4007 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
4008 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
4009 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
4010 &quot;A String&quot;,
4011 ],
4012 &quot;settings&quot;: { # Database instance settings. # The user settings.
4013 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
4014 # instance IP and manage which external networks can connect to the instance.
4015 # The IPv4 address cannot be disabled for Second Generation instances.
4016 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is
4017 # accessible for private IP. For example,
4018 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
4019 # be updated, but it cannot be removed after it is set.
4020 &quot;ipv4Enabled&quot;: True or False, # Whether the instance should be assigned an IP address or not.
4021 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance
4022 # using the IP. In &lt;a
4023 # href=&quot;http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation&quot;&gt;CIDR
4024 # notation&lt;/a&gt;, also known as &#x27;slash&#x27; notation (e.g.
4025 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
4026 { # An entry for an Access Control list.
4027 &quot;value&quot;: &quot;A String&quot;, # The whitelisted value for the access control list.
4028 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in &lt;a
4029 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4030 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
4031 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
4032 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
4033 },
4034 ],
4035 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP should be enforced or not.
4036 },
4037 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type (PostgreSQL and MySQL instances only). Potential values:
4038 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
4039 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
4040 # The instance can serve data from more than one zone in a region (it is
4041 # highly available). &lt;br&gt;For more information, see &lt;a
4042 # href=&quot;https://cloud.google.com/sql/docs/postgres/high-availability&quot;&gt;Overview
4043 # of the High Availability Configuration&lt;/a&gt;.
4044 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update
4045 # method to make sure concurrent updates are handled properly. During update,
4046 # use the most recent settingsVersion value for this instance and do not try
4047 # to update this value.
4048 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
4049 { # Database flags for Cloud SQL instances.
4050 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans should be set to &lt;code&gt;on&lt;/code&gt; for true
4051 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
4052 # doesn&#x27;t take a value.
4053 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so
4054 # include both server options and system variables for MySQL. Flags should be
4055 # specified with underscores, not hyphens. For more information, see &lt;a
4056 # href=&quot;/sql/docs/mysql/flags&quot;&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
4057 # SQL documentation.
4058 },
4059 ],
4060 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance
4061 # can be restarted for maintenance purposes. Not used for First Generation
4062 # instances.
4063 # preferably be restarted for system maintenance purposes.
4064 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: &lt;code&gt;canary&lt;/code&gt; (Earlier) or
4065 # &lt;code&gt;stable&lt;/code&gt; (Later). &lt;br /&gt;&lt;a
4066 # href=&quot;/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen&quot;&gt;
4067 # Learn more&lt;/a&gt;.
4068 &quot;hour&quot;: 42, # hour of day - 0 to 23.
4069 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
4070 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
4071 },
4072 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either &lt;code&gt;PER_USE&lt;/code&gt;
4073 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
4074 # Generation instances.
4075 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is
4076 # true. Not used for First Generation instances.
4077 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased.
4078 # The default value is 0, which specifies that there is no limit. Not used
4079 # for First Generation instances.
4080 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. First Generation
4081 # instances only.
4082 &quot;A String&quot;,
4083 ],
4084 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example
4085 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
4086 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
4087 # this property determines whether the instance is First or Second
4088 # Generation. For more information, see &lt;a
4089 # href=&quot;/sql/docs/db_path/instance-settings&quot;&gt;Instance Settings&lt;/a&gt;.
4090 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
4091 # for First Generation instances.
4092 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
4093 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
4094 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
4095 # replication is enabled or not.
4096 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
4097 # database flags for crash-safe replication are enabled. This property is
4098 # only applicable to First Generation instances.
4099 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
4100 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
4101 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24
4102 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
4103 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
4104 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
4105 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
4106 # disabled, binarylog must be disabled as well.
4107 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
4108 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
4109 },
4110 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a
4111 # single key value pair.
4112 &quot;a_key&quot;: &quot;A String&quot;,
4113 },
4114 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as
4115 # near as possible to either an App Engine app or Compute Engine zone for
4116 # better performance. App Engine co-location is only applicable to First
4117 # Generation instances.
4118 # preferably be located, either in a specific Compute Engine zone, or
4119 # co-located with an App Engine application. Note that if the preferred
4120 # location is not available, the instance will be located as close as possible
4121 # within the region. Only one location may be specified.
4122 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The AppEngine application to follow, it must be in the same region as the
4123 # Cloud SQL instance.
4124 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
4125 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
4126 # etc.).
4127 },
4128 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
4129 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either
4130 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
4131 # only applicable to First Generation instances.
4132 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is
4133 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
4134 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
4135 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
4136 # off; it is not activated, even if a connection request arrives.
4137 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
4138 # responds to incoming requests, and turns itself off when not in use.
4139 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
4140 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
4141 # 12 hours of inactivity.
4142 },
4143 &quot;replicaNames&quot;: [ # The replicas of the instance.
4144 &quot;A String&quot;,
4145 ],
4146 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
4147 # Applies only to Second Generation instances.
4148 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
4149 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
4150 },
4151 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
4152 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
4153 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
4154 &quot;canDefer&quot;: True or False,
4155 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
4156 },
4157 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
4158 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
4159 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
4160 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
4161 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in &lt;a
4162 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4163 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
4164 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
4165 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
4166 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
4167 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
4168 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
4169 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in &lt;a
4170 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4171 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
4172 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
4173 },
4174 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
4175 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
4176 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as master in the replication setup.
4177 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following.
4178 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
4179 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
4180 # instance running on the
4181 # customer&#x27;s premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
4182 # instance configured as a read-replica.
4183 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This
4184 # value could be different from the zone that was specified when the instance
4185 # was created if the instance has failed over to its secondary zone.
4186 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been
4187 # deprecated. Users should use the
4188 # &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud
4189 # Monitoring API instead. Please see &lt;a
4190 # href=&quot;https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ&quot;&gt;this
4191 # announcement&lt;/a&gt; for details.
4192 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
4193 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
4194 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
4195 # master. Replication configuration information such as the username,
4196 # password, certificates, and keys are not stored in the instance metadata.
4197 # The configuration information is used only to set up the replication
4198 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
4199 # in the data directory.
4200 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
4201 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
4202 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the master&#x27;s Common Name value in the certificate
4203 # that it sends during the SSL handshake.
4204 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
4205 # is encoded in the client&#x27;s certificate.
4206 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
4207 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
4208 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
4209 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the slave
4210 # instance is to be created. The URI is in the form gs:
4211 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
4212 # // Dumps should have the binlog co-ordinates from which replication should
4213 # // begin. This can be accomplished by setting --master-data to 1 when using
4214 # // mysqldump.
4215 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
4216 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
4217 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
4218 },
4219 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to
4220 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
4221 # case the master instance fails, the replica instance will be promoted as
4222 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
4223 # target, and the replica has to be in different zone with the master
4224 # instance.
4225 },
4226 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
4227 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable
4228 # only to Second Generation instances.
4229 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates
4230 # that the failover replica is out of sync. The master can only failover to
4231 # the failover replica when the status is true.
4232 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a
4233 # failover replica is created for the instance. The name
4234 # doesn&#x27;t include the project ID. This property is applicable only to
4235 # Second Generation instances.
4236 },
4237 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
4238 { # Database instance IP Mapping.
4239 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in &lt;a
4240 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4241 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
4242 # the IP is scheduled to be retired.
4243 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A &lt;code&gt;PRIMARY&lt;/code&gt; address is a public
4244 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
4245 # address is a private address that can accept incoming connections. An
4246 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
4247 # originating from the instance, if supported.
4248 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
4249 },
4250 ],
4251 }
4252
4253 x__xgafv: string, V1 error format.
4254 Allowed values
4255 1 - v1 error format
4256 2 - v2 error format
4257
4258Returns:
4259 An object of the form:
4260
4261 { # An Operation resource.&amp;nbsp;For successful operations that return an
4262 # Operation resource, only the fields relevant to the operation are populated
4263 # in the resource.
4264 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
4265 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
4266 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
4267 &quot;targetLink&quot;: &quot;A String&quot;,
4268 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
4269 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
4270 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
4271 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
4272 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
4273 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
4274 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
4275 # populated.
4276 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
4277 { # Database instance operation error.
4278 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
4279 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
4280 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
4281 },
4282 ],
4283 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
4284 },
4285 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
4286 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
4287 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
4288 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
4289 # of the database table are loaded with CSV data.
4290 &quot;A String&quot;,
4291 ],
4292 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
4293 },
4294 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
4295 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
4296 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
4297 # specify a database, and is overridden by any database specification in the
4298 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
4299 # must be specified.
4300 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
4301 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
4302 &quot;encryptionOptions&quot;: {
4303 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
4304 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
4305 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
4306 # write permissions to the bucket and read access to the file.
4307 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
4308 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
4309 # write permissions to the bucket and read access to the file.
4310 },
4311 },
4312 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
4313 # &lt;code&gt;gs:
4314 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
4315 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
4316 # // write permissions to the bucket and read access to the file.
4317 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
4318 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
4319 },
4320 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
4321 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
4322 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
4323 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
4324 # identifier to retrieve the Operations resource that has information about
4325 # the operation.
4326 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
4327 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
4328 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
4329 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
4330 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
4331 # either by using this property or by using the
4332 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
4333 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
4334 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
4335 # this database must match the one specified in the
4336 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
4337 &quot;A String&quot;,
4338 ],
4339 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
4340 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
4341 # you specify tables, specify one and only one database. For PostgreSQL
4342 # instances, you can specify only one table.
4343 &quot;A String&quot;,
4344 ],
4345 &quot;schemaOnly&quot;: True or False, # Export only schemas.
4346 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
4347 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
4348 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
4349 # a CHANGE MASTER TO statement with the binary log coordinates.
4350 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
4351 # a SQL comment, and has no effect.
4352 # All other values are ignored.
4353 },
4354 },
4355 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
4356 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
4357 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
4358 # stored. The URI is in the form &lt;code&gt;gs:
4359 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
4360 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
4361 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
4362 # // compressed.
4363 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
4364 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
4365 },
4366 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
4367 },
4368 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
4369 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
4370 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4371 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
4372 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
4373 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4374 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
4375 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
4376 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4377 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
4378 }</pre>
4379</div>
4380
4381</body></html>