• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<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="sqladmin_v1beta4.html">Cloud SQL Administration API</a> . <a href="sqladmin_v1beta4.instances.html">instances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#clone">clone(project, instance, body)</a></code></p>
79<p class="firstline">Creates a Cloud SQL instance as a clone of the source instance. The API is not ready for Second Generation instances yet.</p>
80<p class="toc_element">
81  <code><a href="#delete">delete(project, instance)</a></code></p>
82<p class="firstline">Deletes a Cloud SQL instance.</p>
83<p class="toc_element">
84  <code><a href="#export">export(project, instance, body)</a></code></p>
85<p class="firstline">Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file.</p>
86<p class="toc_element">
87  <code><a href="#failover">failover(project, instance, body)</a></code></p>
88<p class="firstline">Failover the instance to its failover replica instance.</p>
89<p class="toc_element">
90  <code><a href="#get">get(project, instance)</a></code></p>
91<p class="firstline">Retrieves a resource containing information about a Cloud SQL instance.</p>
92<p class="toc_element">
93  <code><a href="#import_">import_(project, instance, body)</a></code></p>
94<p class="firstline">Imports data into a Cloud SQL instance from a MySQL dump file in Google Cloud Storage.</p>
95<p class="toc_element">
96  <code><a href="#insert">insert(project, body)</a></code></p>
97<p class="firstline">Creates a new Cloud SQL instance.</p>
98<p class="toc_element">
99  <code><a href="#list">list(project, maxResults=None, pageToken=None, filter=None)</a></code></p>
100<p class="firstline">Lists instances under a given project in the alphabetical order of the instance name.</p>
101<p class="toc_element">
102  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
103<p class="firstline">Retrieves the next page of results.</p>
104<p class="toc_element">
105  <code><a href="#patch">patch(project, instance, body)</a></code></p>
106<p class="firstline">Updates settings of a Cloud SQL instance. Caution: This is not a partial update, so you must include values for all the settings that you want to retain. For partial updates, use patch.. This method supports patch semantics.</p>
107<p class="toc_element">
108  <code><a href="#promoteReplica">promoteReplica(project, instance)</a></code></p>
109<p class="firstline">Promotes the read replica instance to be a stand-alone Cloud SQL instance.</p>
110<p class="toc_element">
111  <code><a href="#resetSslConfig">resetSslConfig(project, instance)</a></code></p>
112<p class="firstline">Deletes all client certificates and generates a new server SSL certificate for the instance. The changes will not take effect until the instance is restarted. Existing instances without a server certificate will need to call this once to set a server certificate.</p>
113<p class="toc_element">
114  <code><a href="#restart">restart(project, instance)</a></code></p>
115<p class="firstline">Restarts a Cloud SQL instance.</p>
116<p class="toc_element">
117  <code><a href="#restoreBackup">restoreBackup(project, instance, body)</a></code></p>
118<p class="firstline">Restores a backup of a Cloud SQL instance.</p>
119<p class="toc_element">
120  <code><a href="#startReplica">startReplica(project, instance)</a></code></p>
121<p class="firstline">Starts the replication in the read replica instance.</p>
122<p class="toc_element">
123  <code><a href="#stopReplica">stopReplica(project, instance)</a></code></p>
124<p class="firstline">Stops the replication in the read replica instance.</p>
125<p class="toc_element">
126  <code><a href="#truncateLog">truncateLog(project, instance, body)</a></code></p>
127<p class="firstline">Truncate MySQL general and slow query log tables</p>
128<p class="toc_element">
129  <code><a href="#update">update(project, instance, body)</a></code></p>
130<p class="firstline">Updates settings of a Cloud SQL instance. Caution: This is not a partial update, so you must include values for all the settings that you want to retain. For partial updates, use patch.</p>
131<h3>Method Details</h3>
132<div class="method">
133    <code class="details" id="clone">clone(project, instance, body)</code>
134  <pre>Creates a Cloud SQL instance as a clone of the source instance. The API is not ready for Second Generation instances yet.
135
136Args:
137  project: string, Project ID of the source as well as the clone Cloud SQL instance. (required)
138  instance: string, The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID. (required)
139  body: object, The request body. (required)
140    The object takes the form of:
141
142{ # Database instance clone request.
143    "cloneContext": { # Database instance clone context. # Contains details about the clone operation.
144      "binLogCoordinates": { # Binary log coordinates. # Binary log coordinates, if specified, indentify the the position up to which the source instance should be cloned. If not specified, the source instance is cloned up to the most recent binary log coordintes.
145        "binLogPosition": "A String", # Position (offset) within the binary log file.
146        "kind": "sql#binLogCoordinates", # This is always sql#binLogCoordinates.
147        "binLogFileName": "A String", # Name of the binary log file for a Cloud SQL instance.
148      },
149      "kind": "sql#cloneContext", # This is always sql#cloneContext.
150      "destinationInstanceName": "A String", # Name of the Cloud SQL instance to be created as a clone.
151    },
152  }
153
154
155Returns:
156  An object of the form:
157
158    { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
159    "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
160    "importContext": { # Database instance import context. # The context for import operation, if applicable.
161      "kind": "sql#importContext", # This is always sql#importContext.
162      "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
163      "fileType": "A String", # The file type for the specified uri.
164          # SQL: The file contains SQL statements.
165          # CSV: The file contains CSV data.
166      "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
167      "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances.
168      "csvImportOptions": { # Options for importing data as CSV.
169        "table": "A String", # The table to which CSV data is imported.
170        "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
171          "A String",
172        ],
173      },
174    },
175    "kind": "sql#operation", # This is always sql#operation.
176    "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
177    "exportContext": { # Database instance export context. # The context for export operation, if applicable.
178      "kind": "sql#exportContext", # This is always sql#exportContext.
179      "fileType": "A String", # The file type for the specified uri.
180          # SQL: The file contains SQL statements.
181          # CSV: The file contains CSV data.
182      "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
183      "csvExportOptions": { # Options for exporting data as CSV.
184        "selectQuery": "A String", # The select query used to extract the data.
185      },
186      "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
187        "A String",
188      ],
189      "sqlExportOptions": { # Options for exporting data as SQL statements.
190        "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
191          "A String",
192        ],
193        "schemaOnly": True or False, # Export only schemas.
194      },
195    },
196    "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
197    "targetProject": "A String", # The project ID of the target instance related to this operation.
198    "targetId": "A String", # Name of the database instance related to this operation.
199    "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
200    "targetLink": "A String",
201    "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
202    "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
203      "kind": "sql#operationErrors", # This is always sql#operationErrors.
204      "errors": [ # The list of errors encountered while processing this operation.
205        { # Database instance operation error.
206          "kind": "sql#operationError", # This is always sql#operationError.
207          "code": "A String", # Identifies the specific error that occurred.
208          "message": "A String", # Additional information about the error encountered.
209        },
210      ],
211    },
212    "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
213    "selfLink": "A String", # The URI of this resource.
214    "user": "A String", # The email address of the user who initiated this operation.
215  }</pre>
216</div>
217
218<div class="method">
219    <code class="details" id="delete">delete(project, instance)</code>
220  <pre>Deletes a Cloud SQL instance.
221
222Args:
223  project: string, Project ID of the project that contains the instance to be deleted. (required)
224  instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
225
226Returns:
227  An object of the form:
228
229    { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
230    "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
231    "importContext": { # Database instance import context. # The context for import operation, if applicable.
232      "kind": "sql#importContext", # This is always sql#importContext.
233      "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
234      "fileType": "A String", # The file type for the specified uri.
235          # SQL: The file contains SQL statements.
236          # CSV: The file contains CSV data.
237      "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
238      "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances.
239      "csvImportOptions": { # Options for importing data as CSV.
240        "table": "A String", # The table to which CSV data is imported.
241        "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
242          "A String",
243        ],
244      },
245    },
246    "kind": "sql#operation", # This is always sql#operation.
247    "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
248    "exportContext": { # Database instance export context. # The context for export operation, if applicable.
249      "kind": "sql#exportContext", # This is always sql#exportContext.
250      "fileType": "A String", # The file type for the specified uri.
251          # SQL: The file contains SQL statements.
252          # CSV: The file contains CSV data.
253      "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
254      "csvExportOptions": { # Options for exporting data as CSV.
255        "selectQuery": "A String", # The select query used to extract the data.
256      },
257      "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
258        "A String",
259      ],
260      "sqlExportOptions": { # Options for exporting data as SQL statements.
261        "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
262          "A String",
263        ],
264        "schemaOnly": True or False, # Export only schemas.
265      },
266    },
267    "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
268    "targetProject": "A String", # The project ID of the target instance related to this operation.
269    "targetId": "A String", # Name of the database instance related to this operation.
270    "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
271    "targetLink": "A String",
272    "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
273    "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
274      "kind": "sql#operationErrors", # This is always sql#operationErrors.
275      "errors": [ # The list of errors encountered while processing this operation.
276        { # Database instance operation error.
277          "kind": "sql#operationError", # This is always sql#operationError.
278          "code": "A String", # Identifies the specific error that occurred.
279          "message": "A String", # Additional information about the error encountered.
280        },
281      ],
282    },
283    "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
284    "selfLink": "A String", # The URI of this resource.
285    "user": "A String", # The email address of the user who initiated this operation.
286  }</pre>
287</div>
288
289<div class="method">
290    <code class="details" id="export">export(project, instance, body)</code>
291  <pre>Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file.
292
293Args:
294  project: string, Project ID of the project that contains the instance to be exported. (required)
295  instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
296  body: object, The request body. (required)
297    The object takes the form of:
298
299{ # Database instance export request.
300    "exportContext": { # Database instance export context. # Contains details about the export operation.
301      "kind": "sql#exportContext", # This is always sql#exportContext.
302      "fileType": "A String", # The file type for the specified uri.
303          # SQL: The file contains SQL statements.
304          # CSV: The file contains CSV data.
305      "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
306      "csvExportOptions": { # Options for exporting data as CSV.
307        "selectQuery": "A String", # The select query used to extract the data.
308      },
309      "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
310        "A String",
311      ],
312      "sqlExportOptions": { # Options for exporting data as SQL statements.
313        "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
314          "A String",
315        ],
316        "schemaOnly": True or False, # Export only schemas.
317      },
318    },
319  }
320
321
322Returns:
323  An object of the form:
324
325    { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
326    "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
327    "importContext": { # Database instance import context. # The context for import operation, if applicable.
328      "kind": "sql#importContext", # This is always sql#importContext.
329      "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
330      "fileType": "A String", # The file type for the specified uri.
331          # SQL: The file contains SQL statements.
332          # CSV: The file contains CSV data.
333      "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
334      "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances.
335      "csvImportOptions": { # Options for importing data as CSV.
336        "table": "A String", # The table to which CSV data is imported.
337        "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
338          "A String",
339        ],
340      },
341    },
342    "kind": "sql#operation", # This is always sql#operation.
343    "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
344    "exportContext": { # Database instance export context. # The context for export operation, if applicable.
345      "kind": "sql#exportContext", # This is always sql#exportContext.
346      "fileType": "A String", # The file type for the specified uri.
347          # SQL: The file contains SQL statements.
348          # CSV: The file contains CSV data.
349      "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
350      "csvExportOptions": { # Options for exporting data as CSV.
351        "selectQuery": "A String", # The select query used to extract the data.
352      },
353      "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
354        "A String",
355      ],
356      "sqlExportOptions": { # Options for exporting data as SQL statements.
357        "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
358          "A String",
359        ],
360        "schemaOnly": True or False, # Export only schemas.
361      },
362    },
363    "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
364    "targetProject": "A String", # The project ID of the target instance related to this operation.
365    "targetId": "A String", # Name of the database instance related to this operation.
366    "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
367    "targetLink": "A String",
368    "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
369    "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
370      "kind": "sql#operationErrors", # This is always sql#operationErrors.
371      "errors": [ # The list of errors encountered while processing this operation.
372        { # Database instance operation error.
373          "kind": "sql#operationError", # This is always sql#operationError.
374          "code": "A String", # Identifies the specific error that occurred.
375          "message": "A String", # Additional information about the error encountered.
376        },
377      ],
378    },
379    "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
380    "selfLink": "A String", # The URI of this resource.
381    "user": "A String", # The email address of the user who initiated this operation.
382  }</pre>
383</div>
384
385<div class="method">
386    <code class="details" id="failover">failover(project, instance, body)</code>
387  <pre>Failover the instance to its failover replica instance.
388
389Args:
390  project: string, ID of the project that contains the read replica. (required)
391  instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
392  body: object, The request body. (required)
393    The object takes the form of:
394
395{ # Instance failover request.
396    "failoverContext": { # Database instance failover context. # Failover Context.
397      "kind": "sql#failoverContext", # This is always sql#failoverContext.
398      "settingsVersion": "A String", # The current settings version of this instance. Request will be rejected if this version doesn't match the current settings version.
399    },
400  }
401
402
403Returns:
404  An object of the form:
405
406    { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
407    "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
408    "importContext": { # Database instance import context. # The context for import operation, if applicable.
409      "kind": "sql#importContext", # This is always sql#importContext.
410      "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
411      "fileType": "A String", # The file type for the specified uri.
412          # SQL: The file contains SQL statements.
413          # CSV: The file contains CSV data.
414      "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
415      "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances.
416      "csvImportOptions": { # Options for importing data as CSV.
417        "table": "A String", # The table to which CSV data is imported.
418        "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
419          "A String",
420        ],
421      },
422    },
423    "kind": "sql#operation", # This is always sql#operation.
424    "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
425    "exportContext": { # Database instance export context. # The context for export operation, if applicable.
426      "kind": "sql#exportContext", # This is always sql#exportContext.
427      "fileType": "A String", # The file type for the specified uri.
428          # SQL: The file contains SQL statements.
429          # CSV: The file contains CSV data.
430      "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
431      "csvExportOptions": { # Options for exporting data as CSV.
432        "selectQuery": "A String", # The select query used to extract the data.
433      },
434      "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
435        "A String",
436      ],
437      "sqlExportOptions": { # Options for exporting data as SQL statements.
438        "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
439          "A String",
440        ],
441        "schemaOnly": True or False, # Export only schemas.
442      },
443    },
444    "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
445    "targetProject": "A String", # The project ID of the target instance related to this operation.
446    "targetId": "A String", # Name of the database instance related to this operation.
447    "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
448    "targetLink": "A String",
449    "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
450    "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
451      "kind": "sql#operationErrors", # This is always sql#operationErrors.
452      "errors": [ # The list of errors encountered while processing this operation.
453        { # Database instance operation error.
454          "kind": "sql#operationError", # This is always sql#operationError.
455          "code": "A String", # Identifies the specific error that occurred.
456          "message": "A String", # Additional information about the error encountered.
457        },
458      ],
459    },
460    "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
461    "selfLink": "A String", # The URI of this resource.
462    "user": "A String", # The email address of the user who initiated this operation.
463  }</pre>
464</div>
465
466<div class="method">
467    <code class="details" id="get">get(project, instance)</code>
468  <pre>Retrieves a resource containing information about a Cloud SQL instance.
469
470Args:
471  project: string, Project ID of the project that contains the instance. (required)
472  instance: string, Database instance ID. This does not include the project ID. (required)
473
474Returns:
475  An object of the form:
476
477    { # A Cloud SQL instance resource.
478      "backendType": "A String", # FIRST_GEN: Basic Cloud SQL instance that runs in a Google-managed container.
479          # SECOND_GEN: A newer Cloud SQL backend that runs in a Compute Engine VM.
480          # EXTERNAL: A MySQL server that is not managed by Google.
481      "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Users should use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ for details.
482      "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
483      "ipAddresses": [ # The assigned IP addresses for the instance.
484        { # Database instance IP Mapping.
485          "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired.
486          "ipAddress": "A String", # The IP address assigned.
487          "type": "A String", # The type of this IP address. A PRIMARY address is an address that can accept incoming connections. An OUTGOING address is the source address of connections originating from the instance, if supported.
488        },
489      ],
490      "databaseVersion": "A String", # The database engine type and version. The databaseVersion can not be changed after instance creation. Can be MYSQL_5_5, MYSQL_5_6 or MYSQL_5_7. Defaults to MYSQL_5_6. MYSQL_5_7 is applicable only to Second Generation instances.
491      "instanceType": "A String", # The instance type. This can be one of the following.
492          # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
493          # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
494          # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
495      "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
496      "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension.
497        "A String",
498      ],
499      "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
500      "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
501          # RUNNABLE: The instance is running, or is ready to run when accessed.
502          # SUSPENDED: The instance is not available, for example due to problems with billing.
503          # PENDING_CREATE: The instance is being created.
504          # MAINTENANCE: The instance is down for maintenance.
505          # FAILED: The instance creation failed.
506          # UNKNOWN_STATE: The state of the instance is unknown.
507      "etag": "A String", # HTTP 1.1 Entity tag for the resource.
508      "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
509        "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The master can only failover to the falover replica when the status is true.
510        "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances.
511      },
512      "replicaNames": [ # The replicas of the instance.
513        "A String",
514      ],
515      "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
516        "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
517        "hostPort": "A String", # The host and port of the on-premises instance in host:port format
518      },
519      "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
520      "kind": "sql#instance", # This is always sql#instance.
521      "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
522      "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only to First Generation instances.
523      "serverCaCert": { # SslCerts Resource # SSL configuration.
524        "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
525        "kind": "sql#sslCert", # This is always sql#sslCert.
526        "sha1Fingerprint": "A String", # Sha1 Fingerprint.
527        "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
528        "instance": "A String", # Name of the database instance.
529        "cert": "A String", # PEM representation.
530        "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
531        "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
532        "selfLink": "A String", # The URI of this resource.
533      },
534      "region": "A String", # The geographical region. Can be us-central (FIRST_GEN instances only), us-central1 (SECOND_GEN instances only), asia-east1 or europe-west1. Defaults to us-central or us-central1 depending on the instance type (First Generation or Second Generation). The region can not be changed after instance creation.
535      "settings": { # Database instance settings. # The user settings.
536        "databaseFlags": [ # The database flags passed to the instance at startup.
537          { # MySQL flags for Cloud SQL instances.
538            "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both MySQL server options and MySQL system variables. Flags should be specified with underscores, not hyphens. For more information, see Configuring MySQL Flags in the Google Cloud SQL documentation, as well as the official MySQL documentation for server options and system variables.
539            "value": "A String", # The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value.
540          },
541        ],
542        "kind": "sql#settings", # This is always sql#settings.
543        "dataDiskType": "A String", # The type of data disk. Only supported for Second Generation instances. The default type is PD_SSD. Applies only to Second Generation instances.
544        "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should preferably be restarted for system maintenance puruposes. # The maintenance window for this instance. This specifies when the instance may be restarted for maintenance purposes. Applies only to Second Generation instances.
545          "kind": "sql#maintenanceWindow", # This is always sql#maintenanceWindow.
546          "updateTrack": "A String",
547          "day": 42, # day of week (1-7), starting on Monday.
548          "hour": 42, # hour of day - 0 to 23.
549        },
550        "availabilityType": "A String", # Reserved for future use.
551        "labels": { # User-provided labels, represented as a dictionary where each label is a single key value pair.
552          "a_key": "A String", # An individual label entry, composed of a key and a value.
553        },
554        "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. This property is only applicable to First Generation instances.
555          "A String",
556        ],
557        "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. The activation policy cannot be updated together with other settings for Second Generation instances. Valid values:
558            # ALWAYS: The instance is on; it is not deactivated by inactivity.
559            # NEVER: The instance is off; it is not activated, even if a connection request arrives.
560            # ON_DEMAND: The instance responds to incoming requests, and turns itself off when not in use. Instances with PER_USE pricing turn off after 15 minutes of inactivity. Instances with PER_PACKAGE pricing turn off after 12 hours of inactivity.
561        "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
562          "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
563          "enabled": True or False, # Whether this configuration is enabled.
564          "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
565          "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
566        },
567        "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
568          "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
569          "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
570          "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).
571            { # An entry for an Access Control list.
572              "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
573              "kind": "sql#aclEntry", # This is always sql#aclEntry.
574              "value": "A String", # The whitelisted value for the access control list.
575              "name": "A String", # An optional label to identify this entry.
576            },
577          ],
578        },
579        "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
580        "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
581        "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS. This property is only applicable to First Generation instances.
582        "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. Applies only to Second Generation instances.
583        "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property is only applicable to First Generation instances.
584        "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE. Only PER_USE is supported for Second Generation instances.
585        "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
586        "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is true. Applies only to Second Generation instances.
587        "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or GCE zone for better performance. App Engine co-location is only applicable to First Generation instances.
588          "kind": "sql#locationPreference", # This is always sql#locationPreference.
589          "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
590          "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
591        },
592        "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Applies only to Second Generation instances.
593      },
594      "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
595      "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
596        "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
597        "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. In case the master instance fails, the replica instance will be promoted as the new master instance.
598            # Only one replica can be specified as failover target, and the replica has to be in different zone with the master instance.
599        "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises master. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named master.info in the data directory.
600          "username": "A String", # The username for the replication connection.
601          "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
602          "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
603          "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
604          "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
605          "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
606          "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
607          "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate that it sends during the SSL handshake.
608          "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps should have the binlog co-ordinates from which replication should begin. This can be accomplished by setting --master-data to 1 when using mysqldump.
609          "password": "A String", # The password for the replication connection.
610          "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
611        },
612      },
613      "selfLink": "A String", # The URI of this resource.
614    }</pre>
615</div>
616
617<div class="method">
618    <code class="details" id="import_">import_(project, instance, body)</code>
619  <pre>Imports data into a Cloud SQL instance from a MySQL dump file in Google Cloud Storage.
620
621Args:
622  project: string, Project ID of the project that contains the instance. (required)
623  instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
624  body: object, The request body. (required)
625    The object takes the form of:
626
627{ # Database instance import request.
628    "importContext": { # Database instance import context. # Contains details about the import operation.
629      "kind": "sql#importContext", # This is always sql#importContext.
630      "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
631      "fileType": "A String", # The file type for the specified uri.
632          # SQL: The file contains SQL statements.
633          # CSV: The file contains CSV data.
634      "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
635      "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances.
636      "csvImportOptions": { # Options for importing data as CSV.
637        "table": "A String", # The table to which CSV data is imported.
638        "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
639          "A String",
640        ],
641      },
642    },
643  }
644
645
646Returns:
647  An object of the form:
648
649    { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
650    "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
651    "importContext": { # Database instance import context. # The context for import operation, if applicable.
652      "kind": "sql#importContext", # This is always sql#importContext.
653      "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
654      "fileType": "A String", # The file type for the specified uri.
655          # SQL: The file contains SQL statements.
656          # CSV: The file contains CSV data.
657      "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
658      "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances.
659      "csvImportOptions": { # Options for importing data as CSV.
660        "table": "A String", # The table to which CSV data is imported.
661        "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
662          "A String",
663        ],
664      },
665    },
666    "kind": "sql#operation", # This is always sql#operation.
667    "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
668    "exportContext": { # Database instance export context. # The context for export operation, if applicable.
669      "kind": "sql#exportContext", # This is always sql#exportContext.
670      "fileType": "A String", # The file type for the specified uri.
671          # SQL: The file contains SQL statements.
672          # CSV: The file contains CSV data.
673      "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
674      "csvExportOptions": { # Options for exporting data as CSV.
675        "selectQuery": "A String", # The select query used to extract the data.
676      },
677      "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
678        "A String",
679      ],
680      "sqlExportOptions": { # Options for exporting data as SQL statements.
681        "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
682          "A String",
683        ],
684        "schemaOnly": True or False, # Export only schemas.
685      },
686    },
687    "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
688    "targetProject": "A String", # The project ID of the target instance related to this operation.
689    "targetId": "A String", # Name of the database instance related to this operation.
690    "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
691    "targetLink": "A String",
692    "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
693    "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
694      "kind": "sql#operationErrors", # This is always sql#operationErrors.
695      "errors": [ # The list of errors encountered while processing this operation.
696        { # Database instance operation error.
697          "kind": "sql#operationError", # This is always sql#operationError.
698          "code": "A String", # Identifies the specific error that occurred.
699          "message": "A String", # Additional information about the error encountered.
700        },
701      ],
702    },
703    "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
704    "selfLink": "A String", # The URI of this resource.
705    "user": "A String", # The email address of the user who initiated this operation.
706  }</pre>
707</div>
708
709<div class="method">
710    <code class="details" id="insert">insert(project, body)</code>
711  <pre>Creates a new Cloud SQL instance.
712
713Args:
714  project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required)
715  body: object, The request body. (required)
716    The object takes the form of:
717
718{ # A Cloud SQL instance resource.
719    "backendType": "A String", # FIRST_GEN: Basic Cloud SQL instance that runs in a Google-managed container.
720        # SECOND_GEN: A newer Cloud SQL backend that runs in a Compute Engine VM.
721        # EXTERNAL: A MySQL server that is not managed by Google.
722    "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Users should use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ for details.
723    "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
724    "ipAddresses": [ # The assigned IP addresses for the instance.
725      { # Database instance IP Mapping.
726        "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired.
727        "ipAddress": "A String", # The IP address assigned.
728        "type": "A String", # The type of this IP address. A PRIMARY address is an address that can accept incoming connections. An OUTGOING address is the source address of connections originating from the instance, if supported.
729      },
730    ],
731    "databaseVersion": "A String", # The database engine type and version. The databaseVersion can not be changed after instance creation. Can be MYSQL_5_5, MYSQL_5_6 or MYSQL_5_7. Defaults to MYSQL_5_6. MYSQL_5_7 is applicable only to Second Generation instances.
732    "instanceType": "A String", # The instance type. This can be one of the following.
733        # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
734        # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
735        # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
736    "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
737    "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension.
738      "A String",
739    ],
740    "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
741    "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
742        # RUNNABLE: The instance is running, or is ready to run when accessed.
743        # SUSPENDED: The instance is not available, for example due to problems with billing.
744        # PENDING_CREATE: The instance is being created.
745        # MAINTENANCE: The instance is down for maintenance.
746        # FAILED: The instance creation failed.
747        # UNKNOWN_STATE: The state of the instance is unknown.
748    "etag": "A String", # HTTP 1.1 Entity tag for the resource.
749    "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
750      "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The master can only failover to the falover replica when the status is true.
751      "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances.
752    },
753    "replicaNames": [ # The replicas of the instance.
754      "A String",
755    ],
756    "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
757      "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
758      "hostPort": "A String", # The host and port of the on-premises instance in host:port format
759    },
760    "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
761    "kind": "sql#instance", # This is always sql#instance.
762    "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
763    "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only to First Generation instances.
764    "serverCaCert": { # SslCerts Resource # SSL configuration.
765      "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
766      "kind": "sql#sslCert", # This is always sql#sslCert.
767      "sha1Fingerprint": "A String", # Sha1 Fingerprint.
768      "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
769      "instance": "A String", # Name of the database instance.
770      "cert": "A String", # PEM representation.
771      "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
772      "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
773      "selfLink": "A String", # The URI of this resource.
774    },
775    "region": "A String", # The geographical region. Can be us-central (FIRST_GEN instances only), us-central1 (SECOND_GEN instances only), asia-east1 or europe-west1. Defaults to us-central or us-central1 depending on the instance type (First Generation or Second Generation). The region can not be changed after instance creation.
776    "settings": { # Database instance settings. # The user settings.
777      "databaseFlags": [ # The database flags passed to the instance at startup.
778        { # MySQL flags for Cloud SQL instances.
779          "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both MySQL server options and MySQL system variables. Flags should be specified with underscores, not hyphens. For more information, see Configuring MySQL Flags in the Google Cloud SQL documentation, as well as the official MySQL documentation for server options and system variables.
780          "value": "A String", # The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value.
781        },
782      ],
783      "kind": "sql#settings", # This is always sql#settings.
784      "dataDiskType": "A String", # The type of data disk. Only supported for Second Generation instances. The default type is PD_SSD. Applies only to Second Generation instances.
785      "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should preferably be restarted for system maintenance puruposes. # The maintenance window for this instance. This specifies when the instance may be restarted for maintenance purposes. Applies only to Second Generation instances.
786        "kind": "sql#maintenanceWindow", # This is always sql#maintenanceWindow.
787        "updateTrack": "A String",
788        "day": 42, # day of week (1-7), starting on Monday.
789        "hour": 42, # hour of day - 0 to 23.
790      },
791      "availabilityType": "A String", # Reserved for future use.
792      "labels": { # User-provided labels, represented as a dictionary where each label is a single key value pair.
793        "a_key": "A String", # An individual label entry, composed of a key and a value.
794      },
795      "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. This property is only applicable to First Generation instances.
796        "A String",
797      ],
798      "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. The activation policy cannot be updated together with other settings for Second Generation instances. Valid values:
799          # ALWAYS: The instance is on; it is not deactivated by inactivity.
800          # NEVER: The instance is off; it is not activated, even if a connection request arrives.
801          # ON_DEMAND: The instance responds to incoming requests, and turns itself off when not in use. Instances with PER_USE pricing turn off after 15 minutes of inactivity. Instances with PER_PACKAGE pricing turn off after 12 hours of inactivity.
802      "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
803        "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
804        "enabled": True or False, # Whether this configuration is enabled.
805        "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
806        "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
807      },
808      "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
809        "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
810        "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
811        "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).
812          { # An entry for an Access Control list.
813            "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
814            "kind": "sql#aclEntry", # This is always sql#aclEntry.
815            "value": "A String", # The whitelisted value for the access control list.
816            "name": "A String", # An optional label to identify this entry.
817          },
818        ],
819      },
820      "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
821      "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
822      "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS. This property is only applicable to First Generation instances.
823      "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. Applies only to Second Generation instances.
824      "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property is only applicable to First Generation instances.
825      "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE. Only PER_USE is supported for Second Generation instances.
826      "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
827      "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is true. Applies only to Second Generation instances.
828      "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or GCE zone for better performance. App Engine co-location is only applicable to First Generation instances.
829        "kind": "sql#locationPreference", # This is always sql#locationPreference.
830        "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
831        "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
832      },
833      "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Applies only to Second Generation instances.
834    },
835    "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
836    "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
837      "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
838      "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. In case the master instance fails, the replica instance will be promoted as the new master instance.
839          # Only one replica can be specified as failover target, and the replica has to be in different zone with the master instance.
840      "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises master. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named master.info in the data directory.
841        "username": "A String", # The username for the replication connection.
842        "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
843        "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
844        "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
845        "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
846        "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
847        "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
848        "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate that it sends during the SSL handshake.
849        "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps should have the binlog co-ordinates from which replication should begin. This can be accomplished by setting --master-data to 1 when using mysqldump.
850        "password": "A String", # The password for the replication connection.
851        "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
852      },
853    },
854    "selfLink": "A String", # The URI of this resource.
855  }
856
857
858Returns:
859  An object of the form:
860
861    { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
862    "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
863    "importContext": { # Database instance import context. # The context for import operation, if applicable.
864      "kind": "sql#importContext", # This is always sql#importContext.
865      "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
866      "fileType": "A String", # The file type for the specified uri.
867          # SQL: The file contains SQL statements.
868          # CSV: The file contains CSV data.
869      "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
870      "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances.
871      "csvImportOptions": { # Options for importing data as CSV.
872        "table": "A String", # The table to which CSV data is imported.
873        "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
874          "A String",
875        ],
876      },
877    },
878    "kind": "sql#operation", # This is always sql#operation.
879    "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
880    "exportContext": { # Database instance export context. # The context for export operation, if applicable.
881      "kind": "sql#exportContext", # This is always sql#exportContext.
882      "fileType": "A String", # The file type for the specified uri.
883          # SQL: The file contains SQL statements.
884          # CSV: The file contains CSV data.
885      "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
886      "csvExportOptions": { # Options for exporting data as CSV.
887        "selectQuery": "A String", # The select query used to extract the data.
888      },
889      "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
890        "A String",
891      ],
892      "sqlExportOptions": { # Options for exporting data as SQL statements.
893        "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
894          "A String",
895        ],
896        "schemaOnly": True or False, # Export only schemas.
897      },
898    },
899    "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
900    "targetProject": "A String", # The project ID of the target instance related to this operation.
901    "targetId": "A String", # Name of the database instance related to this operation.
902    "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
903    "targetLink": "A String",
904    "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
905    "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
906      "kind": "sql#operationErrors", # This is always sql#operationErrors.
907      "errors": [ # The list of errors encountered while processing this operation.
908        { # Database instance operation error.
909          "kind": "sql#operationError", # This is always sql#operationError.
910          "code": "A String", # Identifies the specific error that occurred.
911          "message": "A String", # Additional information about the error encountered.
912        },
913      ],
914    },
915    "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
916    "selfLink": "A String", # The URI of this resource.
917    "user": "A String", # The email address of the user who initiated this operation.
918  }</pre>
919</div>
920
921<div class="method">
922    <code class="details" id="list">list(project, maxResults=None, pageToken=None, filter=None)</code>
923  <pre>Lists instances under a given project in the alphabetical order of the instance name.
924
925Args:
926  project: string, Project ID of the project for which to list Cloud SQL instances. (required)
927  maxResults: integer, The maximum number of results to return per response.
928  pageToken: string, A previously-returned page token representing part of the larger set of results to view.
929  filter: string, An expression for filtering the results of the request, such as by name or label.
930
931Returns:
932  An object of the form:
933
934    { # Database instances list response.
935    "nextPageToken": "A String", # The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
936    "items": [ # List of database instance resources.
937      { # A Cloud SQL instance resource.
938          "backendType": "A String", # FIRST_GEN: Basic Cloud SQL instance that runs in a Google-managed container.
939              # SECOND_GEN: A newer Cloud SQL backend that runs in a Compute Engine VM.
940              # EXTERNAL: A MySQL server that is not managed by Google.
941          "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Users should use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ for details.
942          "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
943          "ipAddresses": [ # The assigned IP addresses for the instance.
944            { # Database instance IP Mapping.
945              "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired.
946              "ipAddress": "A String", # The IP address assigned.
947              "type": "A String", # The type of this IP address. A PRIMARY address is an address that can accept incoming connections. An OUTGOING address is the source address of connections originating from the instance, if supported.
948            },
949          ],
950          "databaseVersion": "A String", # The database engine type and version. The databaseVersion can not be changed after instance creation. Can be MYSQL_5_5, MYSQL_5_6 or MYSQL_5_7. Defaults to MYSQL_5_6. MYSQL_5_7 is applicable only to Second Generation instances.
951          "instanceType": "A String", # The instance type. This can be one of the following.
952              # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
953              # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
954              # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
955          "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
956          "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension.
957            "A String",
958          ],
959          "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
960          "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
961              # RUNNABLE: The instance is running, or is ready to run when accessed.
962              # SUSPENDED: The instance is not available, for example due to problems with billing.
963              # PENDING_CREATE: The instance is being created.
964              # MAINTENANCE: The instance is down for maintenance.
965              # FAILED: The instance creation failed.
966              # UNKNOWN_STATE: The state of the instance is unknown.
967          "etag": "A String", # HTTP 1.1 Entity tag for the resource.
968          "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
969            "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The master can only failover to the falover replica when the status is true.
970            "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances.
971          },
972          "replicaNames": [ # The replicas of the instance.
973            "A String",
974          ],
975          "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
976            "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
977            "hostPort": "A String", # The host and port of the on-premises instance in host:port format
978          },
979          "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
980          "kind": "sql#instance", # This is always sql#instance.
981          "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
982          "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only to First Generation instances.
983          "serverCaCert": { # SslCerts Resource # SSL configuration.
984            "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
985            "kind": "sql#sslCert", # This is always sql#sslCert.
986            "sha1Fingerprint": "A String", # Sha1 Fingerprint.
987            "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
988            "instance": "A String", # Name of the database instance.
989            "cert": "A String", # PEM representation.
990            "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
991            "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
992            "selfLink": "A String", # The URI of this resource.
993          },
994          "region": "A String", # The geographical region. Can be us-central (FIRST_GEN instances only), us-central1 (SECOND_GEN instances only), asia-east1 or europe-west1. Defaults to us-central or us-central1 depending on the instance type (First Generation or Second Generation). The region can not be changed after instance creation.
995          "settings": { # Database instance settings. # The user settings.
996            "databaseFlags": [ # The database flags passed to the instance at startup.
997              { # MySQL flags for Cloud SQL instances.
998                "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both MySQL server options and MySQL system variables. Flags should be specified with underscores, not hyphens. For more information, see Configuring MySQL Flags in the Google Cloud SQL documentation, as well as the official MySQL documentation for server options and system variables.
999                "value": "A String", # The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value.
1000              },
1001            ],
1002            "kind": "sql#settings", # This is always sql#settings.
1003            "dataDiskType": "A String", # The type of data disk. Only supported for Second Generation instances. The default type is PD_SSD. Applies only to Second Generation instances.
1004            "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should preferably be restarted for system maintenance puruposes. # The maintenance window for this instance. This specifies when the instance may be restarted for maintenance purposes. Applies only to Second Generation instances.
1005              "kind": "sql#maintenanceWindow", # This is always sql#maintenanceWindow.
1006              "updateTrack": "A String",
1007              "day": 42, # day of week (1-7), starting on Monday.
1008              "hour": 42, # hour of day - 0 to 23.
1009            },
1010            "availabilityType": "A String", # Reserved for future use.
1011            "labels": { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1012              "a_key": "A String", # An individual label entry, composed of a key and a value.
1013            },
1014            "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. This property is only applicable to First Generation instances.
1015              "A String",
1016            ],
1017            "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. The activation policy cannot be updated together with other settings for Second Generation instances. Valid values:
1018                # ALWAYS: The instance is on; it is not deactivated by inactivity.
1019                # NEVER: The instance is off; it is not activated, even if a connection request arrives.
1020                # ON_DEMAND: The instance responds to incoming requests, and turns itself off when not in use. Instances with PER_USE pricing turn off after 15 minutes of inactivity. Instances with PER_PACKAGE pricing turn off after 12 hours of inactivity.
1021            "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
1022              "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
1023              "enabled": True or False, # Whether this configuration is enabled.
1024              "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
1025              "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
1026            },
1027            "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
1028              "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
1029              "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
1030              "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).
1031                { # An entry for an Access Control list.
1032                  "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1033                  "kind": "sql#aclEntry", # This is always sql#aclEntry.
1034                  "value": "A String", # The whitelisted value for the access control list.
1035                  "name": "A String", # An optional label to identify this entry.
1036                },
1037              ],
1038            },
1039            "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
1040            "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1041            "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS. This property is only applicable to First Generation instances.
1042            "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. Applies only to Second Generation instances.
1043            "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property is only applicable to First Generation instances.
1044            "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE. Only PER_USE is supported for Second Generation instances.
1045            "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
1046            "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is true. Applies only to Second Generation instances.
1047            "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or GCE zone for better performance. App Engine co-location is only applicable to First Generation instances.
1048              "kind": "sql#locationPreference", # This is always sql#locationPreference.
1049              "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
1050              "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
1051            },
1052            "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Applies only to Second Generation instances.
1053          },
1054          "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
1055          "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
1056            "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
1057            "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. In case the master instance fails, the replica instance will be promoted as the new master instance.
1058                # Only one replica can be specified as failover target, and the replica has to be in different zone with the master instance.
1059            "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises master. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named master.info in the data directory.
1060              "username": "A String", # The username for the replication connection.
1061              "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
1062              "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
1063              "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
1064              "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
1065              "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
1066              "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
1067              "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate that it sends during the SSL handshake.
1068              "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps should have the binlog co-ordinates from which replication should begin. This can be accomplished by setting --master-data to 1 when using mysqldump.
1069              "password": "A String", # The password for the replication connection.
1070              "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
1071            },
1072          },
1073          "selfLink": "A String", # The URI of this resource.
1074        },
1075    ],
1076    "kind": "sql#instancesList", # This is always sql#instancesList.
1077  }</pre>
1078</div>
1079
1080<div class="method">
1081    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1082  <pre>Retrieves the next page of results.
1083
1084Args:
1085  previous_request: The request for the previous page. (required)
1086  previous_response: The response from the request for the previous page. (required)
1087
1088Returns:
1089  A request object that you can call 'execute()' on to request the next
1090  page. Returns None if there are no more items in the collection.
1091    </pre>
1092</div>
1093
1094<div class="method">
1095    <code class="details" id="patch">patch(project, instance, body)</code>
1096  <pre>Updates settings of a Cloud SQL instance. Caution: This is not a partial update, so you must include values for all the settings that you want to retain. For partial updates, use patch.. This method supports patch semantics.
1097
1098Args:
1099  project: string, Project ID of the project that contains the instance. (required)
1100  instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1101  body: object, The request body. (required)
1102    The object takes the form of:
1103
1104{ # A Cloud SQL instance resource.
1105    "backendType": "A String", # FIRST_GEN: Basic Cloud SQL instance that runs in a Google-managed container.
1106        # SECOND_GEN: A newer Cloud SQL backend that runs in a Compute Engine VM.
1107        # EXTERNAL: A MySQL server that is not managed by Google.
1108    "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Users should use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ for details.
1109    "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
1110    "ipAddresses": [ # The assigned IP addresses for the instance.
1111      { # Database instance IP Mapping.
1112        "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired.
1113        "ipAddress": "A String", # The IP address assigned.
1114        "type": "A String", # The type of this IP address. A PRIMARY address is an address that can accept incoming connections. An OUTGOING address is the source address of connections originating from the instance, if supported.
1115      },
1116    ],
1117    "databaseVersion": "A String", # The database engine type and version. The databaseVersion can not be changed after instance creation. Can be MYSQL_5_5, MYSQL_5_6 or MYSQL_5_7. Defaults to MYSQL_5_6. MYSQL_5_7 is applicable only to Second Generation instances.
1118    "instanceType": "A String", # The instance type. This can be one of the following.
1119        # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
1120        # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
1121        # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
1122    "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
1123    "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension.
1124      "A String",
1125    ],
1126    "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
1127    "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
1128        # RUNNABLE: The instance is running, or is ready to run when accessed.
1129        # SUSPENDED: The instance is not available, for example due to problems with billing.
1130        # PENDING_CREATE: The instance is being created.
1131        # MAINTENANCE: The instance is down for maintenance.
1132        # FAILED: The instance creation failed.
1133        # UNKNOWN_STATE: The state of the instance is unknown.
1134    "etag": "A String", # HTTP 1.1 Entity tag for the resource.
1135    "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
1136      "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The master can only failover to the falover replica when the status is true.
1137      "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances.
1138    },
1139    "replicaNames": [ # The replicas of the instance.
1140      "A String",
1141    ],
1142    "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
1143      "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
1144      "hostPort": "A String", # The host and port of the on-premises instance in host:port format
1145    },
1146    "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
1147    "kind": "sql#instance", # This is always sql#instance.
1148    "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
1149    "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only to First Generation instances.
1150    "serverCaCert": { # SslCerts Resource # SSL configuration.
1151      "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
1152      "kind": "sql#sslCert", # This is always sql#sslCert.
1153      "sha1Fingerprint": "A String", # Sha1 Fingerprint.
1154      "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1155      "instance": "A String", # Name of the database instance.
1156      "cert": "A String", # PEM representation.
1157      "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1158      "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
1159      "selfLink": "A String", # The URI of this resource.
1160    },
1161    "region": "A String", # The geographical region. Can be us-central (FIRST_GEN instances only), us-central1 (SECOND_GEN instances only), asia-east1 or europe-west1. Defaults to us-central or us-central1 depending on the instance type (First Generation or Second Generation). The region can not be changed after instance creation.
1162    "settings": { # Database instance settings. # The user settings.
1163      "databaseFlags": [ # The database flags passed to the instance at startup.
1164        { # MySQL flags for Cloud SQL instances.
1165          "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both MySQL server options and MySQL system variables. Flags should be specified with underscores, not hyphens. For more information, see Configuring MySQL Flags in the Google Cloud SQL documentation, as well as the official MySQL documentation for server options and system variables.
1166          "value": "A String", # The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value.
1167        },
1168      ],
1169      "kind": "sql#settings", # This is always sql#settings.
1170      "dataDiskType": "A String", # The type of data disk. Only supported for Second Generation instances. The default type is PD_SSD. Applies only to Second Generation instances.
1171      "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should preferably be restarted for system maintenance puruposes. # The maintenance window for this instance. This specifies when the instance may be restarted for maintenance purposes. Applies only to Second Generation instances.
1172        "kind": "sql#maintenanceWindow", # This is always sql#maintenanceWindow.
1173        "updateTrack": "A String",
1174        "day": 42, # day of week (1-7), starting on Monday.
1175        "hour": 42, # hour of day - 0 to 23.
1176      },
1177      "availabilityType": "A String", # Reserved for future use.
1178      "labels": { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1179        "a_key": "A String", # An individual label entry, composed of a key and a value.
1180      },
1181      "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. This property is only applicable to First Generation instances.
1182        "A String",
1183      ],
1184      "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. The activation policy cannot be updated together with other settings for Second Generation instances. Valid values:
1185          # ALWAYS: The instance is on; it is not deactivated by inactivity.
1186          # NEVER: The instance is off; it is not activated, even if a connection request arrives.
1187          # ON_DEMAND: The instance responds to incoming requests, and turns itself off when not in use. Instances with PER_USE pricing turn off after 15 minutes of inactivity. Instances with PER_PACKAGE pricing turn off after 12 hours of inactivity.
1188      "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
1189        "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
1190        "enabled": True or False, # Whether this configuration is enabled.
1191        "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
1192        "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
1193      },
1194      "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
1195        "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
1196        "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
1197        "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).
1198          { # An entry for an Access Control list.
1199            "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1200            "kind": "sql#aclEntry", # This is always sql#aclEntry.
1201            "value": "A String", # The whitelisted value for the access control list.
1202            "name": "A String", # An optional label to identify this entry.
1203          },
1204        ],
1205      },
1206      "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
1207      "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1208      "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS. This property is only applicable to First Generation instances.
1209      "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. Applies only to Second Generation instances.
1210      "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property is only applicable to First Generation instances.
1211      "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE. Only PER_USE is supported for Second Generation instances.
1212      "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
1213      "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is true. Applies only to Second Generation instances.
1214      "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or GCE zone for better performance. App Engine co-location is only applicable to First Generation instances.
1215        "kind": "sql#locationPreference", # This is always sql#locationPreference.
1216        "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
1217        "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
1218      },
1219      "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Applies only to Second Generation instances.
1220    },
1221    "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
1222    "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
1223      "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
1224      "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. In case the master instance fails, the replica instance will be promoted as the new master instance.
1225          # Only one replica can be specified as failover target, and the replica has to be in different zone with the master instance.
1226      "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises master. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named master.info in the data directory.
1227        "username": "A String", # The username for the replication connection.
1228        "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
1229        "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
1230        "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
1231        "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
1232        "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
1233        "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
1234        "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate that it sends during the SSL handshake.
1235        "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps should have the binlog co-ordinates from which replication should begin. This can be accomplished by setting --master-data to 1 when using mysqldump.
1236        "password": "A String", # The password for the replication connection.
1237        "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
1238      },
1239    },
1240    "selfLink": "A String", # The URI of this resource.
1241  }
1242
1243
1244Returns:
1245  An object of the form:
1246
1247    { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
1248    "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1249    "importContext": { # Database instance import context. # The context for import operation, if applicable.
1250      "kind": "sql#importContext", # This is always sql#importContext.
1251      "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
1252      "fileType": "A String", # The file type for the specified uri.
1253          # SQL: The file contains SQL statements.
1254          # CSV: The file contains CSV data.
1255      "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
1256      "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances.
1257      "csvImportOptions": { # Options for importing data as CSV.
1258        "table": "A String", # The table to which CSV data is imported.
1259        "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1260          "A String",
1261        ],
1262      },
1263    },
1264    "kind": "sql#operation", # This is always sql#operation.
1265    "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1266    "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1267      "kind": "sql#exportContext", # This is always sql#exportContext.
1268      "fileType": "A String", # The file type for the specified uri.
1269          # SQL: The file contains SQL statements.
1270          # CSV: The file contains CSV data.
1271      "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
1272      "csvExportOptions": { # Options for exporting data as CSV.
1273        "selectQuery": "A String", # The select query used to extract the data.
1274      },
1275      "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
1276        "A String",
1277      ],
1278      "sqlExportOptions": { # Options for exporting data as SQL statements.
1279        "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1280          "A String",
1281        ],
1282        "schemaOnly": True or False, # Export only schemas.
1283      },
1284    },
1285    "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1286    "targetProject": "A String", # The project ID of the target instance related to this operation.
1287    "targetId": "A String", # Name of the database instance related to this operation.
1288    "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
1289    "targetLink": "A String",
1290    "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1291    "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1292      "kind": "sql#operationErrors", # This is always sql#operationErrors.
1293      "errors": [ # The list of errors encountered while processing this operation.
1294        { # Database instance operation error.
1295          "kind": "sql#operationError", # This is always sql#operationError.
1296          "code": "A String", # Identifies the specific error that occurred.
1297          "message": "A String", # Additional information about the error encountered.
1298        },
1299      ],
1300    },
1301    "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1302    "selfLink": "A String", # The URI of this resource.
1303    "user": "A String", # The email address of the user who initiated this operation.
1304  }</pre>
1305</div>
1306
1307<div class="method">
1308    <code class="details" id="promoteReplica">promoteReplica(project, instance)</code>
1309  <pre>Promotes the read replica instance to be a stand-alone Cloud SQL instance.
1310
1311Args:
1312  project: string, ID of the project that contains the read replica. (required)
1313  instance: string, Cloud SQL read replica instance name. (required)
1314
1315Returns:
1316  An object of the form:
1317
1318    { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
1319    "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1320    "importContext": { # Database instance import context. # The context for import operation, if applicable.
1321      "kind": "sql#importContext", # This is always sql#importContext.
1322      "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
1323      "fileType": "A String", # The file type for the specified uri.
1324          # SQL: The file contains SQL statements.
1325          # CSV: The file contains CSV data.
1326      "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
1327      "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances.
1328      "csvImportOptions": { # Options for importing data as CSV.
1329        "table": "A String", # The table to which CSV data is imported.
1330        "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1331          "A String",
1332        ],
1333      },
1334    },
1335    "kind": "sql#operation", # This is always sql#operation.
1336    "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1337    "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1338      "kind": "sql#exportContext", # This is always sql#exportContext.
1339      "fileType": "A String", # The file type for the specified uri.
1340          # SQL: The file contains SQL statements.
1341          # CSV: The file contains CSV data.
1342      "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
1343      "csvExportOptions": { # Options for exporting data as CSV.
1344        "selectQuery": "A String", # The select query used to extract the data.
1345      },
1346      "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
1347        "A String",
1348      ],
1349      "sqlExportOptions": { # Options for exporting data as SQL statements.
1350        "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1351          "A String",
1352        ],
1353        "schemaOnly": True or False, # Export only schemas.
1354      },
1355    },
1356    "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1357    "targetProject": "A String", # The project ID of the target instance related to this operation.
1358    "targetId": "A String", # Name of the database instance related to this operation.
1359    "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
1360    "targetLink": "A String",
1361    "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1362    "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1363      "kind": "sql#operationErrors", # This is always sql#operationErrors.
1364      "errors": [ # The list of errors encountered while processing this operation.
1365        { # Database instance operation error.
1366          "kind": "sql#operationError", # This is always sql#operationError.
1367          "code": "A String", # Identifies the specific error that occurred.
1368          "message": "A String", # Additional information about the error encountered.
1369        },
1370      ],
1371    },
1372    "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1373    "selfLink": "A String", # The URI of this resource.
1374    "user": "A String", # The email address of the user who initiated this operation.
1375  }</pre>
1376</div>
1377
1378<div class="method">
1379    <code class="details" id="resetSslConfig">resetSslConfig(project, instance)</code>
1380  <pre>Deletes all client certificates and generates a new server SSL certificate for the instance. The changes will not take effect until the instance is restarted. Existing instances without a server certificate will need to call this once to set a server certificate.
1381
1382Args:
1383  project: string, Project ID of the project that contains the instance. (required)
1384  instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1385
1386Returns:
1387  An object of the form:
1388
1389    { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
1390    "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1391    "importContext": { # Database instance import context. # The context for import operation, if applicable.
1392      "kind": "sql#importContext", # This is always sql#importContext.
1393      "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
1394      "fileType": "A String", # The file type for the specified uri.
1395          # SQL: The file contains SQL statements.
1396          # CSV: The file contains CSV data.
1397      "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
1398      "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances.
1399      "csvImportOptions": { # Options for importing data as CSV.
1400        "table": "A String", # The table to which CSV data is imported.
1401        "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1402          "A String",
1403        ],
1404      },
1405    },
1406    "kind": "sql#operation", # This is always sql#operation.
1407    "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1408    "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1409      "kind": "sql#exportContext", # This is always sql#exportContext.
1410      "fileType": "A String", # The file type for the specified uri.
1411          # SQL: The file contains SQL statements.
1412          # CSV: The file contains CSV data.
1413      "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
1414      "csvExportOptions": { # Options for exporting data as CSV.
1415        "selectQuery": "A String", # The select query used to extract the data.
1416      },
1417      "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
1418        "A String",
1419      ],
1420      "sqlExportOptions": { # Options for exporting data as SQL statements.
1421        "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1422          "A String",
1423        ],
1424        "schemaOnly": True or False, # Export only schemas.
1425      },
1426    },
1427    "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1428    "targetProject": "A String", # The project ID of the target instance related to this operation.
1429    "targetId": "A String", # Name of the database instance related to this operation.
1430    "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
1431    "targetLink": "A String",
1432    "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1433    "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1434      "kind": "sql#operationErrors", # This is always sql#operationErrors.
1435      "errors": [ # The list of errors encountered while processing this operation.
1436        { # Database instance operation error.
1437          "kind": "sql#operationError", # This is always sql#operationError.
1438          "code": "A String", # Identifies the specific error that occurred.
1439          "message": "A String", # Additional information about the error encountered.
1440        },
1441      ],
1442    },
1443    "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1444    "selfLink": "A String", # The URI of this resource.
1445    "user": "A String", # The email address of the user who initiated this operation.
1446  }</pre>
1447</div>
1448
1449<div class="method">
1450    <code class="details" id="restart">restart(project, instance)</code>
1451  <pre>Restarts a Cloud SQL instance.
1452
1453Args:
1454  project: string, Project ID of the project that contains the instance to be restarted. (required)
1455  instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1456
1457Returns:
1458  An object of the form:
1459
1460    { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
1461    "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1462    "importContext": { # Database instance import context. # The context for import operation, if applicable.
1463      "kind": "sql#importContext", # This is always sql#importContext.
1464      "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
1465      "fileType": "A String", # The file type for the specified uri.
1466          # SQL: The file contains SQL statements.
1467          # CSV: The file contains CSV data.
1468      "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
1469      "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances.
1470      "csvImportOptions": { # Options for importing data as CSV.
1471        "table": "A String", # The table to which CSV data is imported.
1472        "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1473          "A String",
1474        ],
1475      },
1476    },
1477    "kind": "sql#operation", # This is always sql#operation.
1478    "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1479    "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1480      "kind": "sql#exportContext", # This is always sql#exportContext.
1481      "fileType": "A String", # The file type for the specified uri.
1482          # SQL: The file contains SQL statements.
1483          # CSV: The file contains CSV data.
1484      "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
1485      "csvExportOptions": { # Options for exporting data as CSV.
1486        "selectQuery": "A String", # The select query used to extract the data.
1487      },
1488      "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
1489        "A String",
1490      ],
1491      "sqlExportOptions": { # Options for exporting data as SQL statements.
1492        "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1493          "A String",
1494        ],
1495        "schemaOnly": True or False, # Export only schemas.
1496      },
1497    },
1498    "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1499    "targetProject": "A String", # The project ID of the target instance related to this operation.
1500    "targetId": "A String", # Name of the database instance related to this operation.
1501    "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
1502    "targetLink": "A String",
1503    "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1504    "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1505      "kind": "sql#operationErrors", # This is always sql#operationErrors.
1506      "errors": [ # The list of errors encountered while processing this operation.
1507        { # Database instance operation error.
1508          "kind": "sql#operationError", # This is always sql#operationError.
1509          "code": "A String", # Identifies the specific error that occurred.
1510          "message": "A String", # Additional information about the error encountered.
1511        },
1512      ],
1513    },
1514    "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1515    "selfLink": "A String", # The URI of this resource.
1516    "user": "A String", # The email address of the user who initiated this operation.
1517  }</pre>
1518</div>
1519
1520<div class="method">
1521    <code class="details" id="restoreBackup">restoreBackup(project, instance, body)</code>
1522  <pre>Restores a backup of a Cloud SQL instance.
1523
1524Args:
1525  project: string, Project ID of the project that contains the instance. (required)
1526  instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1527  body: object, The request body. (required)
1528    The object takes the form of:
1529
1530{ # Database instance restore backup request.
1531    "restoreBackupContext": { # Database instance restore from backup context. # Parameters required to perform the restore backup operation.
1532      "instanceId": "A String", # The ID of the instance that the backup was taken from.
1533      "kind": "sql#restoreBackupContext", # This is always sql#restoreBackupContext.
1534      "backupRunId": "A String", # The ID of the backup run to restore from.
1535    },
1536  }
1537
1538
1539Returns:
1540  An object of the form:
1541
1542    { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
1543    "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1544    "importContext": { # Database instance import context. # The context for import operation, if applicable.
1545      "kind": "sql#importContext", # This is always sql#importContext.
1546      "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
1547      "fileType": "A String", # The file type for the specified uri.
1548          # SQL: The file contains SQL statements.
1549          # CSV: The file contains CSV data.
1550      "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
1551      "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances.
1552      "csvImportOptions": { # Options for importing data as CSV.
1553        "table": "A String", # The table to which CSV data is imported.
1554        "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1555          "A String",
1556        ],
1557      },
1558    },
1559    "kind": "sql#operation", # This is always sql#operation.
1560    "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1561    "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1562      "kind": "sql#exportContext", # This is always sql#exportContext.
1563      "fileType": "A String", # The file type for the specified uri.
1564          # SQL: The file contains SQL statements.
1565          # CSV: The file contains CSV data.
1566      "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
1567      "csvExportOptions": { # Options for exporting data as CSV.
1568        "selectQuery": "A String", # The select query used to extract the data.
1569      },
1570      "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
1571        "A String",
1572      ],
1573      "sqlExportOptions": { # Options for exporting data as SQL statements.
1574        "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1575          "A String",
1576        ],
1577        "schemaOnly": True or False, # Export only schemas.
1578      },
1579    },
1580    "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1581    "targetProject": "A String", # The project ID of the target instance related to this operation.
1582    "targetId": "A String", # Name of the database instance related to this operation.
1583    "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
1584    "targetLink": "A String",
1585    "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1586    "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1587      "kind": "sql#operationErrors", # This is always sql#operationErrors.
1588      "errors": [ # The list of errors encountered while processing this operation.
1589        { # Database instance operation error.
1590          "kind": "sql#operationError", # This is always sql#operationError.
1591          "code": "A String", # Identifies the specific error that occurred.
1592          "message": "A String", # Additional information about the error encountered.
1593        },
1594      ],
1595    },
1596    "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1597    "selfLink": "A String", # The URI of this resource.
1598    "user": "A String", # The email address of the user who initiated this operation.
1599  }</pre>
1600</div>
1601
1602<div class="method">
1603    <code class="details" id="startReplica">startReplica(project, instance)</code>
1604  <pre>Starts the replication in the read replica instance.
1605
1606Args:
1607  project: string, ID of the project that contains the read replica. (required)
1608  instance: string, Cloud SQL read replica instance name. (required)
1609
1610Returns:
1611  An object of the form:
1612
1613    { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
1614    "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1615    "importContext": { # Database instance import context. # The context for import operation, if applicable.
1616      "kind": "sql#importContext", # This is always sql#importContext.
1617      "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
1618      "fileType": "A String", # The file type for the specified uri.
1619          # SQL: The file contains SQL statements.
1620          # CSV: The file contains CSV data.
1621      "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
1622      "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances.
1623      "csvImportOptions": { # Options for importing data as CSV.
1624        "table": "A String", # The table to which CSV data is imported.
1625        "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1626          "A String",
1627        ],
1628      },
1629    },
1630    "kind": "sql#operation", # This is always sql#operation.
1631    "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1632    "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1633      "kind": "sql#exportContext", # This is always sql#exportContext.
1634      "fileType": "A String", # The file type for the specified uri.
1635          # SQL: The file contains SQL statements.
1636          # CSV: The file contains CSV data.
1637      "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
1638      "csvExportOptions": { # Options for exporting data as CSV.
1639        "selectQuery": "A String", # The select query used to extract the data.
1640      },
1641      "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
1642        "A String",
1643      ],
1644      "sqlExportOptions": { # Options for exporting data as SQL statements.
1645        "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1646          "A String",
1647        ],
1648        "schemaOnly": True or False, # Export only schemas.
1649      },
1650    },
1651    "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1652    "targetProject": "A String", # The project ID of the target instance related to this operation.
1653    "targetId": "A String", # Name of the database instance related to this operation.
1654    "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
1655    "targetLink": "A String",
1656    "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1657    "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1658      "kind": "sql#operationErrors", # This is always sql#operationErrors.
1659      "errors": [ # The list of errors encountered while processing this operation.
1660        { # Database instance operation error.
1661          "kind": "sql#operationError", # This is always sql#operationError.
1662          "code": "A String", # Identifies the specific error that occurred.
1663          "message": "A String", # Additional information about the error encountered.
1664        },
1665      ],
1666    },
1667    "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1668    "selfLink": "A String", # The URI of this resource.
1669    "user": "A String", # The email address of the user who initiated this operation.
1670  }</pre>
1671</div>
1672
1673<div class="method">
1674    <code class="details" id="stopReplica">stopReplica(project, instance)</code>
1675  <pre>Stops the replication in the read replica instance.
1676
1677Args:
1678  project: string, ID of the project that contains the read replica. (required)
1679  instance: string, Cloud SQL read replica instance name. (required)
1680
1681Returns:
1682  An object of the form:
1683
1684    { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
1685    "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1686    "importContext": { # Database instance import context. # The context for import operation, if applicable.
1687      "kind": "sql#importContext", # This is always sql#importContext.
1688      "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
1689      "fileType": "A String", # The file type for the specified uri.
1690          # SQL: The file contains SQL statements.
1691          # CSV: The file contains CSV data.
1692      "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
1693      "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances.
1694      "csvImportOptions": { # Options for importing data as CSV.
1695        "table": "A String", # The table to which CSV data is imported.
1696        "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1697          "A String",
1698        ],
1699      },
1700    },
1701    "kind": "sql#operation", # This is always sql#operation.
1702    "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1703    "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1704      "kind": "sql#exportContext", # This is always sql#exportContext.
1705      "fileType": "A String", # The file type for the specified uri.
1706          # SQL: The file contains SQL statements.
1707          # CSV: The file contains CSV data.
1708      "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
1709      "csvExportOptions": { # Options for exporting data as CSV.
1710        "selectQuery": "A String", # The select query used to extract the data.
1711      },
1712      "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
1713        "A String",
1714      ],
1715      "sqlExportOptions": { # Options for exporting data as SQL statements.
1716        "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1717          "A String",
1718        ],
1719        "schemaOnly": True or False, # Export only schemas.
1720      },
1721    },
1722    "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1723    "targetProject": "A String", # The project ID of the target instance related to this operation.
1724    "targetId": "A String", # Name of the database instance related to this operation.
1725    "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
1726    "targetLink": "A String",
1727    "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1728    "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1729      "kind": "sql#operationErrors", # This is always sql#operationErrors.
1730      "errors": [ # The list of errors encountered while processing this operation.
1731        { # Database instance operation error.
1732          "kind": "sql#operationError", # This is always sql#operationError.
1733          "code": "A String", # Identifies the specific error that occurred.
1734          "message": "A String", # Additional information about the error encountered.
1735        },
1736      ],
1737    },
1738    "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1739    "selfLink": "A String", # The URI of this resource.
1740    "user": "A String", # The email address of the user who initiated this operation.
1741  }</pre>
1742</div>
1743
1744<div class="method">
1745    <code class="details" id="truncateLog">truncateLog(project, instance, body)</code>
1746  <pre>Truncate MySQL general and slow query log tables
1747
1748Args:
1749  project: string, Project ID of the Cloud SQL project. (required)
1750  instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1751  body: object, The request body. (required)
1752    The object takes the form of:
1753
1754{ # Instance truncate log request.
1755    "truncateLogContext": { # Database Instance truncate log context. # Contains details about the truncate log operation.
1756      "logType": "A String", # The type of log to truncate. Valid values are MYSQL_GENERAL_TABLE and MYSQL_SLOW_TABLE.
1757      "kind": "sql#truncateLogContext", # This is always sql#truncateLogContext.
1758    },
1759  }
1760
1761
1762Returns:
1763  An object of the form:
1764
1765    { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
1766    "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1767    "importContext": { # Database instance import context. # The context for import operation, if applicable.
1768      "kind": "sql#importContext", # This is always sql#importContext.
1769      "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
1770      "fileType": "A String", # The file type for the specified uri.
1771          # SQL: The file contains SQL statements.
1772          # CSV: The file contains CSV data.
1773      "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
1774      "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances.
1775      "csvImportOptions": { # Options for importing data as CSV.
1776        "table": "A String", # The table to which CSV data is imported.
1777        "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1778          "A String",
1779        ],
1780      },
1781    },
1782    "kind": "sql#operation", # This is always sql#operation.
1783    "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1784    "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1785      "kind": "sql#exportContext", # This is always sql#exportContext.
1786      "fileType": "A String", # The file type for the specified uri.
1787          # SQL: The file contains SQL statements.
1788          # CSV: The file contains CSV data.
1789      "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
1790      "csvExportOptions": { # Options for exporting data as CSV.
1791        "selectQuery": "A String", # The select query used to extract the data.
1792      },
1793      "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
1794        "A String",
1795      ],
1796      "sqlExportOptions": { # Options for exporting data as SQL statements.
1797        "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1798          "A String",
1799        ],
1800        "schemaOnly": True or False, # Export only schemas.
1801      },
1802    },
1803    "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1804    "targetProject": "A String", # The project ID of the target instance related to this operation.
1805    "targetId": "A String", # Name of the database instance related to this operation.
1806    "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
1807    "targetLink": "A String",
1808    "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1809    "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1810      "kind": "sql#operationErrors", # This is always sql#operationErrors.
1811      "errors": [ # The list of errors encountered while processing this operation.
1812        { # Database instance operation error.
1813          "kind": "sql#operationError", # This is always sql#operationError.
1814          "code": "A String", # Identifies the specific error that occurred.
1815          "message": "A String", # Additional information about the error encountered.
1816        },
1817      ],
1818    },
1819    "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1820    "selfLink": "A String", # The URI of this resource.
1821    "user": "A String", # The email address of the user who initiated this operation.
1822  }</pre>
1823</div>
1824
1825<div class="method">
1826    <code class="details" id="update">update(project, instance, body)</code>
1827  <pre>Updates settings of a Cloud SQL instance. Caution: This is not a partial update, so you must include values for all the settings that you want to retain. For partial updates, use patch.
1828
1829Args:
1830  project: string, Project ID of the project that contains the instance. (required)
1831  instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1832  body: object, The request body. (required)
1833    The object takes the form of:
1834
1835{ # A Cloud SQL instance resource.
1836    "backendType": "A String", # FIRST_GEN: Basic Cloud SQL instance that runs in a Google-managed container.
1837        # SECOND_GEN: A newer Cloud SQL backend that runs in a Compute Engine VM.
1838        # EXTERNAL: A MySQL server that is not managed by Google.
1839    "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Users should use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ for details.
1840    "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
1841    "ipAddresses": [ # The assigned IP addresses for the instance.
1842      { # Database instance IP Mapping.
1843        "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired.
1844        "ipAddress": "A String", # The IP address assigned.
1845        "type": "A String", # The type of this IP address. A PRIMARY address is an address that can accept incoming connections. An OUTGOING address is the source address of connections originating from the instance, if supported.
1846      },
1847    ],
1848    "databaseVersion": "A String", # The database engine type and version. The databaseVersion can not be changed after instance creation. Can be MYSQL_5_5, MYSQL_5_6 or MYSQL_5_7. Defaults to MYSQL_5_6. MYSQL_5_7 is applicable only to Second Generation instances.
1849    "instanceType": "A String", # The instance type. This can be one of the following.
1850        # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
1851        # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
1852        # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
1853    "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
1854    "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension.
1855      "A String",
1856    ],
1857    "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
1858    "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
1859        # RUNNABLE: The instance is running, or is ready to run when accessed.
1860        # SUSPENDED: The instance is not available, for example due to problems with billing.
1861        # PENDING_CREATE: The instance is being created.
1862        # MAINTENANCE: The instance is down for maintenance.
1863        # FAILED: The instance creation failed.
1864        # UNKNOWN_STATE: The state of the instance is unknown.
1865    "etag": "A String", # HTTP 1.1 Entity tag for the resource.
1866    "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
1867      "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The master can only failover to the falover replica when the status is true.
1868      "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances.
1869    },
1870    "replicaNames": [ # The replicas of the instance.
1871      "A String",
1872    ],
1873    "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
1874      "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
1875      "hostPort": "A String", # The host and port of the on-premises instance in host:port format
1876    },
1877    "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
1878    "kind": "sql#instance", # This is always sql#instance.
1879    "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
1880    "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only to First Generation instances.
1881    "serverCaCert": { # SslCerts Resource # SSL configuration.
1882      "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
1883      "kind": "sql#sslCert", # This is always sql#sslCert.
1884      "sha1Fingerprint": "A String", # Sha1 Fingerprint.
1885      "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1886      "instance": "A String", # Name of the database instance.
1887      "cert": "A String", # PEM representation.
1888      "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1889      "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
1890      "selfLink": "A String", # The URI of this resource.
1891    },
1892    "region": "A String", # The geographical region. Can be us-central (FIRST_GEN instances only), us-central1 (SECOND_GEN instances only), asia-east1 or europe-west1. Defaults to us-central or us-central1 depending on the instance type (First Generation or Second Generation). The region can not be changed after instance creation.
1893    "settings": { # Database instance settings. # The user settings.
1894      "databaseFlags": [ # The database flags passed to the instance at startup.
1895        { # MySQL flags for Cloud SQL instances.
1896          "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both MySQL server options and MySQL system variables. Flags should be specified with underscores, not hyphens. For more information, see Configuring MySQL Flags in the Google Cloud SQL documentation, as well as the official MySQL documentation for server options and system variables.
1897          "value": "A String", # The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value.
1898        },
1899      ],
1900      "kind": "sql#settings", # This is always sql#settings.
1901      "dataDiskType": "A String", # The type of data disk. Only supported for Second Generation instances. The default type is PD_SSD. Applies only to Second Generation instances.
1902      "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should preferably be restarted for system maintenance puruposes. # The maintenance window for this instance. This specifies when the instance may be restarted for maintenance purposes. Applies only to Second Generation instances.
1903        "kind": "sql#maintenanceWindow", # This is always sql#maintenanceWindow.
1904        "updateTrack": "A String",
1905        "day": 42, # day of week (1-7), starting on Monday.
1906        "hour": 42, # hour of day - 0 to 23.
1907      },
1908      "availabilityType": "A String", # Reserved for future use.
1909      "labels": { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1910        "a_key": "A String", # An individual label entry, composed of a key and a value.
1911      },
1912      "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. This property is only applicable to First Generation instances.
1913        "A String",
1914      ],
1915      "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. The activation policy cannot be updated together with other settings for Second Generation instances. Valid values:
1916          # ALWAYS: The instance is on; it is not deactivated by inactivity.
1917          # NEVER: The instance is off; it is not activated, even if a connection request arrives.
1918          # ON_DEMAND: The instance responds to incoming requests, and turns itself off when not in use. Instances with PER_USE pricing turn off after 15 minutes of inactivity. Instances with PER_PACKAGE pricing turn off after 12 hours of inactivity.
1919      "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
1920        "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
1921        "enabled": True or False, # Whether this configuration is enabled.
1922        "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
1923        "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
1924      },
1925      "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
1926        "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
1927        "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
1928        "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).
1929          { # An entry for an Access Control list.
1930            "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1931            "kind": "sql#aclEntry", # This is always sql#aclEntry.
1932            "value": "A String", # The whitelisted value for the access control list.
1933            "name": "A String", # An optional label to identify this entry.
1934          },
1935        ],
1936      },
1937      "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
1938      "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1939      "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS. This property is only applicable to First Generation instances.
1940      "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. Applies only to Second Generation instances.
1941      "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property is only applicable to First Generation instances.
1942      "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE. Only PER_USE is supported for Second Generation instances.
1943      "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
1944      "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is true. Applies only to Second Generation instances.
1945      "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or GCE zone for better performance. App Engine co-location is only applicable to First Generation instances.
1946        "kind": "sql#locationPreference", # This is always sql#locationPreference.
1947        "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
1948        "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
1949      },
1950      "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Applies only to Second Generation instances.
1951    },
1952    "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
1953    "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
1954      "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
1955      "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. In case the master instance fails, the replica instance will be promoted as the new master instance.
1956          # Only one replica can be specified as failover target, and the replica has to be in different zone with the master instance.
1957      "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises master. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named master.info in the data directory.
1958        "username": "A String", # The username for the replication connection.
1959        "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
1960        "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
1961        "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
1962        "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
1963        "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
1964        "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
1965        "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate that it sends during the SSL handshake.
1966        "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps should have the binlog co-ordinates from which replication should begin. This can be accomplished by setting --master-data to 1 when using mysqldump.
1967        "password": "A String", # The password for the replication connection.
1968        "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
1969      },
1970    },
1971    "selfLink": "A String", # The URI of this resource.
1972  }
1973
1974
1975Returns:
1976  An object of the form:
1977
1978    { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
1979    "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1980    "importContext": { # Database instance import context. # The context for import operation, if applicable.
1981      "kind": "sql#importContext", # This is always sql#importContext.
1982      "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
1983      "fileType": "A String", # The file type for the specified uri.
1984          # SQL: The file contains SQL statements.
1985          # CSV: The file contains CSV data.
1986      "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
1987      "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances.
1988      "csvImportOptions": { # Options for importing data as CSV.
1989        "table": "A String", # The table to which CSV data is imported.
1990        "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1991          "A String",
1992        ],
1993      },
1994    },
1995    "kind": "sql#operation", # This is always sql#operation.
1996    "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1997    "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1998      "kind": "sql#exportContext", # This is always sql#exportContext.
1999      "fileType": "A String", # The file type for the specified uri.
2000          # SQL: The file contains SQL statements.
2001          # CSV: The file contains CSV data.
2002      "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
2003      "csvExportOptions": { # Options for exporting data as CSV.
2004        "selectQuery": "A String", # The select query used to extract the data.
2005      },
2006      "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
2007        "A String",
2008      ],
2009      "sqlExportOptions": { # Options for exporting data as SQL statements.
2010        "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
2011          "A String",
2012        ],
2013        "schemaOnly": True or False, # Export only schemas.
2014      },
2015    },
2016    "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
2017    "targetProject": "A String", # The project ID of the target instance related to this operation.
2018    "targetId": "A String", # Name of the database instance related to this operation.
2019    "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
2020    "targetLink": "A String",
2021    "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
2022    "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2023      "kind": "sql#operationErrors", # This is always sql#operationErrors.
2024      "errors": [ # The list of errors encountered while processing this operation.
2025        { # Database instance operation error.
2026          "kind": "sql#operationError", # This is always sql#operationError.
2027          "code": "A String", # Identifies the specific error that occurred.
2028          "message": "A String", # Additional information about the error encountered.
2029        },
2030      ],
2031    },
2032    "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
2033    "selfLink": "A String", # The URI of this resource.
2034    "user": "A String", # The email address of the user who initiated this operation.
2035  }</pre>
2036</div>
2037
2038</body></html>