blob: 0ddfa3c238b1dc9a574794d642e16bfbb9a3f6a9 [file] [log] [blame]
Craig Citroe633be12015-03-02 13:40:36 -08001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
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.</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">
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080087 <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">
Craig Citroe633be12015-03-02 13:40:36 -080090 <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, pageToken=None, maxResults=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="#update">update(project, instance, body)</a></code></p>
127<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>
128<h3>Method Details</h3>
129<div class="method">
130 <code class="details" id="clone">clone(project, instance, body)</code>
131 <pre>Creates a Cloud SQL instance as a clone of the source instance.
132
133Args:
134 project: string, Project ID of the source as well as the clone Cloud SQL instance. (required)
135 instance: string, The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID. (required)
136 body: object, The request body. (required)
137 The object takes the form of:
138
139{ # Database instance clone request.
140 "cloneContext": { # Database instance clone context. # Contains details about the clone operation.
141 "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.
142 "binLogPosition": "A String", # Position (offset) within the binary log file.
143 "kind": "sql#binLogCoordinates", # This is always sql#binLogCoordinates.
144 "binLogFileName": "A String", # Name of the binary log file for a Cloud SQL instance.
145 },
146 "kind": "sql#cloneContext", # This is always sql#cloneContext.
147 "destinationInstanceName": "A String", # Name of the Cloud SQL instance to be created as a clone.
148 },
149 }
150
151
152Returns:
153 An object of the form:
154
155 { # 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.
156 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
157 "importContext": { # Database instance import context. # The context for import operation, if applicable.
158 "fileType": "A String", # The file type for the specified uri.
159 # SQL: The file contains SQL statements.
160 # CSV: The file contains CSV data.
161 "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.
162 "kind": "sql#importContext", # This is always sql#importContext.
163 "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.
164 "csvImportOptions": { # Options for importing data as CSV.
165 "table": "A String", # The table to which CSV data is imported.
166 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
167 "A String",
168 ],
169 },
170 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000171 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800172 "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.
173 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
174 "kind": "sql#exportContext", # This is always sql#exportContext.
175 "fileType": "A String", # The file type for the specified uri.
176 # SQL: The file contains SQL statements.
177 # CSV: The file contains CSV data.
178 "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.
179 "csvExportOptions": { # Options for exporting data as CSV.
180 "selectQuery": "A String", # The select query used to extract the data.
181 },
182 "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.
183 "A String",
184 ],
185 "sqlExportOptions": { # Options for exporting data as SQL statements.
186 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
187 "A String",
188 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800189 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800190 },
191 },
192 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
193 "targetProject": "A String", # The project ID of the target instance related to this operation.
194 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000195 "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 .
Craig Citroe633be12015-03-02 13:40:36 -0800196 "targetLink": "A String", # The URI of the instance related to the operation.
197 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000198 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
199 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800200 "errors": [ # The list of errors encountered while processing this operation.
201 { # Database instance operation error.
202 "kind": "sql#operationError", # This is always sql#operationError.
203 "code": "A String", # Identifies the specific error that occurred.
204 "message": "A String", # Additional information about the error encountered.
205 },
206 ],
207 },
208 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
209 "selfLink": "A String", # The URI of this resource.
210 "user": "A String", # The email address of the user who initiated this operation.
211 }</pre>
212</div>
213
214<div class="method">
215 <code class="details" id="delete">delete(project, instance)</code>
216 <pre>Deletes a Cloud SQL instance.
217
218Args:
219 project: string, Project ID of the project that contains the instance to be deleted. (required)
220 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
221
222Returns:
223 An object of the form:
224
225 { # 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.
226 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
227 "importContext": { # Database instance import context. # The context for import operation, if applicable.
228 "fileType": "A String", # The file type for the specified uri.
229 # SQL: The file contains SQL statements.
230 # CSV: The file contains CSV data.
231 "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.
232 "kind": "sql#importContext", # This is always sql#importContext.
233 "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.
234 "csvImportOptions": { # Options for importing data as CSV.
235 "table": "A String", # The table to which CSV data is imported.
236 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
237 "A String",
238 ],
239 },
240 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000241 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800242 "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.
243 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
244 "kind": "sql#exportContext", # This is always sql#exportContext.
245 "fileType": "A String", # The file type for the specified uri.
246 # SQL: The file contains SQL statements.
247 # CSV: The file contains CSV data.
248 "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.
249 "csvExportOptions": { # Options for exporting data as CSV.
250 "selectQuery": "A String", # The select query used to extract the data.
251 },
252 "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.
253 "A String",
254 ],
255 "sqlExportOptions": { # Options for exporting data as SQL statements.
256 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
257 "A String",
258 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800259 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800260 },
261 },
262 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
263 "targetProject": "A String", # The project ID of the target instance related to this operation.
264 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000265 "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 .
Craig Citroe633be12015-03-02 13:40:36 -0800266 "targetLink": "A String", # The URI of the instance related to the operation.
267 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000268 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
269 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800270 "errors": [ # The list of errors encountered while processing this operation.
271 { # Database instance operation error.
272 "kind": "sql#operationError", # This is always sql#operationError.
273 "code": "A String", # Identifies the specific error that occurred.
274 "message": "A String", # Additional information about the error encountered.
275 },
276 ],
277 },
278 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
279 "selfLink": "A String", # The URI of this resource.
280 "user": "A String", # The email address of the user who initiated this operation.
281 }</pre>
282</div>
283
284<div class="method">
285 <code class="details" id="export">export(project, instance, body)</code>
286 <pre>Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file.
287
288Args:
289 project: string, Project ID of the project that contains the instance to be exported. (required)
290 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
291 body: object, The request body. (required)
292 The object takes the form of:
293
294{ # Database instance export request.
295 "exportContext": { # Database instance export context. # Contains details about the export operation.
296 "kind": "sql#exportContext", # This is always sql#exportContext.
297 "fileType": "A String", # The file type for the specified uri.
298 # SQL: The file contains SQL statements.
299 # CSV: The file contains CSV data.
300 "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.
301 "csvExportOptions": { # Options for exporting data as CSV.
302 "selectQuery": "A String", # The select query used to extract the data.
303 },
304 "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.
305 "A String",
306 ],
307 "sqlExportOptions": { # Options for exporting data as SQL statements.
308 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
309 "A String",
310 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800311 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800312 },
313 },
314 }
315
316
317Returns:
318 An object of the form:
319
320 { # 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.
321 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
322 "importContext": { # Database instance import context. # The context for import operation, if applicable.
323 "fileType": "A String", # The file type for the specified uri.
324 # SQL: The file contains SQL statements.
325 # CSV: The file contains CSV data.
326 "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.
327 "kind": "sql#importContext", # This is always sql#importContext.
328 "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.
329 "csvImportOptions": { # Options for importing data as CSV.
330 "table": "A String", # The table to which CSV data is imported.
331 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
332 "A String",
333 ],
334 },
335 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000336 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800337 "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.
338 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
339 "kind": "sql#exportContext", # This is always sql#exportContext.
340 "fileType": "A String", # The file type for the specified uri.
341 # SQL: The file contains SQL statements.
342 # CSV: The file contains CSV data.
343 "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.
344 "csvExportOptions": { # Options for exporting data as CSV.
345 "selectQuery": "A String", # The select query used to extract the data.
346 },
347 "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.
348 "A String",
349 ],
350 "sqlExportOptions": { # Options for exporting data as SQL statements.
351 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
352 "A String",
353 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800354 "schemaOnly": True or False, # Export only schemas.
355 },
356 },
357 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
358 "targetProject": "A String", # The project ID of the target instance related to this operation.
359 "targetId": "A String", # Name of the database instance related to this operation.
360 "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 .
361 "targetLink": "A String", # The URI of the instance related to the operation.
362 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
363 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
364 "kind": "sql#operationErrors", # This is always sql#operationErrors.
365 "errors": [ # The list of errors encountered while processing this operation.
366 { # Database instance operation error.
367 "kind": "sql#operationError", # This is always sql#operationError.
368 "code": "A String", # Identifies the specific error that occurred.
369 "message": "A String", # Additional information about the error encountered.
370 },
371 ],
372 },
373 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
374 "selfLink": "A String", # The URI of this resource.
375 "user": "A String", # The email address of the user who initiated this operation.
376 }</pre>
377</div>
378
379<div class="method">
380 <code class="details" id="failover">failover(project, instance, body)</code>
381 <pre>Failover the instance to its failover replica instance.
382
383Args:
384 project: string, ID of the project that contains the read replica. (required)
385 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
386 body: object, The request body. (required)
387 The object takes the form of:
388
389{ # Instance failover request.
390 "failoverContext": { # Database instance failover context. # Failover Context.
391 "kind": "sql#failoverContext", # This is always sql#failoverContext.
392 "settingsVersion": "A String", # The current settings version of this instance. Request will be rejected if this version doesn't match the current settings version.
393 },
394 }
395
396
397Returns:
398 An object of the form:
399
400 { # 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.
401 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
402 "importContext": { # Database instance import context. # The context for import operation, if applicable.
403 "fileType": "A String", # The file type for the specified uri.
404 # SQL: The file contains SQL statements.
405 # CSV: The file contains CSV data.
406 "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.
407 "kind": "sql#importContext", # This is always sql#importContext.
408 "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.
409 "csvImportOptions": { # Options for importing data as CSV.
410 "table": "A String", # The table to which CSV data is imported.
411 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
412 "A String",
413 ],
414 },
415 },
416 "kind": "sql#operation", # This is always sql#operation.
417 "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.
418 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
419 "kind": "sql#exportContext", # This is always sql#exportContext.
420 "fileType": "A String", # The file type for the specified uri.
421 # SQL: The file contains SQL statements.
422 # CSV: The file contains CSV data.
423 "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.
424 "csvExportOptions": { # Options for exporting data as CSV.
425 "selectQuery": "A String", # The select query used to extract the data.
426 },
427 "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.
428 "A String",
429 ],
430 "sqlExportOptions": { # Options for exporting data as SQL statements.
431 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
432 "A String",
433 ],
434 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800435 },
436 },
437 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
438 "targetProject": "A String", # The project ID of the target instance related to this operation.
439 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000440 "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 .
Craig Citroe633be12015-03-02 13:40:36 -0800441 "targetLink": "A String", # The URI of the instance related to the operation.
442 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000443 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
444 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800445 "errors": [ # The list of errors encountered while processing this operation.
446 { # Database instance operation error.
447 "kind": "sql#operationError", # This is always sql#operationError.
448 "code": "A String", # Identifies the specific error that occurred.
449 "message": "A String", # Additional information about the error encountered.
450 },
451 ],
452 },
453 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
454 "selfLink": "A String", # The URI of this resource.
455 "user": "A String", # The email address of the user who initiated this operation.
456 }</pre>
457</div>
458
459<div class="method">
460 <code class="details" id="get">get(project, instance)</code>
461 <pre>Retrieves a resource containing information about a Cloud SQL instance.
462
463Args:
464 project: string, Project ID of the project that contains the instance. (required)
465 instance: string, Database instance ID. This does not include the project ID. (required)
466
467Returns:
468 An object of the form:
469
470 { # A Cloud SQL instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000471 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
472 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
473 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
474 },
Craig Citroe633be12015-03-02 13:40:36 -0800475 "kind": "sql#instance", # This is always sql#instance.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800476 "failoverReplica": { # The name and status of the failover replica. Only applies to Second Generation instances.
477 "available": True or False,
478 "name": "A String",
479 },
Craig Citroe633be12015-03-02 13:40:36 -0800480 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000481 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
482 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800483 "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.
484 # Only one replica can be specified as failover target, and the replica has to be in different zone with the master instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000485 "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.
486 "username": "A String", # The username for the replication connection.
487 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
488 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
489 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
490 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
491 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
492 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
493 "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.
494 "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.
495 "password": "A String", # The password for the replication connection.
496 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
497 },
498 },
499 "replicaNames": [ # The replicas of the instance.
500 "A String",
501 ],
502 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
503 "region": "A String", # The geographical region. Can be us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -0800504 "serverCaCert": { # SslCerts Resource # SSL configuration.
505 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
506 "kind": "sql#sslCert", # This is always sql#sslCert.
507 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
508 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
509 "instance": "A String", # Name of the database instance.
510 "cert": "A String", # PEM representation.
511 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
512 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000513 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800514 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000515 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800516 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000517 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
518 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
519 # RUNNABLE: The instance is running, or is ready to run when accessed.
520 # SUSPENDED: The instance is not available, for example due to problems with billing.
521 # PENDING_CREATE: The instance is being created.
522 # MAINTENANCE: The instance is down for maintenance.
523 # FAILED: The instance creation failed.
524 # UNKNOWN_STATE: The state of the instance is unknown.
525 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
526 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
527 "ipAddresses": [ # The assigned IP addresses for the instance.
528 { # Database instance IP Mapping.
529 "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.
530 "ipAddress": "A String", # The IP address assigned.
531 },
Craig Citroe633be12015-03-02 13:40:36 -0800532 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000533 "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -0800534 "settings": { # Database instance settings. # The user settings.
535 "databaseFlags": [ # The database flags passed to the instance at startup.
536 { # MySQL flags for Cloud SQL instances.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000537 "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.
538 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800539 },
540 ],
541 "kind": "sql#settings", # This is always sql#settings.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800542 "dataDiskType": "A String", # The type of data disk. Only supported for 2nd Generation instances. The default type is SSD.
543 "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.
544 "kind": "sql#maintenanceWindow", # This is always sql#maintenanceWindow.
545 "updateTrack": "A String",
546 "day": 42, # day of week (1-7), starting on Monday.
547 "hour": 42, # hour of day - 0 to 23.
548 },
Craig Citroe633be12015-03-02 13:40:36 -0800549 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
550 "A String",
551 ],
552 "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
553 # ALWAYS: The instance should always be active.
554 # NEVER: The instance should never be activated.
555 # ON_DEMAND: The instance is activated upon receiving requests.
556 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
557 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
558 "enabled": True or False, # Whether this configuration is enabled.
559 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
560 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
561 },
562 "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.
563 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
564 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
565 "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).
566 { # An entry for an Access Control list.
567 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
568 "kind": "sql#aclEntry", # This is always sql#aclEntry.
569 "value": "A String", # The whitelisted value for the access control list.
570 "name": "A String", # An optional label to identify this entry.
571 },
572 ],
573 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000574 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
Craig Citroe633be12015-03-02 13:40:36 -0800575 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
576 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000577 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled.
Craig Citroe633be12015-03-02 13:40:36 -0800578 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
579 "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.
580 "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.
581 "kind": "sql#locationPreference", # This is always sql#locationPreference.
582 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
583 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
584 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800585 "dataDiskSizeGb": "A String", # The size of data disk, in GB. Only supported for 2nd Generation instances. The data disk size minimum is 10GB.
Craig Citroe633be12015-03-02 13:40:36 -0800586 },
Craig Citroe633be12015-03-02 13:40:36 -0800587 "instanceType": "A String", # The instance type. This can be one of the following.
588 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000589 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
Craig Citroe633be12015-03-02 13:40:36 -0800590 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
591 "selfLink": "A String", # The URI of this resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800592 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
Craig Citroe633be12015-03-02 13:40:36 -0800593 }</pre>
594</div>
595
596<div class="method">
597 <code class="details" id="import_">import_(project, instance, body)</code>
598 <pre>Imports data into a Cloud SQL instance from a MySQL dump file in Google Cloud Storage.
599
600Args:
601 project: string, Project ID of the project that contains the instance. (required)
602 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
603 body: object, The request body. (required)
604 The object takes the form of:
605
606{ # Database instance import request.
607 "importContext": { # Database instance import context. # Contains details about the import operation.
608 "fileType": "A String", # The file type for the specified uri.
609 # SQL: The file contains SQL statements.
610 # CSV: The file contains CSV data.
611 "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.
612 "kind": "sql#importContext", # This is always sql#importContext.
613 "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.
614 "csvImportOptions": { # Options for importing data as CSV.
615 "table": "A String", # The table to which CSV data is imported.
616 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
617 "A String",
618 ],
619 },
620 },
621 }
622
623
624Returns:
625 An object of the form:
626
627 { # 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.
628 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
629 "importContext": { # Database instance import context. # The context for import operation, if applicable.
630 "fileType": "A String", # The file type for the specified uri.
631 # SQL: The file contains SQL statements.
632 # CSV: The file contains CSV data.
633 "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.
634 "kind": "sql#importContext", # This is always sql#importContext.
635 "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.
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 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000643 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800644 "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.
645 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
646 "kind": "sql#exportContext", # This is always sql#exportContext.
647 "fileType": "A String", # The file type for the specified uri.
648 # SQL: The file contains SQL statements.
649 # CSV: The file contains CSV data.
650 "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.
651 "csvExportOptions": { # Options for exporting data as CSV.
652 "selectQuery": "A String", # The select query used to extract the data.
653 },
654 "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.
655 "A String",
656 ],
657 "sqlExportOptions": { # Options for exporting data as SQL statements.
658 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
659 "A String",
660 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800661 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800662 },
663 },
664 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
665 "targetProject": "A String", # The project ID of the target instance related to this operation.
666 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000667 "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 .
Craig Citroe633be12015-03-02 13:40:36 -0800668 "targetLink": "A String", # The URI of the instance related to the operation.
669 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000670 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
671 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800672 "errors": [ # The list of errors encountered while processing this operation.
673 { # Database instance operation error.
674 "kind": "sql#operationError", # This is always sql#operationError.
675 "code": "A String", # Identifies the specific error that occurred.
676 "message": "A String", # Additional information about the error encountered.
677 },
678 ],
679 },
680 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
681 "selfLink": "A String", # The URI of this resource.
682 "user": "A String", # The email address of the user who initiated this operation.
683 }</pre>
684</div>
685
686<div class="method">
687 <code class="details" id="insert">insert(project, body)</code>
688 <pre>Creates a new Cloud SQL instance.
689
690Args:
691 project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required)
692 body: object, The request body. (required)
693 The object takes the form of:
694
695{ # A Cloud SQL instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000696 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
697 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
698 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
699 },
Craig Citroe633be12015-03-02 13:40:36 -0800700 "kind": "sql#instance", # This is always sql#instance.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800701 "failoverReplica": { # The name and status of the failover replica. Only applies to Second Generation instances.
702 "available": True or False,
703 "name": "A String",
704 },
Craig Citroe633be12015-03-02 13:40:36 -0800705 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000706 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
707 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800708 "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.
709 # Only one replica can be specified as failover target, and the replica has to be in different zone with the master instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000710 "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.
711 "username": "A String", # The username for the replication connection.
712 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
713 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
714 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
715 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
716 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
717 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
718 "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.
719 "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.
720 "password": "A String", # The password for the replication connection.
721 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
722 },
723 },
724 "replicaNames": [ # The replicas of the instance.
725 "A String",
726 ],
727 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
728 "region": "A String", # The geographical region. Can be us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -0800729 "serverCaCert": { # SslCerts Resource # SSL configuration.
730 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
731 "kind": "sql#sslCert", # This is always sql#sslCert.
732 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
733 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
734 "instance": "A String", # Name of the database instance.
735 "cert": "A String", # PEM representation.
736 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
737 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000738 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800739 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000740 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800741 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000742 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
743 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
744 # RUNNABLE: The instance is running, or is ready to run when accessed.
745 # SUSPENDED: The instance is not available, for example due to problems with billing.
746 # PENDING_CREATE: The instance is being created.
747 # MAINTENANCE: The instance is down for maintenance.
748 # FAILED: The instance creation failed.
749 # UNKNOWN_STATE: The state of the instance is unknown.
750 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
751 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
752 "ipAddresses": [ # The assigned IP addresses for the instance.
753 { # Database instance IP Mapping.
754 "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.
755 "ipAddress": "A String", # The IP address assigned.
756 },
Craig Citroe633be12015-03-02 13:40:36 -0800757 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000758 "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -0800759 "settings": { # Database instance settings. # The user settings.
760 "databaseFlags": [ # The database flags passed to the instance at startup.
761 { # MySQL flags for Cloud SQL instances.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000762 "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.
763 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800764 },
765 ],
766 "kind": "sql#settings", # This is always sql#settings.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800767 "dataDiskType": "A String", # The type of data disk. Only supported for 2nd Generation instances. The default type is SSD.
768 "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.
769 "kind": "sql#maintenanceWindow", # This is always sql#maintenanceWindow.
770 "updateTrack": "A String",
771 "day": 42, # day of week (1-7), starting on Monday.
772 "hour": 42, # hour of day - 0 to 23.
773 },
Craig Citroe633be12015-03-02 13:40:36 -0800774 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
775 "A String",
776 ],
777 "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
778 # ALWAYS: The instance should always be active.
779 # NEVER: The instance should never be activated.
780 # ON_DEMAND: The instance is activated upon receiving requests.
781 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
782 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
783 "enabled": True or False, # Whether this configuration is enabled.
784 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
785 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
786 },
787 "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.
788 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
789 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
790 "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).
791 { # An entry for an Access Control list.
792 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
793 "kind": "sql#aclEntry", # This is always sql#aclEntry.
794 "value": "A String", # The whitelisted value for the access control list.
795 "name": "A String", # An optional label to identify this entry.
796 },
797 ],
798 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000799 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
Craig Citroe633be12015-03-02 13:40:36 -0800800 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
801 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000802 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled.
Craig Citroe633be12015-03-02 13:40:36 -0800803 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
804 "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.
805 "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.
806 "kind": "sql#locationPreference", # This is always sql#locationPreference.
807 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
808 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
809 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800810 "dataDiskSizeGb": "A String", # The size of data disk, in GB. Only supported for 2nd Generation instances. The data disk size minimum is 10GB.
Craig Citroe633be12015-03-02 13:40:36 -0800811 },
Craig Citroe633be12015-03-02 13:40:36 -0800812 "instanceType": "A String", # The instance type. This can be one of the following.
813 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000814 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
Craig Citroe633be12015-03-02 13:40:36 -0800815 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
816 "selfLink": "A String", # The URI of this resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800817 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
Craig Citroe633be12015-03-02 13:40:36 -0800818 }
819
820
821Returns:
822 An object of the form:
823
824 { # 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.
825 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
826 "importContext": { # Database instance import context. # The context for import operation, if applicable.
827 "fileType": "A String", # The file type for the specified uri.
828 # SQL: The file contains SQL statements.
829 # CSV: The file contains CSV data.
830 "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.
831 "kind": "sql#importContext", # This is always sql#importContext.
832 "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.
833 "csvImportOptions": { # Options for importing data as CSV.
834 "table": "A String", # The table to which CSV data is imported.
835 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
836 "A String",
837 ],
838 },
839 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000840 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800841 "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.
842 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
843 "kind": "sql#exportContext", # This is always sql#exportContext.
844 "fileType": "A String", # The file type for the specified uri.
845 # SQL: The file contains SQL statements.
846 # CSV: The file contains CSV data.
847 "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.
848 "csvExportOptions": { # Options for exporting data as CSV.
849 "selectQuery": "A String", # The select query used to extract the data.
850 },
851 "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.
852 "A String",
853 ],
854 "sqlExportOptions": { # Options for exporting data as SQL statements.
855 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
856 "A String",
857 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800858 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800859 },
860 },
861 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
862 "targetProject": "A String", # The project ID of the target instance related to this operation.
863 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000864 "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 .
Craig Citroe633be12015-03-02 13:40:36 -0800865 "targetLink": "A String", # The URI of the instance related to the operation.
866 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000867 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
868 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800869 "errors": [ # The list of errors encountered while processing this operation.
870 { # Database instance operation error.
871 "kind": "sql#operationError", # This is always sql#operationError.
872 "code": "A String", # Identifies the specific error that occurred.
873 "message": "A String", # Additional information about the error encountered.
874 },
875 ],
876 },
877 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
878 "selfLink": "A String", # The URI of this resource.
879 "user": "A String", # The email address of the user who initiated this operation.
880 }</pre>
881</div>
882
883<div class="method">
884 <code class="details" id="list">list(project, pageToken=None, maxResults=None)</code>
885 <pre>Lists instances under a given project in the alphabetical order of the instance name.
886
887Args:
888 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
889 pageToken: string, A previously-returned page token representing part of the larger set of results to view.
890 maxResults: integer, The maximum number of results to return per response.
891
892Returns:
893 An object of the form:
894
895 { # Database instances list response.
896 "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.
897 "items": [ # List of database instance resources.
898 { # A Cloud SQL instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000899 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
900 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
901 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
902 },
Craig Citroe633be12015-03-02 13:40:36 -0800903 "kind": "sql#instance", # This is always sql#instance.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800904 "failoverReplica": { # The name and status of the failover replica. Only applies to Second Generation instances.
905 "available": True or False,
906 "name": "A String",
907 },
Craig Citroe633be12015-03-02 13:40:36 -0800908 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000909 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
910 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800911 "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.
912 # Only one replica can be specified as failover target, and the replica has to be in different zone with the master instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000913 "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.
914 "username": "A String", # The username for the replication connection.
915 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
916 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
917 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
918 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
919 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
920 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
921 "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.
922 "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.
923 "password": "A String", # The password for the replication connection.
924 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
925 },
926 },
927 "replicaNames": [ # The replicas of the instance.
928 "A String",
929 ],
930 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
931 "region": "A String", # The geographical region. Can be us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -0800932 "serverCaCert": { # SslCerts Resource # SSL configuration.
933 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
934 "kind": "sql#sslCert", # This is always sql#sslCert.
935 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
936 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
937 "instance": "A String", # Name of the database instance.
938 "cert": "A String", # PEM representation.
939 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
940 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000941 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800942 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000943 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800944 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000945 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
946 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
947 # RUNNABLE: The instance is running, or is ready to run when accessed.
948 # SUSPENDED: The instance is not available, for example due to problems with billing.
949 # PENDING_CREATE: The instance is being created.
950 # MAINTENANCE: The instance is down for maintenance.
951 # FAILED: The instance creation failed.
952 # UNKNOWN_STATE: The state of the instance is unknown.
953 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
954 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
955 "ipAddresses": [ # The assigned IP addresses for the instance.
956 { # Database instance IP Mapping.
957 "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.
958 "ipAddress": "A String", # The IP address assigned.
959 },
Craig Citroe633be12015-03-02 13:40:36 -0800960 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000961 "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -0800962 "settings": { # Database instance settings. # The user settings.
963 "databaseFlags": [ # The database flags passed to the instance at startup.
964 { # MySQL flags for Cloud SQL instances.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000965 "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.
966 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800967 },
968 ],
969 "kind": "sql#settings", # This is always sql#settings.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800970 "dataDiskType": "A String", # The type of data disk. Only supported for 2nd Generation instances. The default type is SSD.
971 "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.
972 "kind": "sql#maintenanceWindow", # This is always sql#maintenanceWindow.
973 "updateTrack": "A String",
974 "day": 42, # day of week (1-7), starting on Monday.
975 "hour": 42, # hour of day - 0 to 23.
976 },
Craig Citroe633be12015-03-02 13:40:36 -0800977 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
978 "A String",
979 ],
980 "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
981 # ALWAYS: The instance should always be active.
982 # NEVER: The instance should never be activated.
983 # ON_DEMAND: The instance is activated upon receiving requests.
984 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
985 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
986 "enabled": True or False, # Whether this configuration is enabled.
987 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
988 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
989 },
990 "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.
991 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
992 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
993 "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).
994 { # An entry for an Access Control list.
995 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
996 "kind": "sql#aclEntry", # This is always sql#aclEntry.
997 "value": "A String", # The whitelisted value for the access control list.
998 "name": "A String", # An optional label to identify this entry.
999 },
1000 ],
1001 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001002 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
Craig Citroe633be12015-03-02 13:40:36 -08001003 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1004 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001005 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled.
Craig Citroe633be12015-03-02 13:40:36 -08001006 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
1007 "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.
1008 "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.
1009 "kind": "sql#locationPreference", # This is always sql#locationPreference.
1010 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
1011 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
1012 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001013 "dataDiskSizeGb": "A String", # The size of data disk, in GB. Only supported for 2nd Generation instances. The data disk size minimum is 10GB.
Craig Citroe633be12015-03-02 13:40:36 -08001014 },
Craig Citroe633be12015-03-02 13:40:36 -08001015 "instanceType": "A String", # The instance type. This can be one of the following.
1016 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001017 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
Craig Citroe633be12015-03-02 13:40:36 -08001018 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
1019 "selfLink": "A String", # The URI of this resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001020 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
Craig Citroe633be12015-03-02 13:40:36 -08001021 },
1022 ],
1023 "kind": "sql#instancesList", # This is always sql#instancesList.
1024 }</pre>
1025</div>
1026
1027<div class="method">
1028 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1029 <pre>Retrieves the next page of results.
1030
1031Args:
1032 previous_request: The request for the previous page. (required)
1033 previous_response: The response from the request for the previous page. (required)
1034
1035Returns:
1036 A request object that you can call 'execute()' on to request the next
1037 page. Returns None if there are no more items in the collection.
1038 </pre>
1039</div>
1040
1041<div class="method">
1042 <code class="details" id="patch">patch(project, instance, body)</code>
1043 <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.
1044
1045Args:
1046 project: string, Project ID of the project that contains the instance. (required)
1047 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1048 body: object, The request body. (required)
1049 The object takes the form of:
1050
1051{ # A Cloud SQL instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001052 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
1053 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
1054 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
1055 },
Craig Citroe633be12015-03-02 13:40:36 -08001056 "kind": "sql#instance", # This is always sql#instance.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001057 "failoverReplica": { # The name and status of the failover replica. Only applies to Second Generation instances.
1058 "available": True or False,
1059 "name": "A String",
1060 },
Craig Citroe633be12015-03-02 13:40:36 -08001061 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001062 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
1063 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001064 "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.
1065 # Only one replica can be specified as failover target, and the replica has to be in different zone with the master instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001066 "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.
1067 "username": "A String", # The username for the replication connection.
1068 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
1069 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
1070 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
1071 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
1072 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
1073 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
1074 "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.
1075 "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.
1076 "password": "A String", # The password for the replication connection.
1077 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
1078 },
1079 },
1080 "replicaNames": [ # The replicas of the instance.
1081 "A String",
1082 ],
1083 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
1084 "region": "A String", # The geographical region. Can be us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -08001085 "serverCaCert": { # SslCerts Resource # SSL configuration.
1086 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
1087 "kind": "sql#sslCert", # This is always sql#sslCert.
1088 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
1089 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1090 "instance": "A String", # Name of the database instance.
1091 "cert": "A String", # PEM representation.
1092 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1093 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001094 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -08001095 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001096 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001097 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001098 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
1099 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
1100 # RUNNABLE: The instance is running, or is ready to run when accessed.
1101 # SUSPENDED: The instance is not available, for example due to problems with billing.
1102 # PENDING_CREATE: The instance is being created.
1103 # MAINTENANCE: The instance is down for maintenance.
1104 # FAILED: The instance creation failed.
1105 # UNKNOWN_STATE: The state of the instance is unknown.
1106 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
1107 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
1108 "ipAddresses": [ # The assigned IP addresses for the instance.
1109 { # Database instance IP Mapping.
1110 "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.
1111 "ipAddress": "A String", # The IP address assigned.
1112 },
Craig Citroe633be12015-03-02 13:40:36 -08001113 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001114 "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -08001115 "settings": { # Database instance settings. # The user settings.
1116 "databaseFlags": [ # The database flags passed to the instance at startup.
1117 { # MySQL flags for Cloud SQL instances.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001118 "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.
1119 "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.
Craig Citroe633be12015-03-02 13:40:36 -08001120 },
1121 ],
1122 "kind": "sql#settings", # This is always sql#settings.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001123 "dataDiskType": "A String", # The type of data disk. Only supported for 2nd Generation instances. The default type is SSD.
1124 "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.
1125 "kind": "sql#maintenanceWindow", # This is always sql#maintenanceWindow.
1126 "updateTrack": "A String",
1127 "day": 42, # day of week (1-7), starting on Monday.
1128 "hour": 42, # hour of day - 0 to 23.
1129 },
Craig Citroe633be12015-03-02 13:40:36 -08001130 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
1131 "A String",
1132 ],
1133 "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
1134 # ALWAYS: The instance should always be active.
1135 # NEVER: The instance should never be activated.
1136 # ON_DEMAND: The instance is activated upon receiving requests.
1137 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
1138 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
1139 "enabled": True or False, # Whether this configuration is enabled.
1140 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
1141 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
1142 },
1143 "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.
1144 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
1145 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
1146 "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).
1147 { # An entry for an Access Control list.
1148 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1149 "kind": "sql#aclEntry", # This is always sql#aclEntry.
1150 "value": "A String", # The whitelisted value for the access control list.
1151 "name": "A String", # An optional label to identify this entry.
1152 },
1153 ],
1154 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001155 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
Craig Citroe633be12015-03-02 13:40:36 -08001156 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1157 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001158 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled.
Craig Citroe633be12015-03-02 13:40:36 -08001159 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
1160 "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.
1161 "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.
1162 "kind": "sql#locationPreference", # This is always sql#locationPreference.
1163 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
1164 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
1165 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001166 "dataDiskSizeGb": "A String", # The size of data disk, in GB. Only supported for 2nd Generation instances. The data disk size minimum is 10GB.
Craig Citroe633be12015-03-02 13:40:36 -08001167 },
Craig Citroe633be12015-03-02 13:40:36 -08001168 "instanceType": "A String", # The instance type. This can be one of the following.
1169 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001170 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
Craig Citroe633be12015-03-02 13:40:36 -08001171 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
1172 "selfLink": "A String", # The URI of this resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001173 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
Craig Citroe633be12015-03-02 13:40:36 -08001174 }
1175
1176
1177Returns:
1178 An object of the form:
1179
1180 { # 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.
1181 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1182 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1183 "fileType": "A String", # The file type for the specified uri.
1184 # SQL: The file contains SQL statements.
1185 # CSV: The file contains CSV data.
1186 "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.
1187 "kind": "sql#importContext", # This is always sql#importContext.
1188 "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.
1189 "csvImportOptions": { # Options for importing data as CSV.
1190 "table": "A String", # The table to which CSV data is imported.
1191 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1192 "A String",
1193 ],
1194 },
1195 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001196 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001197 "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.
1198 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1199 "kind": "sql#exportContext", # This is always sql#exportContext.
1200 "fileType": "A String", # The file type for the specified uri.
1201 # SQL: The file contains SQL statements.
1202 # CSV: The file contains CSV data.
1203 "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.
1204 "csvExportOptions": { # Options for exporting data as CSV.
1205 "selectQuery": "A String", # The select query used to extract the data.
1206 },
1207 "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.
1208 "A String",
1209 ],
1210 "sqlExportOptions": { # Options for exporting data as SQL statements.
1211 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1212 "A String",
1213 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001214 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08001215 },
1216 },
1217 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1218 "targetProject": "A String", # The project ID of the target instance related to this operation.
1219 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001220 "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 .
Craig Citroe633be12015-03-02 13:40:36 -08001221 "targetLink": "A String", # The URI of the instance related to the operation.
1222 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001223 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1224 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001225 "errors": [ # The list of errors encountered while processing this operation.
1226 { # Database instance operation error.
1227 "kind": "sql#operationError", # This is always sql#operationError.
1228 "code": "A String", # Identifies the specific error that occurred.
1229 "message": "A String", # Additional information about the error encountered.
1230 },
1231 ],
1232 },
1233 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1234 "selfLink": "A String", # The URI of this resource.
1235 "user": "A String", # The email address of the user who initiated this operation.
1236 }</pre>
1237</div>
1238
1239<div class="method">
1240 <code class="details" id="promoteReplica">promoteReplica(project, instance)</code>
1241 <pre>Promotes the read replica instance to be a stand-alone Cloud SQL instance.
1242
1243Args:
1244 project: string, ID of the project that contains the read replica. (required)
1245 instance: string, Cloud SQL read replica instance name. (required)
1246
1247Returns:
1248 An object of the form:
1249
1250 { # 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.
1251 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1252 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1253 "fileType": "A String", # The file type for the specified uri.
1254 # SQL: The file contains SQL statements.
1255 # CSV: The file contains CSV data.
1256 "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.
1257 "kind": "sql#importContext", # This is always sql#importContext.
1258 "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.
1259 "csvImportOptions": { # Options for importing data as CSV.
1260 "table": "A String", # The table to which CSV data is imported.
1261 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1262 "A String",
1263 ],
1264 },
1265 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001266 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001267 "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.
1268 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1269 "kind": "sql#exportContext", # This is always sql#exportContext.
1270 "fileType": "A String", # The file type for the specified uri.
1271 # SQL: The file contains SQL statements.
1272 # CSV: The file contains CSV data.
1273 "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.
1274 "csvExportOptions": { # Options for exporting data as CSV.
1275 "selectQuery": "A String", # The select query used to extract the data.
1276 },
1277 "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.
1278 "A String",
1279 ],
1280 "sqlExportOptions": { # Options for exporting data as SQL statements.
1281 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1282 "A String",
1283 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001284 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08001285 },
1286 },
1287 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1288 "targetProject": "A String", # The project ID of the target instance related to this operation.
1289 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001290 "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 .
Craig Citroe633be12015-03-02 13:40:36 -08001291 "targetLink": "A String", # The URI of the instance related to the operation.
1292 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001293 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1294 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001295 "errors": [ # The list of errors encountered while processing this operation.
1296 { # Database instance operation error.
1297 "kind": "sql#operationError", # This is always sql#operationError.
1298 "code": "A String", # Identifies the specific error that occurred.
1299 "message": "A String", # Additional information about the error encountered.
1300 },
1301 ],
1302 },
1303 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1304 "selfLink": "A String", # The URI of this resource.
1305 "user": "A String", # The email address of the user who initiated this operation.
1306 }</pre>
1307</div>
1308
1309<div class="method">
1310 <code class="details" id="resetSslConfig">resetSslConfig(project, instance)</code>
1311 <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.
1312
1313Args:
1314 project: string, Project ID of the project that contains the instance. (required)
1315 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1316
1317Returns:
1318 An object of the form:
1319
1320 { # 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.
1321 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1322 "importContext": { # Database instance import context. # The context for import operation, if applicable.
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 "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.
1327 "kind": "sql#importContext", # This is always sql#importContext.
1328 "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.
1329 "csvImportOptions": { # Options for importing data as CSV.
1330 "table": "A String", # The table to which CSV data is imported.
1331 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1332 "A String",
1333 ],
1334 },
1335 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001336 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001337 "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.
1338 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1339 "kind": "sql#exportContext", # This is always sql#exportContext.
1340 "fileType": "A String", # The file type for the specified uri.
1341 # SQL: The file contains SQL statements.
1342 # CSV: The file contains CSV data.
1343 "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.
1344 "csvExportOptions": { # Options for exporting data as CSV.
1345 "selectQuery": "A String", # The select query used to extract the data.
1346 },
1347 "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.
1348 "A String",
1349 ],
1350 "sqlExportOptions": { # Options for exporting data as SQL statements.
1351 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1352 "A String",
1353 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001354 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08001355 },
1356 },
1357 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1358 "targetProject": "A String", # The project ID of the target instance related to this operation.
1359 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001360 "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 .
Craig Citroe633be12015-03-02 13:40:36 -08001361 "targetLink": "A String", # The URI of the instance related to the operation.
1362 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001363 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1364 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001365 "errors": [ # The list of errors encountered while processing this operation.
1366 { # Database instance operation error.
1367 "kind": "sql#operationError", # This is always sql#operationError.
1368 "code": "A String", # Identifies the specific error that occurred.
1369 "message": "A String", # Additional information about the error encountered.
1370 },
1371 ],
1372 },
1373 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1374 "selfLink": "A String", # The URI of this resource.
1375 "user": "A String", # The email address of the user who initiated this operation.
1376 }</pre>
1377</div>
1378
1379<div class="method">
1380 <code class="details" id="restart">restart(project, instance)</code>
1381 <pre>Restarts a Cloud SQL instance.
1382
1383Args:
1384 project: string, Project ID of the project that contains the instance to be restarted. (required)
1385 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1386
1387Returns:
1388 An object of the form:
1389
1390 { # 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.
1391 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1392 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1393 "fileType": "A String", # The file type for the specified uri.
1394 # SQL: The file contains SQL statements.
1395 # CSV: The file contains CSV data.
1396 "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.
1397 "kind": "sql#importContext", # This is always sql#importContext.
1398 "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.
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 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001406 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001407 "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 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001424 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08001425 },
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.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001430 "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 .
Craig Citroe633be12015-03-02 13:40:36 -08001431 "targetLink": "A String", # The URI of the instance related to the operation.
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.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001433 "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.
Craig Citroe633be12015-03-02 13:40:36 -08001435 "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="restoreBackup">restoreBackup(project, instance, body)</code>
1451 <pre>Restores a backup of a Cloud SQL instance.
1452
1453Args:
1454 project: string, Project ID of the project that contains the instance. (required)
1455 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1456 body: object, The request body. (required)
1457 The object takes the form of:
1458
1459{ # Database instance restore backup request.
1460 "restoreBackupContext": { # Database instance restore from backup context. # Parameters required to perform the restore backup operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001461 "instanceId": "A String", # The ID of the instance that the backup was taken from.
Craig Citroe633be12015-03-02 13:40:36 -08001462 "kind": "sql#restoreBackupContext", # This is always sql#restoreBackupContext.
1463 "backupRunId": "A String", # The ID of the backup run to restore from.
1464 },
1465 }
1466
1467
1468Returns:
1469 An object of the form:
1470
1471 { # 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.
1472 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1473 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1474 "fileType": "A String", # The file type for the specified uri.
1475 # SQL: The file contains SQL statements.
1476 # CSV: The file contains CSV data.
1477 "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.
1478 "kind": "sql#importContext", # This is always sql#importContext.
1479 "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.
1480 "csvImportOptions": { # Options for importing data as CSV.
1481 "table": "A String", # The table to which CSV data is imported.
1482 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1483 "A String",
1484 ],
1485 },
1486 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001487 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001488 "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.
1489 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1490 "kind": "sql#exportContext", # This is always sql#exportContext.
1491 "fileType": "A String", # The file type for the specified uri.
1492 # SQL: The file contains SQL statements.
1493 # CSV: The file contains CSV data.
1494 "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.
1495 "csvExportOptions": { # Options for exporting data as CSV.
1496 "selectQuery": "A String", # The select query used to extract the data.
1497 },
1498 "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.
1499 "A String",
1500 ],
1501 "sqlExportOptions": { # Options for exporting data as SQL statements.
1502 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1503 "A String",
1504 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001505 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08001506 },
1507 },
1508 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1509 "targetProject": "A String", # The project ID of the target instance related to this operation.
1510 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001511 "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 .
Craig Citroe633be12015-03-02 13:40:36 -08001512 "targetLink": "A String", # The URI of the instance related to the operation.
1513 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001514 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1515 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001516 "errors": [ # The list of errors encountered while processing this operation.
1517 { # Database instance operation error.
1518 "kind": "sql#operationError", # This is always sql#operationError.
1519 "code": "A String", # Identifies the specific error that occurred.
1520 "message": "A String", # Additional information about the error encountered.
1521 },
1522 ],
1523 },
1524 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1525 "selfLink": "A String", # The URI of this resource.
1526 "user": "A String", # The email address of the user who initiated this operation.
1527 }</pre>
1528</div>
1529
1530<div class="method">
1531 <code class="details" id="startReplica">startReplica(project, instance)</code>
1532 <pre>Starts the replication in the read replica instance.
1533
1534Args:
1535 project: string, ID of the project that contains the read replica. (required)
1536 instance: string, Cloud SQL read replica instance name. (required)
1537
1538Returns:
1539 An object of the form:
1540
1541 { # 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.
1542 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1543 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1544 "fileType": "A String", # The file type for the specified uri.
1545 # SQL: The file contains SQL statements.
1546 # CSV: The file contains CSV data.
1547 "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.
1548 "kind": "sql#importContext", # This is always sql#importContext.
1549 "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.
1550 "csvImportOptions": { # Options for importing data as CSV.
1551 "table": "A String", # The table to which CSV data is imported.
1552 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1553 "A String",
1554 ],
1555 },
1556 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001557 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001558 "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.
1559 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1560 "kind": "sql#exportContext", # This is always sql#exportContext.
1561 "fileType": "A String", # The file type for the specified uri.
1562 # SQL: The file contains SQL statements.
1563 # CSV: The file contains CSV data.
1564 "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.
1565 "csvExportOptions": { # Options for exporting data as CSV.
1566 "selectQuery": "A String", # The select query used to extract the data.
1567 },
1568 "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.
1569 "A String",
1570 ],
1571 "sqlExportOptions": { # Options for exporting data as SQL statements.
1572 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1573 "A String",
1574 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001575 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08001576 },
1577 },
1578 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1579 "targetProject": "A String", # The project ID of the target instance related to this operation.
1580 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001581 "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 .
Craig Citroe633be12015-03-02 13:40:36 -08001582 "targetLink": "A String", # The URI of the instance related to the operation.
1583 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001584 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1585 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001586 "errors": [ # The list of errors encountered while processing this operation.
1587 { # Database instance operation error.
1588 "kind": "sql#operationError", # This is always sql#operationError.
1589 "code": "A String", # Identifies the specific error that occurred.
1590 "message": "A String", # Additional information about the error encountered.
1591 },
1592 ],
1593 },
1594 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1595 "selfLink": "A String", # The URI of this resource.
1596 "user": "A String", # The email address of the user who initiated this operation.
1597 }</pre>
1598</div>
1599
1600<div class="method">
1601 <code class="details" id="stopReplica">stopReplica(project, instance)</code>
1602 <pre>Stops the replication in the read replica instance.
1603
1604Args:
1605 project: string, ID of the project that contains the read replica. (required)
1606 instance: string, Cloud SQL read replica instance name. (required)
1607
1608Returns:
1609 An object of the form:
1610
1611 { # 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.
1612 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1613 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1614 "fileType": "A String", # The file type for the specified uri.
1615 # SQL: The file contains SQL statements.
1616 # CSV: The file contains CSV data.
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 "kind": "sql#importContext", # This is always sql#importContext.
1619 "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.
1620 "csvImportOptions": { # Options for importing data as CSV.
1621 "table": "A String", # The table to which CSV data is imported.
1622 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1623 "A String",
1624 ],
1625 },
1626 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001627 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001628 "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.
1629 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1630 "kind": "sql#exportContext", # This is always sql#exportContext.
1631 "fileType": "A String", # The file type for the specified uri.
1632 # SQL: The file contains SQL statements.
1633 # CSV: The file contains CSV data.
1634 "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.
1635 "csvExportOptions": { # Options for exporting data as CSV.
1636 "selectQuery": "A String", # The select query used to extract the data.
1637 },
1638 "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.
1639 "A String",
1640 ],
1641 "sqlExportOptions": { # Options for exporting data as SQL statements.
1642 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1643 "A String",
1644 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001645 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08001646 },
1647 },
1648 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1649 "targetProject": "A String", # The project ID of the target instance related to this operation.
1650 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001651 "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 .
Craig Citroe633be12015-03-02 13:40:36 -08001652 "targetLink": "A String", # The URI of the instance related to the operation.
1653 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001654 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1655 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001656 "errors": [ # The list of errors encountered while processing this operation.
1657 { # Database instance operation error.
1658 "kind": "sql#operationError", # This is always sql#operationError.
1659 "code": "A String", # Identifies the specific error that occurred.
1660 "message": "A String", # Additional information about the error encountered.
1661 },
1662 ],
1663 },
1664 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1665 "selfLink": "A String", # The URI of this resource.
1666 "user": "A String", # The email address of the user who initiated this operation.
1667 }</pre>
1668</div>
1669
1670<div class="method">
1671 <code class="details" id="update">update(project, instance, body)</code>
1672 <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.
1673
1674Args:
1675 project: string, Project ID of the project that contains the instance. (required)
1676 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1677 body: object, The request body. (required)
1678 The object takes the form of:
1679
1680{ # A Cloud SQL instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001681 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
1682 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
1683 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
1684 },
Craig Citroe633be12015-03-02 13:40:36 -08001685 "kind": "sql#instance", # This is always sql#instance.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001686 "failoverReplica": { # The name and status of the failover replica. Only applies to Second Generation instances.
1687 "available": True or False,
1688 "name": "A String",
1689 },
Craig Citroe633be12015-03-02 13:40:36 -08001690 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001691 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
1692 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001693 "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.
1694 # Only one replica can be specified as failover target, and the replica has to be in different zone with the master instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001695 "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.
1696 "username": "A String", # The username for the replication connection.
1697 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
1698 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
1699 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
1700 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
1701 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
1702 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
1703 "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.
1704 "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.
1705 "password": "A String", # The password for the replication connection.
1706 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
1707 },
1708 },
1709 "replicaNames": [ # The replicas of the instance.
1710 "A String",
1711 ],
1712 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
1713 "region": "A String", # The geographical region. Can be us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -08001714 "serverCaCert": { # SslCerts Resource # SSL configuration.
1715 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
1716 "kind": "sql#sslCert", # This is always sql#sslCert.
1717 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
1718 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1719 "instance": "A String", # Name of the database instance.
1720 "cert": "A String", # PEM representation.
1721 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1722 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001723 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -08001724 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001725 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001726 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001727 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
1728 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
1729 # RUNNABLE: The instance is running, or is ready to run when accessed.
1730 # SUSPENDED: The instance is not available, for example due to problems with billing.
1731 # PENDING_CREATE: The instance is being created.
1732 # MAINTENANCE: The instance is down for maintenance.
1733 # FAILED: The instance creation failed.
1734 # UNKNOWN_STATE: The state of the instance is unknown.
1735 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
1736 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
1737 "ipAddresses": [ # The assigned IP addresses for the instance.
1738 { # Database instance IP Mapping.
1739 "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.
1740 "ipAddress": "A String", # The IP address assigned.
1741 },
Craig Citroe633be12015-03-02 13:40:36 -08001742 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001743 "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -08001744 "settings": { # Database instance settings. # The user settings.
1745 "databaseFlags": [ # The database flags passed to the instance at startup.
1746 { # MySQL flags for Cloud SQL instances.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001747 "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.
1748 "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.
Craig Citroe633be12015-03-02 13:40:36 -08001749 },
1750 ],
1751 "kind": "sql#settings", # This is always sql#settings.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001752 "dataDiskType": "A String", # The type of data disk. Only supported for 2nd Generation instances. The default type is SSD.
1753 "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.
1754 "kind": "sql#maintenanceWindow", # This is always sql#maintenanceWindow.
1755 "updateTrack": "A String",
1756 "day": 42, # day of week (1-7), starting on Monday.
1757 "hour": 42, # hour of day - 0 to 23.
1758 },
Craig Citroe633be12015-03-02 13:40:36 -08001759 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
1760 "A String",
1761 ],
1762 "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
1763 # ALWAYS: The instance should always be active.
1764 # NEVER: The instance should never be activated.
1765 # ON_DEMAND: The instance is activated upon receiving requests.
1766 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
1767 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
1768 "enabled": True or False, # Whether this configuration is enabled.
1769 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
1770 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
1771 },
1772 "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.
1773 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
1774 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
1775 "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).
1776 { # An entry for an Access Control list.
1777 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1778 "kind": "sql#aclEntry", # This is always sql#aclEntry.
1779 "value": "A String", # The whitelisted value for the access control list.
1780 "name": "A String", # An optional label to identify this entry.
1781 },
1782 ],
1783 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001784 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
Craig Citroe633be12015-03-02 13:40:36 -08001785 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1786 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001787 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled.
Craig Citroe633be12015-03-02 13:40:36 -08001788 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
1789 "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.
1790 "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.
1791 "kind": "sql#locationPreference", # This is always sql#locationPreference.
1792 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
1793 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
1794 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001795 "dataDiskSizeGb": "A String", # The size of data disk, in GB. Only supported for 2nd Generation instances. The data disk size minimum is 10GB.
Craig Citroe633be12015-03-02 13:40:36 -08001796 },
Craig Citroe633be12015-03-02 13:40:36 -08001797 "instanceType": "A String", # The instance type. This can be one of the following.
1798 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001799 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
Craig Citroe633be12015-03-02 13:40:36 -08001800 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
1801 "selfLink": "A String", # The URI of this resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001802 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
Craig Citroe633be12015-03-02 13:40:36 -08001803 }
1804
1805
1806Returns:
1807 An object of the form:
1808
1809 { # 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.
1810 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1811 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1812 "fileType": "A String", # The file type for the specified uri.
1813 # SQL: The file contains SQL statements.
1814 # CSV: The file contains CSV data.
1815 "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.
1816 "kind": "sql#importContext", # This is always sql#importContext.
1817 "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.
1818 "csvImportOptions": { # Options for importing data as CSV.
1819 "table": "A String", # The table to which CSV data is imported.
1820 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1821 "A String",
1822 ],
1823 },
1824 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001825 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001826 "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.
1827 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1828 "kind": "sql#exportContext", # This is always sql#exportContext.
1829 "fileType": "A String", # The file type for the specified uri.
1830 # SQL: The file contains SQL statements.
1831 # CSV: The file contains CSV data.
1832 "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.
1833 "csvExportOptions": { # Options for exporting data as CSV.
1834 "selectQuery": "A String", # The select query used to extract the data.
1835 },
1836 "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.
1837 "A String",
1838 ],
1839 "sqlExportOptions": { # Options for exporting data as SQL statements.
1840 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1841 "A String",
1842 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001843 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08001844 },
1845 },
1846 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1847 "targetProject": "A String", # The project ID of the target instance related to this operation.
1848 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001849 "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 .
Craig Citroe633be12015-03-02 13:40:36 -08001850 "targetLink": "A String", # The URI of the instance related to the operation.
1851 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001852 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1853 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001854 "errors": [ # The list of errors encountered while processing this operation.
1855 { # Database instance operation error.
1856 "kind": "sql#operationError", # This is always sql#operationError.
1857 "code": "A String", # Identifies the specific error that occurred.
1858 "message": "A String", # Additional information about the error encountered.
1859 },
1860 ],
1861 },
1862 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1863 "selfLink": "A String", # The URI of this resource.
1864 "user": "A String", # The email address of the user who initiated this operation.
1865 }</pre>
1866</div>
1867
1868</body></html>