blob: 0a93ec040f0bbb33382ad0c96068d610819b6cc6 [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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700166 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
167 # identifier to retrieve the Operations resource that has information about
168 # the operation.
169 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
170 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
171 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
172 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
173 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
174 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
175 # either by using this property or by using the
176 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
177 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
178 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
179 # this database must match the one specified in the
180 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
181 &quot;A String&quot;,
182 ],
183 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
184 &quot;schemaOnly&quot;: True or False, # Export only schemas.
185 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
186 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
187 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
188 # a CHANGE MASTER TO statement with the binary log coordinates.
189 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
190 # a SQL comment, and has no effect.
191 # All other values are ignored.
192 },
193 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
194 # you specify tables, specify one and only one database. For PostgreSQL
195 # instances, you can specify only one table.
196 &quot;A String&quot;,
197 ],
198 },
199 &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
200 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
201 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
202 # stored. The URI is in the form &lt;code&gt;gs:
203 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
204 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
205 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
206 # // compressed.
207 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
208 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
209 },
210 },
211 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
212 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
213 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
214 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
215 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
216 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
217 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
218 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
219 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
220 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700221 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
222 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
223 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
224 &quot;targetLink&quot;: &quot;A String&quot;,
225 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
226 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
227 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
228 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
229 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
230 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
231 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
232 # populated.
233 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
234 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700235 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700236 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
237 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -0700238 },
239 ],
240 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
241 },
242 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
243 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700244 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700245 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
246 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
247 # of the database table are loaded with CSV data.
248 &quot;A String&quot;,
249 ],
250 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
251 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700252 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
253 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
254 # specify a database, and is overridden by any database specification in the
255 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
256 # must be specified.
257 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
258 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
259 &quot;encryptionOptions&quot;: {
260 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
261 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
262 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
263 # write permissions to the bucket and read access to the file.
264 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
265 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
266 # write permissions to the bucket and read access to the file.
267 },
268 },
269 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
270 # &lt;code&gt;gs:
271 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
272 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
273 # // write permissions to the bucket and read access to the file.
274 &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
275 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
276 },
277 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
278 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
279 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700280 }</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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700297 &quot;destinationInstanceName&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance to be created as a clone.
Bu Sun Kim65020912020-05-20 12:08:20 -0700298 &quot;pitrTimestampMs&quot;: &quot;A String&quot;, # Reserved for future use.
299 &quot;binLogCoordinates&quot;: { # Binary log coordinates. # Binary log coordinates, if specified, identify the position up to which the
300 # source instance should be cloned. If not specified, the source instance is
301 # cloned up to the most recent binary log coordinates.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700302 &quot;binLogFileName&quot;: &quot;A String&quot;, # Name of the binary log file for a Cloud SQL instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700303 &quot;binLogPosition&quot;: &quot;A String&quot;, # Position (offset) within the binary log file.
304 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#binLogCoordinates&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700305 },
306 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#cloneContext&lt;/code&gt;.
307 &quot;pointInTime&quot;: &quot;A String&quot;, # Reserved for future use.
Bu Sun Kim65020912020-05-20 12:08:20 -0700308 },
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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700322 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
323 # identifier to retrieve the Operations resource that has information about
324 # the operation.
325 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
326 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
327 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
328 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
329 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
330 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
331 # either by using this property or by using the
332 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
333 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
334 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
335 # this database must match the one specified in the
336 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
337 &quot;A String&quot;,
338 ],
339 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
340 &quot;schemaOnly&quot;: True or False, # Export only schemas.
341 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
342 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
343 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
344 # a CHANGE MASTER TO statement with the binary log coordinates.
345 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
346 # a SQL comment, and has no effect.
347 # All other values are ignored.
348 },
349 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
350 # you specify tables, specify one and only one database. For PostgreSQL
351 # instances, you can specify only one table.
352 &quot;A String&quot;,
353 ],
354 },
355 &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
356 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
357 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
358 # stored. The URI is in the form &lt;code&gt;gs:
359 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
360 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
361 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
362 # // compressed.
363 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
364 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
365 },
366 },
367 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
368 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
369 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
370 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
371 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
372 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
373 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
374 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
375 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
376 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700377 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
378 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
379 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
380 &quot;targetLink&quot;: &quot;A String&quot;,
381 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
382 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
383 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
384 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
385 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
386 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
387 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
388 # populated.
389 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
390 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700391 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700392 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
393 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -0700394 },
395 ],
396 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
397 },
398 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
399 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700400 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700401 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
402 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
403 # of the database table are loaded with CSV data.
404 &quot;A String&quot;,
405 ],
406 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
407 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700408 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
409 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
410 # specify a database, and is overridden by any database specification in the
411 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
412 # must be specified.
413 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
414 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
415 &quot;encryptionOptions&quot;: {
416 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
417 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
418 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
419 # write permissions to the bucket and read access to the file.
420 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
421 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
422 # write permissions to the bucket and read access to the file.
423 },
424 },
425 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
426 # &lt;code&gt;gs:
427 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
428 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
429 # // write permissions to the bucket and read access to the file.
430 &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
431 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
432 },
433 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
434 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
435 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700436 }</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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700457 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
458 # identifier to retrieve the Operations resource that has information about
459 # the operation.
460 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
461 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
462 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
463 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
464 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
465 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
466 # either by using this property or by using the
467 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
468 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
469 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
470 # this database must match the one specified in the
471 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
472 &quot;A String&quot;,
473 ],
474 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
475 &quot;schemaOnly&quot;: True or False, # Export only schemas.
476 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
477 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
478 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
479 # a CHANGE MASTER TO statement with the binary log coordinates.
480 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
481 # a SQL comment, and has no effect.
482 # All other values are ignored.
483 },
484 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
485 # you specify tables, specify one and only one database. For PostgreSQL
486 # instances, you can specify only one table.
487 &quot;A String&quot;,
488 ],
489 },
490 &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
491 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
492 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
493 # stored. The URI is in the form &lt;code&gt;gs:
494 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
495 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
496 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
497 # // compressed.
498 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
499 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
500 },
501 },
502 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
503 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
504 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
505 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
506 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
507 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
508 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
509 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
510 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
511 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700512 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
513 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
514 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
515 &quot;targetLink&quot;: &quot;A String&quot;,
516 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
517 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
518 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
519 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
520 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
521 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
522 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
523 # populated.
524 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
525 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700526 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700527 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
528 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -0700529 },
530 ],
531 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
532 },
533 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
534 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700535 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700536 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
537 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
538 # of the database table are loaded with CSV data.
539 &quot;A String&quot;,
540 ],
541 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
542 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700543 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
544 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
545 # specify a database, and is overridden by any database specification in the
546 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
547 # must be specified.
548 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
549 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
550 &quot;encryptionOptions&quot;: {
551 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
552 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
553 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
554 # write permissions to the bucket and read access to the file.
555 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
556 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
557 # write permissions to the bucket and read access to the file.
558 },
559 },
560 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
561 # &lt;code&gt;gs:
562 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
563 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
564 # // write permissions to the bucket and read access to the file.
565 &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
566 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
567 },
568 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
569 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
570 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700571 }</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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700587 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#demoteMasterContext&lt;/code&gt;.
588 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as on-premises master in the
589 # replication setup.
590 &quot;verifyGtidConsistency&quot;: True or False, # Verify GTID consistency for demote operation. Default value:
591 # &lt;code&gt;True&lt;/code&gt;. Second Generation instances only. Setting this flag to
592 # false enables you to bypass GTID consistency check between on-premises
593 # master and Cloud SQL instance during the demotion operation but also
594 # exposes you to the risk of future replication failures. Change the value
595 # only if you know the reason for the GTID divergence and are confident that
596 # doing so will not cause any replication issues.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700597 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the on-premises master. # Configuration specific to read-replicas replicating from the on-premises
598 # master.
599 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#demoteMasterConfiguration&lt;/code&gt;.
600 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
601 # master. Replication configuration information such as the username,
602 # password, certificates, and keys are not stored in the instance metadata.
603 # The configuration information is used only to set up the replication
604 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
605 # in the data directory.
606 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#demoteMasterMysqlReplicaConfiguration&lt;/code&gt;.
607 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
608 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
609 # is encoded in the client&#x27;s certificate. The format of the slave&#x27;s private
610 # key can be either PKCS #1 or PKCS #8.
611 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
612 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
613 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
614 },
615 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700616 },
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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700630 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
631 # identifier to retrieve the Operations resource that has information about
632 # the operation.
633 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
634 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
635 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
636 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
637 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
638 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
639 # either by using this property or by using the
640 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
641 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
642 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
643 # this database must match the one specified in the
644 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
645 &quot;A String&quot;,
646 ],
647 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
648 &quot;schemaOnly&quot;: True or False, # Export only schemas.
649 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
650 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
651 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
652 # a CHANGE MASTER TO statement with the binary log coordinates.
653 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
654 # a SQL comment, and has no effect.
655 # All other values are ignored.
656 },
657 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
658 # you specify tables, specify one and only one database. For PostgreSQL
659 # instances, you can specify only one table.
660 &quot;A String&quot;,
661 ],
662 },
663 &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
664 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
665 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
666 # stored. The URI is in the form &lt;code&gt;gs:
667 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
668 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
669 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
670 # // compressed.
671 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
672 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
673 },
674 },
675 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
676 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
677 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
678 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
679 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
680 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
681 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
682 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
683 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
684 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700685 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
686 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
687 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
688 &quot;targetLink&quot;: &quot;A String&quot;,
689 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
690 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
691 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
692 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
693 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
694 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
695 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
696 # populated.
697 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
698 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700699 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700700 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
701 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -0700702 },
703 ],
704 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
705 },
706 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
707 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700708 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700709 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
710 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
711 # of the database table are loaded with CSV data.
712 &quot;A String&quot;,
713 ],
714 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
715 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700716 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
717 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
718 # specify a database, and is overridden by any database specification in the
719 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
720 # must be specified.
721 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
722 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
723 &quot;encryptionOptions&quot;: {
724 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
725 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
726 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
727 # write permissions to the bucket and read access to the file.
728 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
729 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
730 # write permissions to the bucket and read access to the file.
731 },
732 },
733 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
734 # &lt;code&gt;gs:
735 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
736 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
737 # // write permissions to the bucket and read access to the file.
738 &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
739 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
740 },
741 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
742 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
743 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700744 }</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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700760 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700761 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
762 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
763 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
764 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
765 # either by using this property or by using the
766 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
767 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
768 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
769 # this database must match the one specified in the
770 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
771 &quot;A String&quot;,
772 ],
773 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Bu Sun Kim65020912020-05-20 12:08:20 -0700774 &quot;schemaOnly&quot;: True or False, # Export only schemas.
775 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
776 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
777 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
778 # a CHANGE MASTER TO statement with the binary log coordinates.
779 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
780 # a SQL comment, and has no effect.
781 # All other values are ignored.
782 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700783 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
784 # you specify tables, specify one and only one database. For PostgreSQL
785 # instances, you can specify only one table.
786 &quot;A String&quot;,
787 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700788 },
789 &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
790 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
791 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
792 # stored. The URI is in the form &lt;code&gt;gs:
793 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
794 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
795 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
796 # // compressed.
797 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
798 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
799 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700800 },
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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700814 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
815 # identifier to retrieve the Operations resource that has information about
816 # the operation.
817 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
818 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
819 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
820 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
821 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
822 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
823 # either by using this property or by using the
824 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
825 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
826 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
827 # this database must match the one specified in the
828 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
829 &quot;A String&quot;,
830 ],
831 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
832 &quot;schemaOnly&quot;: True or False, # Export only schemas.
833 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
834 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
835 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
836 # a CHANGE MASTER TO statement with the binary log coordinates.
837 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
838 # a SQL comment, and has no effect.
839 # All other values are ignored.
840 },
841 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
842 # you specify tables, specify one and only one database. For PostgreSQL
843 # instances, you can specify only one table.
844 &quot;A String&quot;,
845 ],
846 },
847 &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
848 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
849 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
850 # stored. The URI is in the form &lt;code&gt;gs:
851 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
852 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
853 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
854 # // compressed.
855 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
856 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
857 },
858 },
859 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
860 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
861 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
862 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
863 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
864 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
865 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
866 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
867 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
868 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700869 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
870 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
871 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
872 &quot;targetLink&quot;: &quot;A String&quot;,
873 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
874 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
875 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
876 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
877 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
878 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
879 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
880 # populated.
881 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
882 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700883 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700884 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
885 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -0700886 },
887 ],
888 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
889 },
890 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
891 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700892 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700893 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
894 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
895 # of the database table are loaded with CSV data.
896 &quot;A String&quot;,
897 ],
898 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
899 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700900 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
901 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
902 # specify a database, and is overridden by any database specification in the
903 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
904 # must be specified.
905 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
906 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
907 &quot;encryptionOptions&quot;: {
908 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
909 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
910 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
911 # write permissions to the bucket and read access to the file.
912 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
913 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
914 # write permissions to the bucket and read access to the file.
915 },
916 },
917 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
918 # &lt;code&gt;gs:
919 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
920 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
921 # // write permissions to the bucket and read access to the file.
922 &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
923 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
924 },
925 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
926 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
927 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700928 }</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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700944 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#failoverContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700945 &quot;settingsVersion&quot;: &quot;A String&quot;, # The current settings version of this instance. Request will be rejected if
946 # this version doesn&#x27;t match the current settings version.
Bu Sun Kim65020912020-05-20 12:08:20 -0700947 },
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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700961 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
962 # identifier to retrieve the Operations resource that has information about
963 # the operation.
964 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
965 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
966 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
967 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
968 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
969 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
970 # either by using this property or by using the
971 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
972 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
973 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
974 # this database must match the one specified in the
975 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
976 &quot;A String&quot;,
977 ],
978 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
979 &quot;schemaOnly&quot;: True or False, # Export only schemas.
980 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
981 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
982 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
983 # a CHANGE MASTER TO statement with the binary log coordinates.
984 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
985 # a SQL comment, and has no effect.
986 # All other values are ignored.
987 },
988 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
989 # you specify tables, specify one and only one database. For PostgreSQL
990 # instances, you can specify only one table.
991 &quot;A String&quot;,
992 ],
993 },
994 &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
995 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
996 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
997 # stored. The URI is in the form &lt;code&gt;gs:
998 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
999 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
1000 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
1001 # // compressed.
1002 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
1003 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1004 },
1005 },
1006 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1007 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
1008 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1009 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1010 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
1011 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1012 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1013 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
1014 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1015 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001016 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1017 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1018 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1019 &quot;targetLink&quot;: &quot;A String&quot;,
1020 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
1021 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
1022 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
1023 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
1024 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
1025 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
1026 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
1027 # populated.
1028 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1029 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001030 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001031 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1032 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -07001033 },
1034 ],
1035 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
1036 },
1037 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
1038 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001039 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001040 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1041 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
1042 # of the database table are loaded with CSV data.
1043 &quot;A String&quot;,
1044 ],
1045 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1046 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001047 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
1048 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
1049 # specify a database, and is overridden by any database specification in the
1050 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
1051 # must be specified.
1052 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1053 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1054 &quot;encryptionOptions&quot;: {
1055 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1056 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
1057 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1058 # write permissions to the bucket and read access to the file.
1059 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
1060 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1061 # write permissions to the bucket and read access to the file.
1062 },
1063 },
1064 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
1065 # &lt;code&gt;gs:
1066 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
1067 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
1068 # // write permissions to the bucket and read access to the file.
1069 &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
1070 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1071 },
1072 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
1073 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
1074 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001075 }</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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001094 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
1095 # field can not be changed after instance creation. MySQL Second Generation
1096 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
1097 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
1098 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
1099 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
1100 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1101 &quot;A String&quot;,
1102 ],
1103 &quot;settings&quot;: { # Database instance settings. # The user settings.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001104 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1105 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
1106 # disabled, binarylog must be disabled as well.
1107 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1108 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1109 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
1110 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24
1111 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
1112 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
1113 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1114 },
1115 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a
1116 # single key value pair.
1117 &quot;a_key&quot;: &quot;A String&quot;,
1118 },
1119 &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
1120 # near as possible to either an App Engine app or Compute Engine zone for
1121 # better performance. App Engine co-location is only applicable to First
1122 # Generation instances.
1123 # preferably be located, either in a specific Compute Engine zone, or
1124 # co-located with an App Engine application. Note that if the preferred
1125 # location is not available, the instance will be located as close as possible
1126 # within the region. Only one location may be specified.
1127 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
1128 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
1129 # etc.).
1130 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The AppEngine application to follow, it must be in the same region as the
1131 # Cloud SQL instance.
1132 },
1133 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
1134 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either
1135 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
1136 # only applicable to First Generation instances.
1137 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is
1138 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
1139 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
1140 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
1141 # off; it is not activated, even if a connection request arrives.
1142 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
1143 # responds to incoming requests, and turns itself off when not in use.
1144 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
1145 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
1146 # 12 hours of inactivity.
Bu Sun Kim65020912020-05-20 12:08:20 -07001147 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
1148 # instance IP and manage which external networks can connect to the instance.
1149 # The IPv4 address cannot be disabled for Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07001150 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance
1151 # using the IP. In &lt;a
1152 # href=&quot;http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation&quot;&gt;CIDR
1153 # notation&lt;/a&gt;, also known as &#x27;slash&#x27; notation (e.g.
1154 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
1155 { # An entry for an Access Control list.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001156 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001157 &quot;value&quot;: &quot;A String&quot;, # The whitelisted value for the access control list.
1158 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in &lt;a
1159 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1160 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1161 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07001162 },
1163 ],
1164 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP should be enforced or not.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001165 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is
1166 # accessible for private IP. For example,
1167 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
1168 # be updated, but it cannot be removed after it is set.
1169 &quot;ipv4Enabled&quot;: True or False, # Whether the instance should be assigned an IP address or not.
Bu Sun Kim65020912020-05-20 12:08:20 -07001170 },
1171 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type (PostgreSQL and MySQL instances only). Potential values:
1172 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
1173 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
1174 # The instance can serve data from more than one zone in a region (it is
1175 # highly available). &lt;br&gt;For more information, see &lt;a
1176 # href=&quot;https://cloud.google.com/sql/docs/postgres/high-availability&quot;&gt;Overview
1177 # of the High Availability Configuration&lt;/a&gt;.
1178 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update
1179 # method to make sure concurrent updates are handled properly. During update,
1180 # use the most recent settingsVersion value for this instance and do not try
1181 # to update this value.
1182 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1183 { # Database flags for Cloud SQL instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07001184 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so
1185 # include both server options and system variables for MySQL. Flags should be
1186 # specified with underscores, not hyphens. For more information, see &lt;a
1187 # href=&quot;/sql/docs/mysql/flags&quot;&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
1188 # SQL documentation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001189 &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
1190 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
1191 # doesn&#x27;t take a value.
Bu Sun Kim65020912020-05-20 12:08:20 -07001192 },
1193 ],
1194 &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
1195 # can be restarted for maintenance purposes. Not used for First Generation
1196 # instances.
1197 # preferably be restarted for system maintenance purposes.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001198 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1199 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1200 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001201 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: &lt;code&gt;canary&lt;/code&gt; (Earlier) or
1202 # &lt;code&gt;stable&lt;/code&gt; (Later). &lt;br /&gt;&lt;a
1203 # href=&quot;/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen&quot;&gt;
1204 # Learn more&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001205 },
1206 &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;
1207 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
1208 # Generation instances.
1209 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is
1210 # true. Not used for First Generation instances.
1211 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased.
1212 # The default value is 0, which specifies that there is no limit. Not used
1213 # for First Generation instances.
1214 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. First Generation
1215 # instances only.
1216 &quot;A String&quot;,
1217 ],
1218 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example
1219 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
1220 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
1221 # this property determines whether the instance is First or Second
1222 # Generation. For more information, see &lt;a
1223 # href=&quot;/sql/docs/db_path/instance-settings&quot;&gt;Instance Settings&lt;/a&gt;.
1224 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
1225 # for First Generation instances.
1226 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
1227 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
1228 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
1229 # replication is enabled or not.
1230 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
1231 # database flags for crash-safe replication are enabled. This property is
1232 # only applicable to First Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07001233 },
1234 &quot;replicaNames&quot;: [ # The replicas of the instance.
1235 &quot;A String&quot;,
1236 ],
1237 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
1238 # Applies only to Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07001239 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001240 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001241 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001242 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1243 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1244 &quot;canDefer&quot;: True or False,
1245 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1246 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001247 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001248 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
1249 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
1250 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1251 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1252 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in &lt;a
1253 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1254 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1255 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1256 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1257 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1258 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
1259 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1260 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in &lt;a
1261 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1262 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
1263 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1264 },
1265 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1266 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1267 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as master in the replication setup.
1268 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following.
1269 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
1270 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
1271 # instance running on the
1272 # customer&#x27;s premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
1273 # instance configured as a read-replica.
1274 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This
1275 # value could be different from the zone that was specified when the instance
1276 # was created if the instance has failed over to its secondary zone.
1277 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been
1278 # deprecated. Users should use the
1279 # &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud
1280 # Monitoring API instead. Please see &lt;a
1281 # href=&quot;https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ&quot;&gt;this
1282 # announcement&lt;/a&gt; for details.
1283 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
Bu Sun Kim65020912020-05-20 12:08:20 -07001284 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
1285 # master. Replication configuration information such as the username,
1286 # password, certificates, and keys are not stored in the instance metadata.
1287 # The configuration information is used only to set up the replication
1288 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
1289 # in the data directory.
1290 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
1291 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1292 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the master&#x27;s Common Name value in the certificate
1293 # that it sends during the SSL handshake.
1294 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
1295 # is encoded in the client&#x27;s certificate.
1296 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1297 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1298 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1299 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the slave
1300 # instance is to be created. The URI is in the form gs:
1301 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
1302 # // Dumps should have the binlog co-ordinates from which replication should
1303 # // begin. This can be accomplished by setting --master-data to 1 when using
1304 # // mysqldump.
1305 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
1306 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1307 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1308 },
1309 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to
1310 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
1311 # case the master instance fails, the replica instance will be promoted as
1312 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
1313 # target, and the replica has to be in different zone with the master
1314 # instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001315 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001316 },
1317 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
1318 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable
1319 # only to Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07001320 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a
1321 # failover replica is created for the instance. The name
1322 # doesn&#x27;t include the project ID. This property is applicable only to
1323 # Second Generation instances.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001324 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates
1325 # that the failover replica is out of sync. The master can only failover to
1326 # the failover replica when the status is true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001327 },
1328 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1329 { # Database instance IP Mapping.
Bu Sun Kim65020912020-05-20 12:08:20 -07001330 &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
1331 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
1332 # address is a private address that can accept incoming connections. An
1333 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
1334 # originating from the instance, if supported.
1335 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001336 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in &lt;a
1337 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1338 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
1339 # the IP is scheduled to be retired.
Bu Sun Kim65020912020-05-20 12:08:20 -07001340 },
1341 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001342 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. This property is applicable only
1343 # to First Generation instances.
1344 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1345 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
1346 # Applies only to Second Generation instances.
1347 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1348 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
1349 },
1350 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
1351 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
1352 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
1353 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
1354 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
1355 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
1356 # or Second Generation). The region can not be changed after instance
1357 # creation.
1358 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the
1359 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
1360 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
1361 # available, for example due to problems with billing.
1362 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
1363 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
1364 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
1365 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
1366 &quot;backendType&quot;: &quot;A String&quot;, # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
1367 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
1368 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
1369 # managed by Google. &lt;br&gt;This property is read-only; use the
1370 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
1371 # the database type and Second or First Generation.
1372 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1373 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1374 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1375 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
1376 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1377 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1378 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
1379 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1380 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
1381 # is encoded in the client&#x27;s certificate.
1382 },
1383 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google
1384 # apps domain is prefixed if applicable.
1385 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property
1386 # is applicable only to Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07001387 }</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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001403 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001404 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1405 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
1406 # of the database table are loaded with CSV data.
1407 &quot;A String&quot;,
1408 ],
1409 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1410 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001411 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001449 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
1450 # identifier to retrieve the Operations resource that has information about
1451 # the operation.
1452 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1453 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
1454 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
1455 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
1456 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
1457 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
1458 # either by using this property or by using the
1459 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
1460 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
1461 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
1462 # this database must match the one specified in the
1463 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
1464 &quot;A String&quot;,
1465 ],
1466 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1467 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1468 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1469 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
1470 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
1471 # a CHANGE MASTER TO statement with the binary log coordinates.
1472 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
1473 # a SQL comment, and has no effect.
1474 # All other values are ignored.
1475 },
1476 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
1477 # you specify tables, specify one and only one database. For PostgreSQL
1478 # instances, you can specify only one table.
1479 &quot;A String&quot;,
1480 ],
1481 },
1482 &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
1483 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1484 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
1485 # stored. The URI is in the form &lt;code&gt;gs:
1486 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
1487 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
1488 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
1489 # // compressed.
1490 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
1491 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1492 },
1493 },
1494 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1495 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
1496 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1497 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1498 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
1499 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1500 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1501 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
1502 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1503 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001504 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1505 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1506 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1507 &quot;targetLink&quot;: &quot;A String&quot;,
1508 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
1509 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
1510 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
1511 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
1512 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
1513 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
1514 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
1515 # populated.
1516 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1517 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001518 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001519 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1520 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -07001521 },
1522 ],
1523 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
1524 },
1525 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
1526 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001527 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001528 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1529 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
1530 # of the database table are loaded with CSV data.
1531 &quot;A String&quot;,
1532 ],
1533 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1534 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001535 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
1536 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
1537 # specify a database, and is overridden by any database specification in the
1538 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
1539 # must be specified.
1540 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1541 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1542 &quot;encryptionOptions&quot;: {
1543 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1544 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
1545 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1546 # write permissions to the bucket and read access to the file.
1547 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
1548 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1549 # write permissions to the bucket and read access to the file.
1550 },
1551 },
1552 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
1553 # &lt;code&gt;gs:
1554 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
1555 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
1556 # // write permissions to the bucket and read access to the file.
1557 &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
1558 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1559 },
1560 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
1561 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
1562 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001563 }</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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001577 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
1578 # field can not be changed after instance creation. MySQL Second Generation
1579 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
1580 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
1581 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
1582 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
1583 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1584 &quot;A String&quot;,
1585 ],
1586 &quot;settings&quot;: { # Database instance settings. # The user settings.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001587 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1588 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
1589 # disabled, binarylog must be disabled as well.
1590 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1591 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1592 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
1593 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24
1594 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
1595 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
1596 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1597 },
1598 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a
1599 # single key value pair.
1600 &quot;a_key&quot;: &quot;A String&quot;,
1601 },
1602 &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
1603 # near as possible to either an App Engine app or Compute Engine zone for
1604 # better performance. App Engine co-location is only applicable to First
1605 # Generation instances.
1606 # preferably be located, either in a specific Compute Engine zone, or
1607 # co-located with an App Engine application. Note that if the preferred
1608 # location is not available, the instance will be located as close as possible
1609 # within the region. Only one location may be specified.
1610 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
1611 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
1612 # etc.).
1613 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The AppEngine application to follow, it must be in the same region as the
1614 # Cloud SQL instance.
1615 },
1616 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
1617 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either
1618 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
1619 # only applicable to First Generation instances.
1620 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is
1621 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
1622 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
1623 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
1624 # off; it is not activated, even if a connection request arrives.
1625 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
1626 # responds to incoming requests, and turns itself off when not in use.
1627 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
1628 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
1629 # 12 hours of inactivity.
Bu Sun Kim65020912020-05-20 12:08:20 -07001630 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
1631 # instance IP and manage which external networks can connect to the instance.
1632 # The IPv4 address cannot be disabled for Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07001633 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance
1634 # using the IP. In &lt;a
1635 # href=&quot;http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation&quot;&gt;CIDR
1636 # notation&lt;/a&gt;, also known as &#x27;slash&#x27; notation (e.g.
1637 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
1638 { # An entry for an Access Control list.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001639 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001640 &quot;value&quot;: &quot;A String&quot;, # The whitelisted value for the access control list.
1641 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in &lt;a
1642 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1643 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1644 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07001645 },
1646 ],
1647 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP should be enforced or not.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001648 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is
1649 # accessible for private IP. For example,
1650 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
1651 # be updated, but it cannot be removed after it is set.
1652 &quot;ipv4Enabled&quot;: True or False, # Whether the instance should be assigned an IP address or not.
Bu Sun Kim65020912020-05-20 12:08:20 -07001653 },
1654 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type (PostgreSQL and MySQL instances only). Potential values:
1655 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
1656 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
1657 # The instance can serve data from more than one zone in a region (it is
1658 # highly available). &lt;br&gt;For more information, see &lt;a
1659 # href=&quot;https://cloud.google.com/sql/docs/postgres/high-availability&quot;&gt;Overview
1660 # of the High Availability Configuration&lt;/a&gt;.
1661 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update
1662 # method to make sure concurrent updates are handled properly. During update,
1663 # use the most recent settingsVersion value for this instance and do not try
1664 # to update this value.
1665 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1666 { # Database flags for Cloud SQL instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07001667 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so
1668 # include both server options and system variables for MySQL. Flags should be
1669 # specified with underscores, not hyphens. For more information, see &lt;a
1670 # href=&quot;/sql/docs/mysql/flags&quot;&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
1671 # SQL documentation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001672 &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
1673 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
1674 # doesn&#x27;t take a value.
Bu Sun Kim65020912020-05-20 12:08:20 -07001675 },
1676 ],
1677 &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
1678 # can be restarted for maintenance purposes. Not used for First Generation
1679 # instances.
1680 # preferably be restarted for system maintenance purposes.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001681 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1682 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1683 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001684 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: &lt;code&gt;canary&lt;/code&gt; (Earlier) or
1685 # &lt;code&gt;stable&lt;/code&gt; (Later). &lt;br /&gt;&lt;a
1686 # href=&quot;/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen&quot;&gt;
1687 # Learn more&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001688 },
1689 &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;
1690 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
1691 # Generation instances.
1692 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is
1693 # true. Not used for First Generation instances.
1694 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased.
1695 # The default value is 0, which specifies that there is no limit. Not used
1696 # for First Generation instances.
1697 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. First Generation
1698 # instances only.
1699 &quot;A String&quot;,
1700 ],
1701 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example
1702 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
1703 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
1704 # this property determines whether the instance is First or Second
1705 # Generation. For more information, see &lt;a
1706 # href=&quot;/sql/docs/db_path/instance-settings&quot;&gt;Instance Settings&lt;/a&gt;.
1707 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
1708 # for First Generation instances.
1709 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
1710 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
1711 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
1712 # replication is enabled or not.
1713 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
1714 # database flags for crash-safe replication are enabled. This property is
1715 # only applicable to First Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07001716 },
1717 &quot;replicaNames&quot;: [ # The replicas of the instance.
1718 &quot;A String&quot;,
1719 ],
1720 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
1721 # Applies only to Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07001722 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001723 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001724 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001725 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1726 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1727 &quot;canDefer&quot;: True or False,
1728 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1729 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001730 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001731 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
1732 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
1733 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1734 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1735 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in &lt;a
1736 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1737 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1738 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1739 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1740 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1741 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
1742 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1743 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in &lt;a
1744 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1745 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
1746 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1747 },
1748 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1749 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1750 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as master in the replication setup.
1751 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following.
1752 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
1753 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
1754 # instance running on the
1755 # customer&#x27;s premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
1756 # instance configured as a read-replica.
1757 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This
1758 # value could be different from the zone that was specified when the instance
1759 # was created if the instance has failed over to its secondary zone.
1760 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been
1761 # deprecated. Users should use the
1762 # &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud
1763 # Monitoring API instead. Please see &lt;a
1764 # href=&quot;https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ&quot;&gt;this
1765 # announcement&lt;/a&gt; for details.
1766 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
Bu Sun Kim65020912020-05-20 12:08:20 -07001767 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
1768 # master. Replication configuration information such as the username,
1769 # password, certificates, and keys are not stored in the instance metadata.
1770 # The configuration information is used only to set up the replication
1771 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
1772 # in the data directory.
1773 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
1774 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1775 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the master&#x27;s Common Name value in the certificate
1776 # that it sends during the SSL handshake.
1777 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
1778 # is encoded in the client&#x27;s certificate.
1779 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1780 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1781 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1782 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the slave
1783 # instance is to be created. The URI is in the form gs:
1784 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
1785 # // Dumps should have the binlog co-ordinates from which replication should
1786 # // begin. This can be accomplished by setting --master-data to 1 when using
1787 # // mysqldump.
1788 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
1789 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1790 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1791 },
1792 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to
1793 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
1794 # case the master instance fails, the replica instance will be promoted as
1795 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
1796 # target, and the replica has to be in different zone with the master
1797 # instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001798 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001799 },
1800 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
1801 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable
1802 # only to Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07001803 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a
1804 # failover replica is created for the instance. The name
1805 # doesn&#x27;t include the project ID. This property is applicable only to
1806 # Second Generation instances.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001807 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates
1808 # that the failover replica is out of sync. The master can only failover to
1809 # the failover replica when the status is true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001810 },
1811 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1812 { # Database instance IP Mapping.
Bu Sun Kim65020912020-05-20 12:08:20 -07001813 &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
1814 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
1815 # address is a private address that can accept incoming connections. An
1816 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
1817 # originating from the instance, if supported.
1818 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001819 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in &lt;a
1820 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1821 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
1822 # the IP is scheduled to be retired.
Bu Sun Kim65020912020-05-20 12:08:20 -07001823 },
1824 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001825 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. This property is applicable only
1826 # to First Generation instances.
1827 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1828 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
1829 # Applies only to Second Generation instances.
1830 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1831 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
1832 },
1833 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
1834 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
1835 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
1836 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
1837 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
1838 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
1839 # or Second Generation). The region can not be changed after instance
1840 # creation.
1841 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the
1842 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
1843 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
1844 # available, for example due to problems with billing.
1845 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
1846 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
1847 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
1848 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
1849 &quot;backendType&quot;: &quot;A String&quot;, # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
1850 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
1851 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
1852 # managed by Google. &lt;br&gt;This property is read-only; use the
1853 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
1854 # the database type and Second or First Generation.
1855 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1856 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1857 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1858 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
1859 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1860 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1861 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
1862 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1863 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
1864 # is encoded in the client&#x27;s certificate.
1865 },
1866 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google
1867 # apps domain is prefixed if applicable.
1868 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property
1869 # is applicable only to Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07001870 }
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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001883 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
1884 # identifier to retrieve the Operations resource that has information about
1885 # the operation.
1886 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1887 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
1888 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
1889 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
1890 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
1891 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
1892 # either by using this property or by using the
1893 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
1894 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
1895 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
1896 # this database must match the one specified in the
1897 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
1898 &quot;A String&quot;,
1899 ],
1900 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1901 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1902 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1903 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
1904 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
1905 # a CHANGE MASTER TO statement with the binary log coordinates.
1906 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
1907 # a SQL comment, and has no effect.
1908 # All other values are ignored.
1909 },
1910 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
1911 # you specify tables, specify one and only one database. For PostgreSQL
1912 # instances, you can specify only one table.
1913 &quot;A String&quot;,
1914 ],
1915 },
1916 &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
1917 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1918 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
1919 # stored. The URI is in the form &lt;code&gt;gs:
1920 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
1921 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
1922 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
1923 # // compressed.
1924 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
1925 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1926 },
1927 },
1928 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1929 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
1930 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1931 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1932 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
1933 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1934 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1935 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
1936 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1937 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001938 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1939 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1940 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1941 &quot;targetLink&quot;: &quot;A String&quot;,
1942 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
1943 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
1944 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
1945 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
1946 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
1947 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
1948 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
1949 # populated.
1950 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1951 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001952 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001953 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1954 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -07001955 },
1956 ],
1957 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
1958 },
1959 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
1960 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001961 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001962 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1963 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
1964 # of the database table are loaded with CSV data.
1965 &quot;A String&quot;,
1966 ],
1967 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1968 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001969 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
1970 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
1971 # specify a database, and is overridden by any database specification in the
1972 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
1973 # must be specified.
1974 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1975 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1976 &quot;encryptionOptions&quot;: {
1977 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1978 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
1979 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1980 # write permissions to the bucket and read access to the file.
1981 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
1982 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1983 # write permissions to the bucket and read access to the file.
1984 },
1985 },
1986 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
1987 # &lt;code&gt;gs:
1988 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
1989 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
1990 # // write permissions to the bucket and read access to the file.
1991 &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
1992 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1993 },
1994 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
1995 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
1996 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001997 }</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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002027 &quot;items&quot;: [ # List of database instance resources.
2028 { # A Cloud SQL instance resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002029 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
2030 # field can not be changed after instance creation. MySQL Second Generation
2031 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
2032 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
2033 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
2034 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
2035 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
2036 &quot;A String&quot;,
2037 ],
2038 &quot;settings&quot;: { # Database instance settings. # The user settings.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002039 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
2040 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
2041 # disabled, binarylog must be disabled as well.
2042 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
2043 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
2044 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
2045 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24
2046 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
2047 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
2048 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
2049 },
2050 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a
2051 # single key value pair.
2052 &quot;a_key&quot;: &quot;A String&quot;,
2053 },
2054 &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
2055 # near as possible to either an App Engine app or Compute Engine zone for
2056 # better performance. App Engine co-location is only applicable to First
2057 # Generation instances.
2058 # preferably be located, either in a specific Compute Engine zone, or
2059 # co-located with an App Engine application. Note that if the preferred
2060 # location is not available, the instance will be located as close as possible
2061 # within the region. Only one location may be specified.
2062 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
2063 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
2064 # etc.).
2065 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The AppEngine application to follow, it must be in the same region as the
2066 # Cloud SQL instance.
2067 },
2068 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
2069 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either
2070 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
2071 # only applicable to First Generation instances.
2072 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is
2073 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
2074 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
2075 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
2076 # off; it is not activated, even if a connection request arrives.
2077 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
2078 # responds to incoming requests, and turns itself off when not in use.
2079 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
2080 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
2081 # 12 hours of inactivity.
Bu Sun Kim65020912020-05-20 12:08:20 -07002082 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
2083 # instance IP and manage which external networks can connect to the instance.
2084 # The IPv4 address cannot be disabled for Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07002085 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance
2086 # using the IP. In &lt;a
2087 # href=&quot;http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation&quot;&gt;CIDR
2088 # notation&lt;/a&gt;, also known as &#x27;slash&#x27; notation (e.g.
2089 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
2090 { # An entry for an Access Control list.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002091 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002092 &quot;value&quot;: &quot;A String&quot;, # The whitelisted value for the access control list.
2093 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in &lt;a
2094 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2095 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2096 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07002097 },
2098 ],
2099 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP should be enforced or not.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002100 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is
2101 # accessible for private IP. For example,
2102 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
2103 # be updated, but it cannot be removed after it is set.
2104 &quot;ipv4Enabled&quot;: True or False, # Whether the instance should be assigned an IP address or not.
Bu Sun Kim65020912020-05-20 12:08:20 -07002105 },
2106 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type (PostgreSQL and MySQL instances only). Potential values:
2107 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
2108 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
2109 # The instance can serve data from more than one zone in a region (it is
2110 # highly available). &lt;br&gt;For more information, see &lt;a
2111 # href=&quot;https://cloud.google.com/sql/docs/postgres/high-availability&quot;&gt;Overview
2112 # of the High Availability Configuration&lt;/a&gt;.
2113 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update
2114 # method to make sure concurrent updates are handled properly. During update,
2115 # use the most recent settingsVersion value for this instance and do not try
2116 # to update this value.
2117 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
2118 { # Database flags for Cloud SQL instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07002119 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so
2120 # include both server options and system variables for MySQL. Flags should be
2121 # specified with underscores, not hyphens. For more information, see &lt;a
2122 # href=&quot;/sql/docs/mysql/flags&quot;&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
2123 # SQL documentation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002124 &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
2125 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
2126 # doesn&#x27;t take a value.
Bu Sun Kim65020912020-05-20 12:08:20 -07002127 },
2128 ],
2129 &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
2130 # can be restarted for maintenance purposes. Not used for First Generation
2131 # instances.
2132 # preferably be restarted for system maintenance purposes.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002133 &quot;hour&quot;: 42, # hour of day - 0 to 23.
2134 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
2135 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002136 &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;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002140 },
2141 &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;
2142 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
2143 # Generation instances.
2144 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is
2145 # true. Not used for First Generation instances.
2146 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased.
2147 # The default value is 0, which specifies that there is no limit. Not used
2148 # for First Generation instances.
2149 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. First Generation
2150 # instances only.
2151 &quot;A String&quot;,
2152 ],
2153 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example
2154 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
2155 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
2156 # this property determines whether the instance is First or Second
2157 # Generation. For more information, see &lt;a
2158 # href=&quot;/sql/docs/db_path/instance-settings&quot;&gt;Instance Settings&lt;/a&gt;.
2159 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
2160 # for First Generation instances.
2161 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
2162 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
2163 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
2164 # replication is enabled or not.
2165 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
2166 # database flags for crash-safe replication are enabled. This property is
2167 # only applicable to First Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07002168 },
2169 &quot;replicaNames&quot;: [ # The replicas of the instance.
2170 &quot;A String&quot;,
2171 ],
2172 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
2173 # Applies only to Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07002174 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002175 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002176 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002177 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
2178 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
2179 &quot;canDefer&quot;: True or False,
2180 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
2181 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002182 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002183 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
2184 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
2185 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
2186 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2187 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in &lt;a
2188 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2189 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2190 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
2191 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
2192 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
2193 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
2194 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
2195 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in &lt;a
2196 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2197 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
2198 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
2199 },
2200 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
2201 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
2202 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as master in the replication setup.
2203 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following.
2204 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
2205 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
2206 # instance running on the
2207 # customer&#x27;s premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
2208 # instance configured as a read-replica.
2209 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This
2210 # value could be different from the zone that was specified when the instance
2211 # was created if the instance has failed over to its secondary zone.
2212 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been
2213 # deprecated. Users should use the
2214 # &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud
2215 # Monitoring API instead. Please see &lt;a
2216 # href=&quot;https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ&quot;&gt;this
2217 # announcement&lt;/a&gt; for details.
2218 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
Bu Sun Kim65020912020-05-20 12:08:20 -07002219 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
2220 # master. Replication configuration information such as the username,
2221 # password, certificates, and keys are not stored in the instance metadata.
2222 # The configuration information is used only to set up the replication
2223 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
2224 # in the data directory.
2225 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
2226 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
2227 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the master&#x27;s Common Name value in the certificate
2228 # that it sends during the SSL handshake.
2229 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
2230 # is encoded in the client&#x27;s certificate.
2231 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
2232 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
2233 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
2234 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the slave
2235 # instance is to be created. The URI is in the form gs:
2236 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
2237 # // Dumps should have the binlog co-ordinates from which replication should
2238 # // begin. This can be accomplished by setting --master-data to 1 when using
2239 # // mysqldump.
2240 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
2241 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
2242 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2243 },
2244 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to
2245 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
2246 # case the master instance fails, the replica instance will be promoted as
2247 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
2248 # target, and the replica has to be in different zone with the master
2249 # instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002250 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002251 },
2252 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
2253 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable
2254 # only to Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07002255 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a
2256 # failover replica is created for the instance. The name
2257 # doesn&#x27;t include the project ID. This property is applicable only to
2258 # Second Generation instances.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002259 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates
2260 # that the failover replica is out of sync. The master can only failover to
2261 # the failover replica when the status is true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002262 },
2263 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
2264 { # Database instance IP Mapping.
Bu Sun Kim65020912020-05-20 12:08:20 -07002265 &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
2266 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
2267 # address is a private address that can accept incoming connections. An
2268 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
2269 # originating from the instance, if supported.
2270 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002271 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in &lt;a
2272 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2273 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
2274 # the IP is scheduled to be retired.
Bu Sun Kim65020912020-05-20 12:08:20 -07002275 },
2276 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002277 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. This property is applicable only
2278 # to First Generation instances.
2279 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2280 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
2281 # Applies only to Second Generation instances.
2282 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
2283 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
2284 },
2285 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
2286 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
2287 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
2288 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
2289 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
2290 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
2291 # or Second Generation). The region can not be changed after instance
2292 # creation.
2293 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the
2294 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
2295 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
2296 # available, for example due to problems with billing.
2297 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
2298 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
2299 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
2300 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
2301 &quot;backendType&quot;: &quot;A String&quot;, # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
2302 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
2303 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
2304 # managed by Google. &lt;br&gt;This property is read-only; use the
2305 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
2306 # the database type and Second or First Generation.
2307 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
2308 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
2309 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
2310 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
2311 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
2312 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2313 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
2314 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
2315 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
2316 # is encoded in the client&#x27;s certificate.
2317 },
2318 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google
2319 # apps domain is prefixed if applicable.
2320 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property
2321 # is applicable only to Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07002322 },
2323 ],
2324 &quot;warnings&quot;: [ # List of warnings that occurred while handling the request.
2325 { # An Admin API warning message.
2326 &quot;code&quot;: &quot;A String&quot;, # Code to uniquely identify the warning type.
2327 &quot;message&quot;: &quot;A String&quot;, # The warning message.
2328 },
2329 ],
2330 &quot;nextPageToken&quot;: &quot;A String&quot;, # The continuation token, used to page through large result sets. Provide
2331 # this value in a subsequent request to return the next page of results.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002332 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instancesList&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002333 }</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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002404 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
2405 # field can not be changed after instance creation. MySQL Second Generation
2406 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
2407 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
2408 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
2409 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
2410 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
2411 &quot;A String&quot;,
2412 ],
2413 &quot;settings&quot;: { # Database instance settings. # The user settings.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002414 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
2415 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
2416 # disabled, binarylog must be disabled as well.
2417 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
2418 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
2419 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
2420 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24
2421 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
2422 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
2423 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
2424 },
2425 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a
2426 # single key value pair.
2427 &quot;a_key&quot;: &quot;A String&quot;,
2428 },
2429 &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
2430 # near as possible to either an App Engine app or Compute Engine zone for
2431 # better performance. App Engine co-location is only applicable to First
2432 # Generation instances.
2433 # preferably be located, either in a specific Compute Engine zone, or
2434 # co-located with an App Engine application. Note that if the preferred
2435 # location is not available, the instance will be located as close as possible
2436 # within the region. Only one location may be specified.
2437 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
2438 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
2439 # etc.).
2440 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The AppEngine application to follow, it must be in the same region as the
2441 # Cloud SQL instance.
2442 },
2443 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
2444 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either
2445 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
2446 # only applicable to First Generation instances.
2447 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is
2448 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
2449 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
2450 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
2451 # off; it is not activated, even if a connection request arrives.
2452 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
2453 # responds to incoming requests, and turns itself off when not in use.
2454 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
2455 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
2456 # 12 hours of inactivity.
Bu Sun Kim65020912020-05-20 12:08:20 -07002457 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
2458 # instance IP and manage which external networks can connect to the instance.
2459 # The IPv4 address cannot be disabled for Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07002460 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance
2461 # using the IP. In &lt;a
2462 # href=&quot;http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation&quot;&gt;CIDR
2463 # notation&lt;/a&gt;, also known as &#x27;slash&#x27; notation (e.g.
2464 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
2465 { # An entry for an Access Control list.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002466 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002467 &quot;value&quot;: &quot;A String&quot;, # The whitelisted value for the access control list.
2468 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in &lt;a
2469 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2470 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2471 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07002472 },
2473 ],
2474 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP should be enforced or not.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002475 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is
2476 # accessible for private IP. For example,
2477 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
2478 # be updated, but it cannot be removed after it is set.
2479 &quot;ipv4Enabled&quot;: True or False, # Whether the instance should be assigned an IP address or not.
Bu Sun Kim65020912020-05-20 12:08:20 -07002480 },
2481 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type (PostgreSQL and MySQL instances only). Potential values:
2482 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
2483 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
2484 # The instance can serve data from more than one zone in a region (it is
2485 # highly available). &lt;br&gt;For more information, see &lt;a
2486 # href=&quot;https://cloud.google.com/sql/docs/postgres/high-availability&quot;&gt;Overview
2487 # of the High Availability Configuration&lt;/a&gt;.
2488 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update
2489 # method to make sure concurrent updates are handled properly. During update,
2490 # use the most recent settingsVersion value for this instance and do not try
2491 # to update this value.
2492 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
2493 { # Database flags for Cloud SQL instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07002494 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so
2495 # include both server options and system variables for MySQL. Flags should be
2496 # specified with underscores, not hyphens. For more information, see &lt;a
2497 # href=&quot;/sql/docs/mysql/flags&quot;&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
2498 # SQL documentation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002499 &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
2500 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
2501 # doesn&#x27;t take a value.
Bu Sun Kim65020912020-05-20 12:08:20 -07002502 },
2503 ],
2504 &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
2505 # can be restarted for maintenance purposes. Not used for First Generation
2506 # instances.
2507 # preferably be restarted for system maintenance purposes.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002508 &quot;hour&quot;: 42, # hour of day - 0 to 23.
2509 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
2510 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002511 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: &lt;code&gt;canary&lt;/code&gt; (Earlier) or
2512 # &lt;code&gt;stable&lt;/code&gt; (Later). &lt;br /&gt;&lt;a
2513 # href=&quot;/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen&quot;&gt;
2514 # Learn more&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002515 },
2516 &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;
2517 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
2518 # Generation instances.
2519 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is
2520 # true. Not used for First Generation instances.
2521 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased.
2522 # The default value is 0, which specifies that there is no limit. Not used
2523 # for First Generation instances.
2524 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. First Generation
2525 # instances only.
2526 &quot;A String&quot;,
2527 ],
2528 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example
2529 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
2530 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
2531 # this property determines whether the instance is First or Second
2532 # Generation. For more information, see &lt;a
2533 # href=&quot;/sql/docs/db_path/instance-settings&quot;&gt;Instance Settings&lt;/a&gt;.
2534 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
2535 # for First Generation instances.
2536 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
2537 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
2538 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
2539 # replication is enabled or not.
2540 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
2541 # database flags for crash-safe replication are enabled. This property is
2542 # only applicable to First Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07002543 },
2544 &quot;replicaNames&quot;: [ # The replicas of the instance.
2545 &quot;A String&quot;,
2546 ],
2547 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
2548 # Applies only to Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07002549 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002550 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002551 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002552 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
2553 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
2554 &quot;canDefer&quot;: True or False,
2555 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
2556 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002557 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002558 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
2559 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
2560 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
2561 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2562 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in &lt;a
2563 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2564 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2565 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
2566 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
2567 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
2568 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
2569 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
2570 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in &lt;a
2571 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2572 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
2573 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
2574 },
2575 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
2576 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
2577 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as master in the replication setup.
2578 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following.
2579 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
2580 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
2581 # instance running on the
2582 # customer&#x27;s premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
2583 # instance configured as a read-replica.
2584 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This
2585 # value could be different from the zone that was specified when the instance
2586 # was created if the instance has failed over to its secondary zone.
2587 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been
2588 # deprecated. Users should use the
2589 # &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud
2590 # Monitoring API instead. Please see &lt;a
2591 # href=&quot;https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ&quot;&gt;this
2592 # announcement&lt;/a&gt; for details.
2593 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
Bu Sun Kim65020912020-05-20 12:08:20 -07002594 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
2595 # master. Replication configuration information such as the username,
2596 # password, certificates, and keys are not stored in the instance metadata.
2597 # The configuration information is used only to set up the replication
2598 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
2599 # in the data directory.
2600 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
2601 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
2602 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the master&#x27;s Common Name value in the certificate
2603 # that it sends during the SSL handshake.
2604 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
2605 # is encoded in the client&#x27;s certificate.
2606 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
2607 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
2608 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
2609 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the slave
2610 # instance is to be created. The URI is in the form gs:
2611 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
2612 # // Dumps should have the binlog co-ordinates from which replication should
2613 # // begin. This can be accomplished by setting --master-data to 1 when using
2614 # // mysqldump.
2615 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
2616 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
2617 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2618 },
2619 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to
2620 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
2621 # case the master instance fails, the replica instance will be promoted as
2622 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
2623 # target, and the replica has to be in different zone with the master
2624 # instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002625 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002626 },
2627 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
2628 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable
2629 # only to Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07002630 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a
2631 # failover replica is created for the instance. The name
2632 # doesn&#x27;t include the project ID. This property is applicable only to
2633 # Second Generation instances.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002634 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates
2635 # that the failover replica is out of sync. The master can only failover to
2636 # the failover replica when the status is true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002637 },
2638 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
2639 { # Database instance IP Mapping.
Bu Sun Kim65020912020-05-20 12:08:20 -07002640 &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
2641 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
2642 # address is a private address that can accept incoming connections. An
2643 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
2644 # originating from the instance, if supported.
2645 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002646 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in &lt;a
2647 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2648 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
2649 # the IP is scheduled to be retired.
Bu Sun Kim65020912020-05-20 12:08:20 -07002650 },
2651 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002652 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. This property is applicable only
2653 # to First Generation instances.
2654 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2655 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
2656 # Applies only to Second Generation instances.
2657 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
2658 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
2659 },
2660 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
2661 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
2662 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
2663 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
2664 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
2665 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
2666 # or Second Generation). The region can not be changed after instance
2667 # creation.
2668 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the
2669 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
2670 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
2671 # available, for example due to problems with billing.
2672 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
2673 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
2674 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
2675 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
2676 &quot;backendType&quot;: &quot;A String&quot;, # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
2677 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
2678 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
2679 # managed by Google. &lt;br&gt;This property is read-only; use the
2680 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
2681 # the database type and Second or First Generation.
2682 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
2683 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
2684 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
2685 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
2686 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
2687 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2688 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
2689 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
2690 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
2691 # is encoded in the client&#x27;s certificate.
2692 },
2693 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google
2694 # apps domain is prefixed if applicable.
2695 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property
2696 # is applicable only to Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07002697 }
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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002710 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
2711 # identifier to retrieve the Operations resource that has information about
2712 # the operation.
2713 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2714 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
2715 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
2716 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
2717 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
2718 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
2719 # either by using this property or by using the
2720 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
2721 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
2722 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
2723 # this database must match the one specified in the
2724 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
2725 &quot;A String&quot;,
2726 ],
2727 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2728 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2729 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2730 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
2731 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
2732 # a CHANGE MASTER TO statement with the binary log coordinates.
2733 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
2734 # a SQL comment, and has no effect.
2735 # All other values are ignored.
2736 },
2737 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
2738 # you specify tables, specify one and only one database. For PostgreSQL
2739 # instances, you can specify only one table.
2740 &quot;A String&quot;,
2741 ],
2742 },
2743 &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
2744 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
2745 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
2746 # stored. The URI is in the form &lt;code&gt;gs:
2747 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
2748 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
2749 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
2750 # // compressed.
2751 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
2752 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2753 },
2754 },
2755 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2756 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
2757 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2758 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2759 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
2760 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2761 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2762 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
2763 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2764 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002765 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2766 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2767 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2768 &quot;targetLink&quot;: &quot;A String&quot;,
2769 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
2770 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
2771 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
2772 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
2773 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
2774 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
2775 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
2776 # populated.
2777 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2778 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002779 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002780 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2781 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -07002782 },
2783 ],
2784 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
2785 },
2786 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
2787 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002788 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002789 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2790 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
2791 # of the database table are loaded with CSV data.
2792 &quot;A String&quot;,
2793 ],
2794 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2795 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002796 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
2797 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
2798 # specify a database, and is overridden by any database specification in the
2799 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
2800 # must be specified.
2801 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2802 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2803 &quot;encryptionOptions&quot;: {
2804 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2805 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
2806 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
2807 # write permissions to the bucket and read access to the file.
2808 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
2809 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
2810 # write permissions to the bucket and read access to the file.
2811 },
2812 },
2813 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
2814 # &lt;code&gt;gs:
2815 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
2816 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
2817 # // write permissions to the bucket and read access to the file.
2818 &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
2819 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
2820 },
2821 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
2822 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
2823 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002824 }</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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002846 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
2847 # identifier to retrieve the Operations resource that has information about
2848 # the operation.
2849 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2850 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
2851 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
2852 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
2853 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
2854 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
2855 # either by using this property or by using the
2856 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
2857 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
2858 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
2859 # this database must match the one specified in the
2860 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
2861 &quot;A String&quot;,
2862 ],
2863 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2864 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2865 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2866 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
2867 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
2868 # a CHANGE MASTER TO statement with the binary log coordinates.
2869 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
2870 # a SQL comment, and has no effect.
2871 # All other values are ignored.
2872 },
2873 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
2874 # you specify tables, specify one and only one database. For PostgreSQL
2875 # instances, you can specify only one table.
2876 &quot;A String&quot;,
2877 ],
2878 },
2879 &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
2880 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
2881 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
2882 # stored. The URI is in the form &lt;code&gt;gs:
2883 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
2884 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
2885 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
2886 # // compressed.
2887 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
2888 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2889 },
2890 },
2891 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2892 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
2893 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2894 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2895 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
2896 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2897 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2898 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
2899 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2900 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002901 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2902 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2903 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2904 &quot;targetLink&quot;: &quot;A String&quot;,
2905 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
2906 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
2907 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
2908 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
2909 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
2910 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
2911 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
2912 # populated.
2913 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2914 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002915 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002916 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2917 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -07002918 },
2919 ],
2920 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
2921 },
2922 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
2923 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002924 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002925 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2926 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
2927 # of the database table are loaded with CSV data.
2928 &quot;A String&quot;,
2929 ],
2930 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2931 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002932 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
2933 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
2934 # specify a database, and is overridden by any database specification in the
2935 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
2936 # must be specified.
2937 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2938 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2939 &quot;encryptionOptions&quot;: {
2940 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2941 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
2942 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
2943 # write permissions to the bucket and read access to the file.
2944 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
2945 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
2946 # write permissions to the bucket and read access to the file.
2947 },
2948 },
2949 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
2950 # &lt;code&gt;gs:
2951 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
2952 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
2953 # // write permissions to the bucket and read access to the file.
2954 &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
2955 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
2956 },
2957 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
2958 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
2959 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002960 }</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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002982 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
2983 # identifier to retrieve the Operations resource that has information about
2984 # the operation.
2985 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2986 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
2987 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
2988 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
2989 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
2990 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
2991 # either by using this property or by using the
2992 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
2993 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
2994 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
2995 # this database must match the one specified in the
2996 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
2997 &quot;A String&quot;,
2998 ],
2999 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3000 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3001 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3002 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
3003 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3004 # a CHANGE MASTER TO statement with the binary log coordinates.
3005 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3006 # a SQL comment, and has no effect.
3007 # All other values are ignored.
3008 },
3009 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
3010 # you specify tables, specify one and only one database. For PostgreSQL
3011 # instances, you can specify only one table.
3012 &quot;A String&quot;,
3013 ],
3014 },
3015 &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
3016 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3017 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3018 # stored. The URI is in the form &lt;code&gt;gs:
3019 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3020 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3021 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3022 # // compressed.
3023 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3024 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3025 },
3026 },
3027 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
3028 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3029 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3030 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3031 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3032 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3033 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3034 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3035 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3036 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003037 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3038 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3039 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3040 &quot;targetLink&quot;: &quot;A String&quot;,
3041 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3042 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3043 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3044 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3045 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3046 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3047 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3048 # populated.
3049 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3050 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003051 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003052 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3053 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -07003054 },
3055 ],
3056 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3057 },
3058 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3059 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003060 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003061 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3062 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3063 # of the database table are loaded with CSV data.
3064 &quot;A String&quot;,
3065 ],
3066 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3067 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003068 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3069 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3070 # specify a database, and is overridden by any database specification in the
3071 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3072 # must be specified.
3073 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3074 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3075 &quot;encryptionOptions&quot;: {
3076 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3077 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3078 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3079 # write permissions to the bucket and read access to the file.
3080 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3081 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3082 # write permissions to the bucket and read access to the file.
3083 },
3084 },
3085 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
3086 # &lt;code&gt;gs:
3087 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3088 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3089 # // write permissions to the bucket and read access to the file.
3090 &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
3091 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3092 },
3093 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3094 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3095 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003096 }</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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003117 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
3118 # identifier to retrieve the Operations resource that has information about
3119 # the operation.
3120 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3121 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3122 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3123 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3124 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3125 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3126 # either by using this property or by using the
3127 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3128 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3129 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3130 # this database must match the one specified in the
3131 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
3132 &quot;A String&quot;,
3133 ],
3134 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3135 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3136 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3137 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
3138 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3139 # a CHANGE MASTER TO statement with the binary log coordinates.
3140 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3141 # a SQL comment, and has no effect.
3142 # All other values are ignored.
3143 },
3144 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
3145 # you specify tables, specify one and only one database. For PostgreSQL
3146 # instances, you can specify only one table.
3147 &quot;A String&quot;,
3148 ],
3149 },
3150 &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
3151 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3152 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3153 # stored. The URI is in the form &lt;code&gt;gs:
3154 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3155 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3156 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3157 # // compressed.
3158 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3159 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3160 },
3161 },
3162 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
3163 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3164 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3165 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3166 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3167 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3168 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3169 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3170 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3171 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003172 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3173 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3174 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3175 &quot;targetLink&quot;: &quot;A String&quot;,
3176 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3177 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3178 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3179 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3180 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3181 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3182 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3183 # populated.
3184 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3185 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003186 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003187 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3188 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -07003189 },
3190 ],
3191 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3192 },
3193 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3194 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003195 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003196 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3197 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3198 # of the database table are loaded with CSV data.
3199 &quot;A String&quot;,
3200 ],
3201 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3202 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003203 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3204 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3205 # specify a database, and is overridden by any database specification in the
3206 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3207 # must be specified.
3208 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3209 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3210 &quot;encryptionOptions&quot;: {
3211 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3212 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3213 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3214 # write permissions to the bucket and read access to the file.
3215 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3216 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3217 # write permissions to the bucket and read access to the file.
3218 },
3219 },
3220 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
3221 # &lt;code&gt;gs:
3222 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3223 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3224 # // write permissions to the bucket and read access to the file.
3225 &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
3226 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3227 },
3228 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3229 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3230 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003231 }</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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003266 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
3267 # identifier to retrieve the Operations resource that has information about
3268 # the operation.
3269 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3270 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3271 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3272 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3273 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3274 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3275 # either by using this property or by using the
3276 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3277 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3278 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3279 # this database must match the one specified in the
3280 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
3281 &quot;A String&quot;,
3282 ],
3283 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3284 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3285 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3286 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
3287 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3288 # a CHANGE MASTER TO statement with the binary log coordinates.
3289 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3290 # a SQL comment, and has no effect.
3291 # All other values are ignored.
3292 },
3293 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
3294 # you specify tables, specify one and only one database. For PostgreSQL
3295 # instances, you can specify only one table.
3296 &quot;A String&quot;,
3297 ],
3298 },
3299 &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
3300 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3301 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3302 # stored. The URI is in the form &lt;code&gt;gs:
3303 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3304 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3305 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3306 # // compressed.
3307 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3308 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3309 },
3310 },
3311 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
3312 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3313 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3314 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3315 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3316 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3317 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3318 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3319 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3320 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003321 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3322 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3323 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3324 &quot;targetLink&quot;: &quot;A String&quot;,
3325 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3326 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3327 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3328 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3329 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3330 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3331 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3332 # populated.
3333 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3334 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003335 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003336 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3337 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -07003338 },
3339 ],
3340 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3341 },
3342 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3343 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003344 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003345 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3346 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3347 # of the database table are loaded with CSV data.
3348 &quot;A String&quot;,
3349 ],
3350 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3351 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003352 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3353 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3354 # specify a database, and is overridden by any database specification in the
3355 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3356 # must be specified.
3357 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3358 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3359 &quot;encryptionOptions&quot;: {
3360 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3361 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3362 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3363 # write permissions to the bucket and read access to the file.
3364 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3365 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3366 # write permissions to the bucket and read access to the file.
3367 },
3368 },
3369 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
3370 # &lt;code&gt;gs:
3371 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3372 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3373 # // write permissions to the bucket and read access to the file.
3374 &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
3375 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3376 },
3377 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3378 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3379 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003380 }</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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003413 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
3414 # identifier to retrieve the Operations resource that has information about
3415 # the operation.
3416 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3417 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3418 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3419 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3420 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3421 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3422 # either by using this property or by using the
3423 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3424 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3425 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3426 # this database must match the one specified in the
3427 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
3428 &quot;A String&quot;,
3429 ],
3430 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3431 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3432 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3433 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
3434 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3435 # a CHANGE MASTER TO statement with the binary log coordinates.
3436 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3437 # a SQL comment, and has no effect.
3438 # All other values are ignored.
3439 },
3440 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
3441 # you specify tables, specify one and only one database. For PostgreSQL
3442 # instances, you can specify only one table.
3443 &quot;A String&quot;,
3444 ],
3445 },
3446 &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
3447 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3448 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3449 # stored. The URI is in the form &lt;code&gt;gs:
3450 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3451 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3452 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3453 # // compressed.
3454 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3455 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3456 },
3457 },
3458 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
3459 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3460 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3461 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3462 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3463 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3464 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3465 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3466 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3467 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003468 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3469 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3470 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3471 &quot;targetLink&quot;: &quot;A String&quot;,
3472 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3473 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3474 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3475 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3476 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3477 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3478 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3479 # populated.
3480 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3481 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003482 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003483 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3484 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -07003485 },
3486 ],
3487 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3488 },
3489 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3490 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003491 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003492 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3493 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3494 # of the database table are loaded with CSV data.
3495 &quot;A String&quot;,
3496 ],
3497 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3498 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003499 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3500 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3501 # specify a database, and is overridden by any database specification in the
3502 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3503 # must be specified.
3504 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3505 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3506 &quot;encryptionOptions&quot;: {
3507 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3508 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3509 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3510 # write permissions to the bucket and read access to the file.
3511 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3512 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3513 # write permissions to the bucket and read access to the file.
3514 },
3515 },
3516 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
3517 # &lt;code&gt;gs:
3518 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3519 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3520 # // write permissions to the bucket and read access to the file.
3521 &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
3522 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3523 },
3524 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3525 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3526 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003527 }</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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003548 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
3549 # identifier to retrieve the Operations resource that has information about
3550 # the operation.
3551 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3552 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3553 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3554 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3555 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3556 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3557 # either by using this property or by using the
3558 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3559 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3560 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3561 # this database must match the one specified in the
3562 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
3563 &quot;A String&quot;,
3564 ],
3565 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3566 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3567 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3568 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
3569 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3570 # a CHANGE MASTER TO statement with the binary log coordinates.
3571 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3572 # a SQL comment, and has no effect.
3573 # All other values are ignored.
3574 },
3575 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
3576 # you specify tables, specify one and only one database. For PostgreSQL
3577 # instances, you can specify only one table.
3578 &quot;A String&quot;,
3579 ],
3580 },
3581 &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
3582 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3583 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3584 # stored. The URI is in the form &lt;code&gt;gs:
3585 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3586 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3587 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3588 # // compressed.
3589 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3590 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3591 },
3592 },
3593 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
3594 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3595 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3596 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3597 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3598 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3599 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3600 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3601 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3602 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003603 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3604 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3605 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3606 &quot;targetLink&quot;: &quot;A String&quot;,
3607 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3608 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3609 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3610 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3611 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3612 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3613 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3614 # populated.
3615 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3616 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003617 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003618 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3619 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -07003620 },
3621 ],
3622 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3623 },
3624 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3625 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003626 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003627 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3628 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3629 # of the database table are loaded with CSV data.
3630 &quot;A String&quot;,
3631 ],
3632 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3633 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003634 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3635 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3636 # specify a database, and is overridden by any database specification in the
3637 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3638 # must be specified.
3639 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3640 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3641 &quot;encryptionOptions&quot;: {
3642 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3643 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3644 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3645 # write permissions to the bucket and read access to the file.
3646 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3647 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3648 # write permissions to the bucket and read access to the file.
3649 },
3650 },
3651 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
3652 # &lt;code&gt;gs:
3653 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3654 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3655 # // write permissions to the bucket and read access to the file.
3656 &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
3657 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3658 },
3659 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3660 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3661 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003662 }</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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003683 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
3684 # identifier to retrieve the Operations resource that has information about
3685 # the operation.
3686 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3687 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3688 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3689 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3690 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3691 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3692 # either by using this property or by using the
3693 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3694 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3695 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3696 # this database must match the one specified in the
3697 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
3698 &quot;A String&quot;,
3699 ],
3700 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3701 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3702 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3703 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
3704 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3705 # a CHANGE MASTER TO statement with the binary log coordinates.
3706 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3707 # a SQL comment, and has no effect.
3708 # All other values are ignored.
3709 },
3710 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
3711 # you specify tables, specify one and only one database. For PostgreSQL
3712 # instances, you can specify only one table.
3713 &quot;A String&quot;,
3714 ],
3715 },
3716 &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
3717 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3718 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3719 # stored. The URI is in the form &lt;code&gt;gs:
3720 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3721 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3722 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3723 # // compressed.
3724 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3725 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3726 },
3727 },
3728 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
3729 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3730 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3731 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3732 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3733 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3734 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3735 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3736 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3737 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003738 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3739 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3740 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3741 &quot;targetLink&quot;: &quot;A String&quot;,
3742 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3743 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3744 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3745 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3746 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3747 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3748 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3749 # populated.
3750 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3751 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003752 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003753 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3754 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -07003755 },
3756 ],
3757 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3758 },
3759 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3760 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003761 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003762 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3763 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3764 # of the database table are loaded with CSV data.
3765 &quot;A String&quot;,
3766 ],
3767 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3768 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003769 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3770 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3771 # specify a database, and is overridden by any database specification in the
3772 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3773 # must be specified.
3774 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3775 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3776 &quot;encryptionOptions&quot;: {
3777 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3778 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3779 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3780 # write permissions to the bucket and read access to the file.
3781 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3782 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3783 # write permissions to the bucket and read access to the file.
3784 },
3785 },
3786 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
3787 # &lt;code&gt;gs:
3788 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3789 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3790 # // write permissions to the bucket and read access to the file.
3791 &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
3792 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3793 },
3794 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3795 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3796 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003797 }</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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003829 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
3830 # identifier to retrieve the Operations resource that has information about
3831 # the operation.
3832 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3833 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3834 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3835 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3836 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3837 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3838 # either by using this property or by using the
3839 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3840 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3841 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3842 # this database must match the one specified in the
3843 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
3844 &quot;A String&quot;,
3845 ],
3846 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3847 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3848 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3849 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
3850 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3851 # a CHANGE MASTER TO statement with the binary log coordinates.
3852 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3853 # a SQL comment, and has no effect.
3854 # All other values are ignored.
3855 },
3856 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
3857 # you specify tables, specify one and only one database. For PostgreSQL
3858 # instances, you can specify only one table.
3859 &quot;A String&quot;,
3860 ],
3861 },
3862 &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
3863 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3864 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3865 # stored. The URI is in the form &lt;code&gt;gs:
3866 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3867 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3868 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3869 # // compressed.
3870 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3871 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3872 },
3873 },
3874 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
3875 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3876 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3877 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3878 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3879 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3880 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3881 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3882 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3883 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003884 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3885 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3886 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3887 &quot;targetLink&quot;: &quot;A String&quot;,
3888 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3889 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3890 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3891 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3892 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3893 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3894 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3895 # populated.
3896 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3897 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003898 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003899 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3900 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -07003901 },
3902 ],
3903 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3904 },
3905 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3906 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003907 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003908 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3909 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3910 # of the database table are loaded with CSV data.
3911 &quot;A String&quot;,
3912 ],
3913 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3914 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003915 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3916 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3917 # specify a database, and is overridden by any database specification in the
3918 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3919 # must be specified.
3920 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3921 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3922 &quot;encryptionOptions&quot;: {
3923 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3924 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3925 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3926 # write permissions to the bucket and read access to the file.
3927 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3928 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3929 # write permissions to the bucket and read access to the file.
3930 },
3931 },
3932 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
3933 # &lt;code&gt;gs:
3934 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3935 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3936 # // write permissions to the bucket and read access to the file.
3937 &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
3938 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3939 },
3940 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3941 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3942 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003943 }</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.
Bu Sun Kim65020912020-05-20 12:08:20 -07003958 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
3959 # field can not be changed after instance creation. MySQL Second Generation
3960 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
3961 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
3962 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
3963 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
3964 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
3965 &quot;A String&quot;,
3966 ],
3967 &quot;settings&quot;: { # Database instance settings. # The user settings.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003968 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
3969 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
3970 # disabled, binarylog must be disabled as well.
3971 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
3972 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
3973 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
3974 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24
3975 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
3976 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
3977 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
3978 },
3979 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a
3980 # single key value pair.
3981 &quot;a_key&quot;: &quot;A String&quot;,
3982 },
3983 &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
3984 # near as possible to either an App Engine app or Compute Engine zone for
3985 # better performance. App Engine co-location is only applicable to First
3986 # Generation instances.
3987 # preferably be located, either in a specific Compute Engine zone, or
3988 # co-located with an App Engine application. Note that if the preferred
3989 # location is not available, the instance will be located as close as possible
3990 # within the region. Only one location may be specified.
3991 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
3992 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
3993 # etc.).
3994 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The AppEngine application to follow, it must be in the same region as the
3995 # Cloud SQL instance.
3996 },
3997 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
3998 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either
3999 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
4000 # only applicable to First Generation instances.
4001 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is
4002 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
4003 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
4004 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
4005 # off; it is not activated, even if a connection request arrives.
4006 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
4007 # responds to incoming requests, and turns itself off when not in use.
4008 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
4009 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
4010 # 12 hours of inactivity.
Bu Sun Kim65020912020-05-20 12:08:20 -07004011 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
4012 # instance IP and manage which external networks can connect to the instance.
4013 # The IPv4 address cannot be disabled for Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07004014 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance
4015 # using the IP. In &lt;a
4016 # href=&quot;http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation&quot;&gt;CIDR
4017 # notation&lt;/a&gt;, also known as &#x27;slash&#x27; notation (e.g.
4018 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
4019 { # An entry for an Access Control list.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004020 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07004021 &quot;value&quot;: &quot;A String&quot;, # The whitelisted value for the access control list.
4022 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in &lt;a
4023 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4024 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
4025 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07004026 },
4027 ],
4028 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP should be enforced or not.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004029 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is
4030 # accessible for private IP. For example,
4031 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
4032 # be updated, but it cannot be removed after it is set.
4033 &quot;ipv4Enabled&quot;: True or False, # Whether the instance should be assigned an IP address or not.
Bu Sun Kim65020912020-05-20 12:08:20 -07004034 },
4035 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type (PostgreSQL and MySQL instances only). Potential values:
4036 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
4037 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
4038 # The instance can serve data from more than one zone in a region (it is
4039 # highly available). &lt;br&gt;For more information, see &lt;a
4040 # href=&quot;https://cloud.google.com/sql/docs/postgres/high-availability&quot;&gt;Overview
4041 # of the High Availability Configuration&lt;/a&gt;.
4042 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update
4043 # method to make sure concurrent updates are handled properly. During update,
4044 # use the most recent settingsVersion value for this instance and do not try
4045 # to update this value.
4046 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
4047 { # Database flags for Cloud SQL instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07004048 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so
4049 # include both server options and system variables for MySQL. Flags should be
4050 # specified with underscores, not hyphens. For more information, see &lt;a
4051 # href=&quot;/sql/docs/mysql/flags&quot;&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
4052 # SQL documentation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004053 &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
4054 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
4055 # doesn&#x27;t take a value.
Bu Sun Kim65020912020-05-20 12:08:20 -07004056 },
4057 ],
4058 &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
4059 # can be restarted for maintenance purposes. Not used for First Generation
4060 # instances.
4061 # preferably be restarted for system maintenance purposes.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004062 &quot;hour&quot;: 42, # hour of day - 0 to 23.
4063 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
4064 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07004065 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: &lt;code&gt;canary&lt;/code&gt; (Earlier) or
4066 # &lt;code&gt;stable&lt;/code&gt; (Later). &lt;br /&gt;&lt;a
4067 # href=&quot;/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen&quot;&gt;
4068 # Learn more&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07004069 },
4070 &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;
4071 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
4072 # Generation instances.
4073 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is
4074 # true. Not used for First Generation instances.
4075 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased.
4076 # The default value is 0, which specifies that there is no limit. Not used
4077 # for First Generation instances.
4078 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. First Generation
4079 # instances only.
4080 &quot;A String&quot;,
4081 ],
4082 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example
4083 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
4084 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
4085 # this property determines whether the instance is First or Second
4086 # Generation. For more information, see &lt;a
4087 # href=&quot;/sql/docs/db_path/instance-settings&quot;&gt;Instance Settings&lt;/a&gt;.
4088 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
4089 # for First Generation instances.
4090 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
4091 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
4092 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
4093 # replication is enabled or not.
4094 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
4095 # database flags for crash-safe replication are enabled. This property is
4096 # only applicable to First Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07004097 },
4098 &quot;replicaNames&quot;: [ # The replicas of the instance.
4099 &quot;A String&quot;,
4100 ],
4101 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
4102 # Applies only to Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07004103 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004104 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07004105 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004106 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
4107 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
4108 &quot;canDefer&quot;: True or False,
4109 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
4110 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004111 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
Bu Sun Kim65020912020-05-20 12:08:20 -07004112 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
4113 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
4114 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
4115 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
4116 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in &lt;a
4117 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4118 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
4119 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
4120 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
4121 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
4122 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
4123 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
4124 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in &lt;a
4125 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4126 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
4127 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
4128 },
4129 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
4130 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
4131 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as master in the replication setup.
4132 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following.
4133 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
4134 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
4135 # instance running on the
4136 # customer&#x27;s premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
4137 # instance configured as a read-replica.
4138 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This
4139 # value could be different from the zone that was specified when the instance
4140 # was created if the instance has failed over to its secondary zone.
4141 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been
4142 # deprecated. Users should use the
4143 # &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud
4144 # Monitoring API instead. Please see &lt;a
4145 # href=&quot;https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ&quot;&gt;this
4146 # announcement&lt;/a&gt; for details.
4147 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
Bu Sun Kim65020912020-05-20 12:08:20 -07004148 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
4149 # master. Replication configuration information such as the username,
4150 # password, certificates, and keys are not stored in the instance metadata.
4151 # The configuration information is used only to set up the replication
4152 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
4153 # in the data directory.
4154 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
4155 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
4156 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the master&#x27;s Common Name value in the certificate
4157 # that it sends during the SSL handshake.
4158 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
4159 # is encoded in the client&#x27;s certificate.
4160 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
4161 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
4162 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
4163 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the slave
4164 # instance is to be created. The URI is in the form gs:
4165 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
4166 # // Dumps should have the binlog co-ordinates from which replication should
4167 # // begin. This can be accomplished by setting --master-data to 1 when using
4168 # // mysqldump.
4169 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
4170 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
4171 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
4172 },
4173 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to
4174 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
4175 # case the master instance fails, the replica instance will be promoted as
4176 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
4177 # target, and the replica has to be in different zone with the master
4178 # instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004179 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07004180 },
4181 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
4182 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable
4183 # only to Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07004184 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a
4185 # failover replica is created for the instance. The name
4186 # doesn&#x27;t include the project ID. This property is applicable only to
4187 # Second Generation instances.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004188 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates
4189 # that the failover replica is out of sync. The master can only failover to
4190 # the failover replica when the status is true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004191 },
4192 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
4193 { # Database instance IP Mapping.
Bu Sun Kim65020912020-05-20 12:08:20 -07004194 &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
4195 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
4196 # address is a private address that can accept incoming connections. An
4197 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
4198 # originating from the instance, if supported.
4199 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004200 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in &lt;a
4201 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4202 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
4203 # the IP is scheduled to be retired.
Bu Sun Kim65020912020-05-20 12:08:20 -07004204 },
4205 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004206 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. This property is applicable only
4207 # to First Generation instances.
4208 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
4209 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
4210 # Applies only to Second Generation instances.
4211 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
4212 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
4213 },
4214 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
4215 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
4216 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
4217 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
4218 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
4219 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
4220 # or Second Generation). The region can not be changed after instance
4221 # creation.
4222 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the
4223 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
4224 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
4225 # available, for example due to problems with billing.
4226 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
4227 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
4228 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
4229 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
4230 &quot;backendType&quot;: &quot;A String&quot;, # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
4231 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
4232 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
4233 # managed by Google. &lt;br&gt;This property is read-only; use the
4234 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
4235 # the database type and Second or First Generation.
4236 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
4237 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
4238 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
4239 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
4240 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
4241 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
4242 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
4243 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
4244 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
4245 # is encoded in the client&#x27;s certificate.
4246 },
4247 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google
4248 # apps domain is prefixed if applicable.
4249 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property
4250 # is applicable only to Second Generation instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07004251 }
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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004264 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
4265 # identifier to retrieve the Operations resource that has information about
4266 # the operation.
4267 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
4268 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
4269 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
4270 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
4271 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
4272 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
4273 # either by using this property or by using the
4274 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
4275 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
4276 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
4277 # this database must match the one specified in the
4278 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
4279 &quot;A String&quot;,
4280 ],
4281 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
4282 &quot;schemaOnly&quot;: True or False, # Export only schemas.
4283 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
4284 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
4285 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
4286 # a CHANGE MASTER TO statement with the binary log coordinates.
4287 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
4288 # a SQL comment, and has no effect.
4289 # All other values are ignored.
4290 },
4291 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
4292 # you specify tables, specify one and only one database. For PostgreSQL
4293 # instances, you can specify only one table.
4294 &quot;A String&quot;,
4295 ],
4296 },
4297 &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
4298 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
4299 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
4300 # stored. The URI is in the form &lt;code&gt;gs:
4301 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
4302 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
4303 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
4304 # // compressed.
4305 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
4306 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
4307 },
4308 },
4309 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
4310 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
4311 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4312 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
4313 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
4314 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4315 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
4316 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
4317 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4318 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07004319 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
4320 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
4321 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
4322 &quot;targetLink&quot;: &quot;A String&quot;,
4323 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
4324 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
4325 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
4326 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
4327 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
4328 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
4329 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
4330 # populated.
4331 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
4332 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004333 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07004334 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
4335 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -07004336 },
4337 ],
4338 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
4339 },
4340 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
4341 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004342 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07004343 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
4344 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
4345 # of the database table are loaded with CSV data.
4346 &quot;A String&quot;,
4347 ],
4348 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
4349 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004350 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
4351 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
4352 # specify a database, and is overridden by any database specification in the
4353 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
4354 # must be specified.
4355 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
4356 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
4357 &quot;encryptionOptions&quot;: {
4358 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
4359 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
4360 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
4361 # write permissions to the bucket and read access to the file.
4362 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
4363 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
4364 # write permissions to the bucket and read access to the file.
4365 },
4366 },
4367 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
4368 # &lt;code&gt;gs:
4369 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
4370 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
4371 # // write permissions to the bucket and read access to the file.
4372 &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
4373 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
4374 },
4375 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
4376 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
4377 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07004378 }</pre>
4379</div>
4380
4381</body></html>