blob: f4b3ef0c8f4113c11655ac411777fdb628ae3052 [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>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070079<p class="firstline">Creates a Cloud SQL instance as a clone of the source instance. The API is not ready for Second Generation instances yet.</p>
Craig Citroe633be12015-03-02 13:40:36 -080080<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">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800126 <code><a href="#truncateLog">truncateLog(project, instance, body)</a></code></p>
127<p class="firstline">Truncate MySQL general and slow query log tables</p>
128<p class="toc_element">
Craig Citroe633be12015-03-02 13:40:36 -0800129 <code><a href="#update">update(project, instance, body)</a></code></p>
130<p class="firstline">Updates settings of a Cloud SQL instance. Caution: This is not a partial update, so you must include values for all the settings that you want to retain. For partial updates, use patch.</p>
131<h3>Method Details</h3>
132<div class="method">
133 <code class="details" id="clone">clone(project, instance, body)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700134 <pre>Creates a Cloud SQL instance as a clone of the source instance. The API is not ready for Second Generation instances yet.
Craig Citroe633be12015-03-02 13:40:36 -0800135
136Args:
137 project: string, Project ID of the source as well as the clone Cloud SQL instance. (required)
138 instance: string, The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID. (required)
139 body: object, The request body. (required)
140 The object takes the form of:
141
142{ # Database instance clone request.
143 "cloneContext": { # Database instance clone context. # Contains details about the clone operation.
144 "binLogCoordinates": { # Binary log coordinates. # Binary log coordinates, if specified, indentify the the position up to which the source instance should be cloned. If not specified, the source instance is cloned up to the most recent binary log coordintes.
145 "binLogPosition": "A String", # Position (offset) within the binary log file.
146 "kind": "sql#binLogCoordinates", # This is always sql#binLogCoordinates.
147 "binLogFileName": "A String", # Name of the binary log file for a Cloud SQL instance.
148 },
149 "kind": "sql#cloneContext", # This is always sql#cloneContext.
150 "destinationInstanceName": "A String", # Name of the Cloud SQL instance to be created as a clone.
151 },
152 }
153
154
155Returns:
156 An object of the form:
157
158 { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
159 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
160 "importContext": { # Database instance import context. # The context for import operation, if applicable.
161 "fileType": "A String", # The file type for the specified uri.
162 # SQL: The file contains SQL statements.
163 # CSV: The file contains CSV data.
164 "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.
165 "kind": "sql#importContext", # This is always sql#importContext.
166 "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
167 "csvImportOptions": { # Options for importing data as CSV.
168 "table": "A String", # The table to which CSV data is imported.
169 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
170 "A String",
171 ],
172 },
173 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000174 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800175 "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.
176 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
177 "kind": "sql#exportContext", # This is always sql#exportContext.
178 "fileType": "A String", # The file type for the specified uri.
179 # SQL: The file contains SQL statements.
180 # CSV: The file contains CSV data.
181 "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.
182 "csvExportOptions": { # Options for exporting data as CSV.
183 "selectQuery": "A String", # The select query used to extract the data.
184 },
185 "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.
186 "A String",
187 ],
188 "sqlExportOptions": { # Options for exporting data as SQL statements.
189 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
190 "A String",
191 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800192 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800193 },
194 },
195 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
196 "targetProject": "A String", # The project ID of the target instance related to this operation.
197 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000198 "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 -0800199 "targetLink": "A String", # The URI of the instance related to the operation.
200 "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 +0000201 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
202 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800203 "errors": [ # The list of errors encountered while processing this operation.
204 { # Database instance operation error.
205 "kind": "sql#operationError", # This is always sql#operationError.
206 "code": "A String", # Identifies the specific error that occurred.
207 "message": "A String", # Additional information about the error encountered.
208 },
209 ],
210 },
211 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
212 "selfLink": "A String", # The URI of this resource.
213 "user": "A String", # The email address of the user who initiated this operation.
214 }</pre>
215</div>
216
217<div class="method">
218 <code class="details" id="delete">delete(project, instance)</code>
219 <pre>Deletes a Cloud SQL instance.
220
221Args:
222 project: string, Project ID of the project that contains the instance to be deleted. (required)
223 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
224
225Returns:
226 An object of the form:
227
228 { # 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.
229 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
230 "importContext": { # Database instance import context. # The context for import operation, if applicable.
231 "fileType": "A String", # The file type for the specified uri.
232 # SQL: The file contains SQL statements.
233 # CSV: The file contains CSV data.
234 "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.
235 "kind": "sql#importContext", # This is always sql#importContext.
236 "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.
237 "csvImportOptions": { # Options for importing data as CSV.
238 "table": "A String", # The table to which CSV data is imported.
239 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
240 "A String",
241 ],
242 },
243 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000244 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800245 "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.
246 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
247 "kind": "sql#exportContext", # This is always sql#exportContext.
248 "fileType": "A String", # The file type for the specified uri.
249 # SQL: The file contains SQL statements.
250 # CSV: The file contains CSV data.
251 "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.
252 "csvExportOptions": { # Options for exporting data as CSV.
253 "selectQuery": "A String", # The select query used to extract the data.
254 },
255 "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.
256 "A String",
257 ],
258 "sqlExportOptions": { # Options for exporting data as SQL statements.
259 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
260 "A String",
261 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800262 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800263 },
264 },
265 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
266 "targetProject": "A String", # The project ID of the target instance related to this operation.
267 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000268 "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 -0800269 "targetLink": "A String", # The URI of the instance related to the operation.
270 "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 +0000271 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
272 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800273 "errors": [ # The list of errors encountered while processing this operation.
274 { # Database instance operation error.
275 "kind": "sql#operationError", # This is always sql#operationError.
276 "code": "A String", # Identifies the specific error that occurred.
277 "message": "A String", # Additional information about the error encountered.
278 },
279 ],
280 },
281 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
282 "selfLink": "A String", # The URI of this resource.
283 "user": "A String", # The email address of the user who initiated this operation.
284 }</pre>
285</div>
286
287<div class="method">
288 <code class="details" id="export">export(project, instance, body)</code>
289 <pre>Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file.
290
291Args:
292 project: string, Project ID of the project that contains the instance to be exported. (required)
293 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
294 body: object, The request body. (required)
295 The object takes the form of:
296
297{ # Database instance export request.
298 "exportContext": { # Database instance export context. # Contains details about the export operation.
299 "kind": "sql#exportContext", # This is always sql#exportContext.
300 "fileType": "A String", # The file type for the specified uri.
301 # SQL: The file contains SQL statements.
302 # CSV: The file contains CSV data.
303 "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.
304 "csvExportOptions": { # Options for exporting data as CSV.
305 "selectQuery": "A String", # The select query used to extract the data.
306 },
307 "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.
308 "A String",
309 ],
310 "sqlExportOptions": { # Options for exporting data as SQL statements.
311 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
312 "A String",
313 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800314 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800315 },
316 },
317 }
318
319
320Returns:
321 An object of the form:
322
323 { # 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.
324 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
325 "importContext": { # Database instance import context. # The context for import operation, if applicable.
326 "fileType": "A String", # The file type for the specified uri.
327 # SQL: The file contains SQL statements.
328 # CSV: The file contains CSV data.
329 "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
330 "kind": "sql#importContext", # This is always sql#importContext.
331 "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.
332 "csvImportOptions": { # Options for importing data as CSV.
333 "table": "A String", # The table to which CSV data is imported.
334 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
335 "A String",
336 ],
337 },
338 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000339 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800340 "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.
341 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
342 "kind": "sql#exportContext", # This is always sql#exportContext.
343 "fileType": "A String", # The file type for the specified uri.
344 # SQL: The file contains SQL statements.
345 # CSV: The file contains CSV data.
346 "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.
347 "csvExportOptions": { # Options for exporting data as CSV.
348 "selectQuery": "A String", # The select query used to extract the data.
349 },
350 "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.
351 "A String",
352 ],
353 "sqlExportOptions": { # Options for exporting data as SQL statements.
354 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
355 "A String",
356 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800357 "schemaOnly": True or False, # Export only schemas.
358 },
359 },
360 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
361 "targetProject": "A String", # The project ID of the target instance related to this operation.
362 "targetId": "A String", # Name of the database instance related to this operation.
363 "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 .
364 "targetLink": "A String", # The URI of the instance related to the operation.
365 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
366 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
367 "kind": "sql#operationErrors", # This is always sql#operationErrors.
368 "errors": [ # The list of errors encountered while processing this operation.
369 { # Database instance operation error.
370 "kind": "sql#operationError", # This is always sql#operationError.
371 "code": "A String", # Identifies the specific error that occurred.
372 "message": "A String", # Additional information about the error encountered.
373 },
374 ],
375 },
376 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
377 "selfLink": "A String", # The URI of this resource.
378 "user": "A String", # The email address of the user who initiated this operation.
379 }</pre>
380</div>
381
382<div class="method">
383 <code class="details" id="failover">failover(project, instance, body)</code>
384 <pre>Failover the instance to its failover replica instance.
385
386Args:
387 project: string, ID of the project that contains the read replica. (required)
388 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
389 body: object, The request body. (required)
390 The object takes the form of:
391
392{ # Instance failover request.
393 "failoverContext": { # Database instance failover context. # Failover Context.
394 "kind": "sql#failoverContext", # This is always sql#failoverContext.
395 "settingsVersion": "A String", # The current settings version of this instance. Request will be rejected if this version doesn't match the current settings version.
396 },
397 }
398
399
400Returns:
401 An object of the form:
402
403 { # 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.
404 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
405 "importContext": { # Database instance import context. # The context for import operation, if applicable.
406 "fileType": "A String", # The file type for the specified uri.
407 # SQL: The file contains SQL statements.
408 # CSV: The file contains CSV data.
409 "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.
410 "kind": "sql#importContext", # This is always sql#importContext.
411 "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.
412 "csvImportOptions": { # Options for importing data as CSV.
413 "table": "A String", # The table to which CSV data is imported.
414 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
415 "A String",
416 ],
417 },
418 },
419 "kind": "sql#operation", # This is always sql#operation.
420 "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.
421 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
422 "kind": "sql#exportContext", # This is always sql#exportContext.
423 "fileType": "A String", # The file type for the specified uri.
424 # SQL: The file contains SQL statements.
425 # CSV: The file contains CSV data.
426 "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.
427 "csvExportOptions": { # Options for exporting data as CSV.
428 "selectQuery": "A String", # The select query used to extract the data.
429 },
430 "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.
431 "A String",
432 ],
433 "sqlExportOptions": { # Options for exporting data as SQL statements.
434 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
435 "A String",
436 ],
437 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800438 },
439 },
440 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
441 "targetProject": "A String", # The project ID of the target instance related to this operation.
442 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000443 "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 -0800444 "targetLink": "A String", # The URI of the instance related to the operation.
445 "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 +0000446 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
447 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800448 "errors": [ # The list of errors encountered while processing this operation.
449 { # Database instance operation error.
450 "kind": "sql#operationError", # This is always sql#operationError.
451 "code": "A String", # Identifies the specific error that occurred.
452 "message": "A String", # Additional information about the error encountered.
453 },
454 ],
455 },
456 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
457 "selfLink": "A String", # The URI of this resource.
458 "user": "A String", # The email address of the user who initiated this operation.
459 }</pre>
460</div>
461
462<div class="method">
463 <code class="details" id="get">get(project, instance)</code>
464 <pre>Retrieves a resource containing information about a Cloud SQL instance.
465
466Args:
467 project: string, Project ID of the project that contains the instance. (required)
468 instance: string, Database instance ID. This does not include the project ID. (required)
469
470Returns:
471 An object of the form:
472
473 { # A Cloud SQL instance resource.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700474 "backendType": "A String", # FIRST_GEN: Basic Cloud SQL instance that runs in a Google-managed container.
475 # SECOND_GEN: A newer Cloud SQL backend that runs in a Compute Engine VM.
476 # EXTERNAL: A MySQL server that is not managed by Google.
477 "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Users should use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ for details.
478 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
479 "ipAddresses": [ # The assigned IP addresses for the instance.
480 { # Database instance IP Mapping.
481 "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.
482 "ipAddress": "A String", # The IP address assigned.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800483 "type": "A String", # The type of this IP address. A PRIMARY address is an address that can accept incoming connections. An OUTGOING address is the source address of connections originating from the instance, if supported.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700484 },
485 ],
486 "databaseVersion": "A String", # The database engine type and version. The databaseVersion can not be changed after instance creation. Can be MYSQL_5_5, MYSQL_5_6 or MYSQL_5_7. Defaults to MYSQL_5_6. MYSQL_5_7 is applicable only to Second Generation instances.
487 "instanceType": "A String", # The instance type. This can be one of the following.
488 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
489 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
490 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
491 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
492 "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension.
493 "A String",
494 ],
495 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
496 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
497 # RUNNABLE: The instance is running, or is ready to run when accessed.
498 # SUSPENDED: The instance is not available, for example due to problems with billing.
499 # PENDING_CREATE: The instance is being created.
500 # MAINTENANCE: The instance is down for maintenance.
501 # FAILED: The instance creation failed.
502 # UNKNOWN_STATE: The state of the instance is unknown.
503 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
504 "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
505 "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The master can only failover to the falover replica when the status is true.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700506 "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700507 },
508 "replicaNames": [ # The replicas of the instance.
509 "A String",
510 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000511 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
512 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
513 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
514 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700515 "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
Craig Citroe633be12015-03-02 13:40:36 -0800516 "kind": "sql#instance", # This is always sql#instance.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700517 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
518 "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only to First Generation instances.
519 "serverCaCert": { # SslCerts Resource # SSL configuration.
520 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
521 "kind": "sql#sslCert", # This is always sql#sslCert.
522 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
523 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
524 "instance": "A String", # Name of the database instance.
525 "cert": "A String", # PEM representation.
526 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
527 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
528 "selfLink": "A String", # The URI of this resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800529 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700530 "region": "A String", # The geographical region. Can be us-central (FIRST_GEN instances only), us-central1 (SECOND_GEN instances only), asia-east1 or europe-west1. Defaults to us-central or us-central1 depending on the instance type (First Generation or Second Generation). The region can not be changed after instance creation.
531 "settings": { # Database instance settings. # The user settings.
532 "databaseFlags": [ # The database flags passed to the instance at startup.
533 { # MySQL flags for Cloud SQL instances.
534 "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.
535 "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.
536 },
537 ],
538 "kind": "sql#settings", # This is always sql#settings.
539 "dataDiskType": "A String", # The type of data disk. Only supported for Second Generation instances. The default type is PD_SSD. Applies only to Second Generation instances.
540 "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should preferably be restarted for system maintenance puruposes. # The maintenance window for this instance. This specifies when the instance may be restarted for maintenance purposes. Applies only to Second Generation instances.
541 "kind": "sql#maintenanceWindow", # This is always sql#maintenanceWindow.
542 "updateTrack": "A String",
543 "day": 42, # day of week (1-7), starting on Monday.
544 "hour": 42, # hour of day - 0 to 23.
545 },
546 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. This property is only applicable to First Generation instances.
547 "A String",
548 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700549 "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. The activation policy cannot be updated together with other settings for Second Generation instances. Valid values:
550 # ALWAYS: The instance is on; it is not deactivated by inactivity.
551 # NEVER: The instance is off; it is not activated, even if a connection request arrives.
552 # ON_DEMAND: The instance responds to incoming requests, and turns itself off when not in use. Instances with PER_USE pricing turn off after 15 minutes of inactivity. Instances with PER_PACKAGE pricing turn off after 12 hours of inactivity.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700553 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
554 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
555 "enabled": True or False, # Whether this configuration is enabled.
556 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
557 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
558 },
559 "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
560 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
561 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
562 "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).
563 { # An entry for an Access Control list.
564 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
565 "kind": "sql#aclEntry", # This is always sql#aclEntry.
566 "value": "A String", # The whitelisted value for the access control list.
567 "name": "A String", # An optional label to identify this entry.
568 },
569 ],
570 },
571 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
572 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
573 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS. This property is only applicable to First Generation instances.
574 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property is only applicable to First Generation instances.
575 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE. Only PER_USE is supported for Second Generation instances.
576 "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.
577 "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is false. Applies only to Second Generation instances.
578 "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or GCE zone for better performance. App Engine co-location is only applicable to First Generation instances.
579 "kind": "sql#locationPreference", # This is always sql#locationPreference.
580 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
581 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
582 },
583 "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Applies only to Second Generation instances.
584 },
585 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000586 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
587 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800588 "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.
589 # 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 +0000590 "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.
591 "username": "A String", # The username for the replication connection.
592 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
593 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
594 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
595 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
596 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
597 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
598 "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.
599 "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.
600 "password": "A String", # The password for the replication connection.
601 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
602 },
603 },
Craig Citroe633be12015-03-02 13:40:36 -0800604 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800605 }</pre>
606</div>
607
608<div class="method">
609 <code class="details" id="import_">import_(project, instance, body)</code>
610 <pre>Imports data into a Cloud SQL instance from a MySQL dump file in Google Cloud Storage.
611
612Args:
613 project: string, Project ID of the project that contains the instance. (required)
614 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
615 body: object, The request body. (required)
616 The object takes the form of:
617
618{ # Database instance import request.
619 "importContext": { # Database instance import context. # Contains details about the import operation.
620 "fileType": "A String", # The file type for the specified uri.
621 # SQL: The file contains SQL statements.
622 # CSV: The file contains CSV data.
623 "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.
624 "kind": "sql#importContext", # This is always sql#importContext.
625 "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.
626 "csvImportOptions": { # Options for importing data as CSV.
627 "table": "A String", # The table to which CSV data is imported.
628 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
629 "A String",
630 ],
631 },
632 },
633 }
634
635
636Returns:
637 An object of the form:
638
639 { # 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.
640 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
641 "importContext": { # Database instance import context. # The context for import operation, if applicable.
642 "fileType": "A String", # The file type for the specified uri.
643 # SQL: The file contains SQL statements.
644 # CSV: The file contains CSV data.
645 "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.
646 "kind": "sql#importContext", # This is always sql#importContext.
647 "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.
648 "csvImportOptions": { # Options for importing data as CSV.
649 "table": "A String", # The table to which CSV data is imported.
650 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
651 "A String",
652 ],
653 },
654 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000655 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800656 "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.
657 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
658 "kind": "sql#exportContext", # This is always sql#exportContext.
659 "fileType": "A String", # The file type for the specified uri.
660 # SQL: The file contains SQL statements.
661 # CSV: The file contains CSV data.
662 "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.
663 "csvExportOptions": { # Options for exporting data as CSV.
664 "selectQuery": "A String", # The select query used to extract the data.
665 },
666 "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.
667 "A String",
668 ],
669 "sqlExportOptions": { # Options for exporting data as SQL statements.
670 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
671 "A String",
672 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800673 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800674 },
675 },
676 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
677 "targetProject": "A String", # The project ID of the target instance related to this operation.
678 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000679 "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 -0800680 "targetLink": "A String", # The URI of the instance related to the operation.
681 "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 +0000682 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
683 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800684 "errors": [ # The list of errors encountered while processing this operation.
685 { # Database instance operation error.
686 "kind": "sql#operationError", # This is always sql#operationError.
687 "code": "A String", # Identifies the specific error that occurred.
688 "message": "A String", # Additional information about the error encountered.
689 },
690 ],
691 },
692 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
693 "selfLink": "A String", # The URI of this resource.
694 "user": "A String", # The email address of the user who initiated this operation.
695 }</pre>
696</div>
697
698<div class="method">
699 <code class="details" id="insert">insert(project, body)</code>
700 <pre>Creates a new Cloud SQL instance.
701
702Args:
703 project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required)
704 body: object, The request body. (required)
705 The object takes the form of:
706
707{ # A Cloud SQL instance resource.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700708 "backendType": "A String", # FIRST_GEN: Basic Cloud SQL instance that runs in a Google-managed container.
709 # SECOND_GEN: A newer Cloud SQL backend that runs in a Compute Engine VM.
710 # EXTERNAL: A MySQL server that is not managed by Google.
711 "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Users should use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ for details.
712 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
713 "ipAddresses": [ # The assigned IP addresses for the instance.
714 { # Database instance IP Mapping.
715 "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.
716 "ipAddress": "A String", # The IP address assigned.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800717 "type": "A String", # The type of this IP address. A PRIMARY address is an address that can accept incoming connections. An OUTGOING address is the source address of connections originating from the instance, if supported.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700718 },
719 ],
720 "databaseVersion": "A String", # The database engine type and version. The databaseVersion can not be changed after instance creation. Can be MYSQL_5_5, MYSQL_5_6 or MYSQL_5_7. Defaults to MYSQL_5_6. MYSQL_5_7 is applicable only to Second Generation instances.
721 "instanceType": "A String", # The instance type. This can be one of the following.
722 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
723 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
724 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
725 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
726 "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension.
727 "A String",
728 ],
729 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
730 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
731 # RUNNABLE: The instance is running, or is ready to run when accessed.
732 # SUSPENDED: The instance is not available, for example due to problems with billing.
733 # PENDING_CREATE: The instance is being created.
734 # MAINTENANCE: The instance is down for maintenance.
735 # FAILED: The instance creation failed.
736 # UNKNOWN_STATE: The state of the instance is unknown.
737 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
738 "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
739 "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The master can only failover to the falover replica when the status is true.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700740 "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700741 },
742 "replicaNames": [ # The replicas of the instance.
743 "A String",
744 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000745 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
746 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
747 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
748 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700749 "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
Craig Citroe633be12015-03-02 13:40:36 -0800750 "kind": "sql#instance", # This is always sql#instance.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700751 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
752 "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only to First Generation instances.
753 "serverCaCert": { # SslCerts Resource # SSL configuration.
754 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
755 "kind": "sql#sslCert", # This is always sql#sslCert.
756 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
757 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
758 "instance": "A String", # Name of the database instance.
759 "cert": "A String", # PEM representation.
760 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
761 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
762 "selfLink": "A String", # The URI of this resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800763 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700764 "region": "A String", # The geographical region. Can be us-central (FIRST_GEN instances only), us-central1 (SECOND_GEN instances only), asia-east1 or europe-west1. Defaults to us-central or us-central1 depending on the instance type (First Generation or Second Generation). The region can not be changed after instance creation.
765 "settings": { # Database instance settings. # The user settings.
766 "databaseFlags": [ # The database flags passed to the instance at startup.
767 { # MySQL flags for Cloud SQL instances.
768 "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.
769 "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.
770 },
771 ],
772 "kind": "sql#settings", # This is always sql#settings.
773 "dataDiskType": "A String", # The type of data disk. Only supported for Second Generation instances. The default type is PD_SSD. Applies only to Second Generation instances.
774 "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should preferably be restarted for system maintenance puruposes. # The maintenance window for this instance. This specifies when the instance may be restarted for maintenance purposes. Applies only to Second Generation instances.
775 "kind": "sql#maintenanceWindow", # This is always sql#maintenanceWindow.
776 "updateTrack": "A String",
777 "day": 42, # day of week (1-7), starting on Monday.
778 "hour": 42, # hour of day - 0 to 23.
779 },
780 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. This property is only applicable to First Generation instances.
781 "A String",
782 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700783 "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. The activation policy cannot be updated together with other settings for Second Generation instances. Valid values:
784 # ALWAYS: The instance is on; it is not deactivated by inactivity.
785 # NEVER: The instance is off; it is not activated, even if a connection request arrives.
786 # ON_DEMAND: The instance responds to incoming requests, and turns itself off when not in use. Instances with PER_USE pricing turn off after 15 minutes of inactivity. Instances with PER_PACKAGE pricing turn off after 12 hours of inactivity.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700787 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
788 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
789 "enabled": True or False, # Whether this configuration is enabled.
790 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
791 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
792 },
793 "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
794 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
795 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
796 "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).
797 { # An entry for an Access Control list.
798 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
799 "kind": "sql#aclEntry", # This is always sql#aclEntry.
800 "value": "A String", # The whitelisted value for the access control list.
801 "name": "A String", # An optional label to identify this entry.
802 },
803 ],
804 },
805 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
806 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
807 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS. This property is only applicable to First Generation instances.
808 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property is only applicable to First Generation instances.
809 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE. Only PER_USE is supported for Second Generation instances.
810 "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.
811 "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is false. Applies only to Second Generation instances.
812 "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or GCE zone for better performance. App Engine co-location is only applicable to First Generation instances.
813 "kind": "sql#locationPreference", # This is always sql#locationPreference.
814 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
815 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
816 },
817 "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Applies only to Second Generation instances.
818 },
819 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000820 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
821 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800822 "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.
823 # 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 +0000824 "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.
825 "username": "A String", # The username for the replication connection.
826 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
827 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
828 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
829 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
830 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
831 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
832 "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.
833 "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.
834 "password": "A String", # The password for the replication connection.
835 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
836 },
837 },
Craig Citroe633be12015-03-02 13:40:36 -0800838 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800839 }
840
841
842Returns:
843 An object of the form:
844
845 { # 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.
846 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
847 "importContext": { # Database instance import context. # The context for import operation, if applicable.
848 "fileType": "A String", # The file type for the specified uri.
849 # SQL: The file contains SQL statements.
850 # CSV: The file contains CSV data.
851 "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.
852 "kind": "sql#importContext", # This is always sql#importContext.
853 "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.
854 "csvImportOptions": { # Options for importing data as CSV.
855 "table": "A String", # The table to which CSV data is imported.
856 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
857 "A String",
858 ],
859 },
860 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000861 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800862 "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.
863 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
864 "kind": "sql#exportContext", # This is always sql#exportContext.
865 "fileType": "A String", # The file type for the specified uri.
866 # SQL: The file contains SQL statements.
867 # CSV: The file contains CSV data.
868 "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.
869 "csvExportOptions": { # Options for exporting data as CSV.
870 "selectQuery": "A String", # The select query used to extract the data.
871 },
872 "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.
873 "A String",
874 ],
875 "sqlExportOptions": { # Options for exporting data as SQL statements.
876 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
877 "A String",
878 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800879 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800880 },
881 },
882 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
883 "targetProject": "A String", # The project ID of the target instance related to this operation.
884 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000885 "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 -0800886 "targetLink": "A String", # The URI of the instance related to the operation.
887 "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 +0000888 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
889 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800890 "errors": [ # The list of errors encountered while processing this operation.
891 { # Database instance operation error.
892 "kind": "sql#operationError", # This is always sql#operationError.
893 "code": "A String", # Identifies the specific error that occurred.
894 "message": "A String", # Additional information about the error encountered.
895 },
896 ],
897 },
898 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
899 "selfLink": "A String", # The URI of this resource.
900 "user": "A String", # The email address of the user who initiated this operation.
901 }</pre>
902</div>
903
904<div class="method">
905 <code class="details" id="list">list(project, pageToken=None, maxResults=None)</code>
906 <pre>Lists instances under a given project in the alphabetical order of the instance name.
907
908Args:
909 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
910 pageToken: string, A previously-returned page token representing part of the larger set of results to view.
911 maxResults: integer, The maximum number of results to return per response.
912
913Returns:
914 An object of the form:
915
916 { # Database instances list response.
917 "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.
918 "items": [ # List of database instance resources.
919 { # A Cloud SQL instance resource.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700920 "backendType": "A String", # FIRST_GEN: Basic Cloud SQL instance that runs in a Google-managed container.
921 # SECOND_GEN: A newer Cloud SQL backend that runs in a Compute Engine VM.
922 # EXTERNAL: A MySQL server that is not managed by Google.
923 "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Users should use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ for details.
924 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
925 "ipAddresses": [ # The assigned IP addresses for the instance.
926 { # Database instance IP Mapping.
927 "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.
928 "ipAddress": "A String", # The IP address assigned.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800929 "type": "A String", # The type of this IP address. A PRIMARY address is an address that can accept incoming connections. An OUTGOING address is the source address of connections originating from the instance, if supported.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700930 },
931 ],
932 "databaseVersion": "A String", # The database engine type and version. The databaseVersion can not be changed after instance creation. Can be MYSQL_5_5, MYSQL_5_6 or MYSQL_5_7. Defaults to MYSQL_5_6. MYSQL_5_7 is applicable only to Second Generation instances.
933 "instanceType": "A String", # The instance type. This can be one of the following.
934 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
935 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
936 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
937 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
938 "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension.
939 "A String",
940 ],
941 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
942 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
943 # RUNNABLE: The instance is running, or is ready to run when accessed.
944 # SUSPENDED: The instance is not available, for example due to problems with billing.
945 # PENDING_CREATE: The instance is being created.
946 # MAINTENANCE: The instance is down for maintenance.
947 # FAILED: The instance creation failed.
948 # UNKNOWN_STATE: The state of the instance is unknown.
949 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
950 "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
951 "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The master can only failover to the falover replica when the status is true.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700952 "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700953 },
954 "replicaNames": [ # The replicas of the instance.
955 "A String",
956 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000957 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
958 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
959 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
960 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700961 "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
Craig Citroe633be12015-03-02 13:40:36 -0800962 "kind": "sql#instance", # This is always sql#instance.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700963 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
964 "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only to First Generation instances.
965 "serverCaCert": { # SslCerts Resource # SSL configuration.
966 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
967 "kind": "sql#sslCert", # This is always sql#sslCert.
968 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
969 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
970 "instance": "A String", # Name of the database instance.
971 "cert": "A String", # PEM representation.
972 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
973 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
974 "selfLink": "A String", # The URI of this resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800975 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700976 "region": "A String", # The geographical region. Can be us-central (FIRST_GEN instances only), us-central1 (SECOND_GEN instances only), asia-east1 or europe-west1. Defaults to us-central or us-central1 depending on the instance type (First Generation or Second Generation). The region can not be changed after instance creation.
977 "settings": { # Database instance settings. # The user settings.
978 "databaseFlags": [ # The database flags passed to the instance at startup.
979 { # MySQL flags for Cloud SQL instances.
980 "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.
981 "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.
982 },
983 ],
984 "kind": "sql#settings", # This is always sql#settings.
985 "dataDiskType": "A String", # The type of data disk. Only supported for Second Generation instances. The default type is PD_SSD. Applies only to Second Generation instances.
986 "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should preferably be restarted for system maintenance puruposes. # The maintenance window for this instance. This specifies when the instance may be restarted for maintenance purposes. Applies only to Second Generation instances.
987 "kind": "sql#maintenanceWindow", # This is always sql#maintenanceWindow.
988 "updateTrack": "A String",
989 "day": 42, # day of week (1-7), starting on Monday.
990 "hour": 42, # hour of day - 0 to 23.
991 },
992 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. This property is only applicable to First Generation instances.
993 "A String",
994 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700995 "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. The activation policy cannot be updated together with other settings for Second Generation instances. Valid values:
996 # ALWAYS: The instance is on; it is not deactivated by inactivity.
997 # NEVER: The instance is off; it is not activated, even if a connection request arrives.
998 # ON_DEMAND: The instance responds to incoming requests, and turns itself off when not in use. Instances with PER_USE pricing turn off after 15 minutes of inactivity. Instances with PER_PACKAGE pricing turn off after 12 hours of inactivity.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700999 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
1000 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
1001 "enabled": True or False, # Whether this configuration is enabled.
1002 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
1003 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
1004 },
1005 "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
1006 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
1007 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
1008 "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).
1009 { # An entry for an Access Control list.
1010 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1011 "kind": "sql#aclEntry", # This is always sql#aclEntry.
1012 "value": "A String", # The whitelisted value for the access control list.
1013 "name": "A String", # An optional label to identify this entry.
1014 },
1015 ],
1016 },
1017 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
1018 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1019 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS. This property is only applicable to First Generation instances.
1020 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property is only applicable to First Generation instances.
1021 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE. Only PER_USE is supported for Second Generation instances.
1022 "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.
1023 "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is false. Applies only to Second Generation instances.
1024 "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or GCE zone for better performance. App Engine co-location is only applicable to First Generation instances.
1025 "kind": "sql#locationPreference", # This is always sql#locationPreference.
1026 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
1027 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
1028 },
1029 "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Applies only to Second Generation instances.
1030 },
1031 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001032 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
1033 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001034 "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.
1035 # 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 +00001036 "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.
1037 "username": "A String", # The username for the replication connection.
1038 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
1039 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
1040 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
1041 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
1042 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
1043 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
1044 "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.
1045 "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.
1046 "password": "A String", # The password for the replication connection.
1047 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
1048 },
1049 },
Craig Citroe633be12015-03-02 13:40:36 -08001050 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -08001051 },
1052 ],
1053 "kind": "sql#instancesList", # This is always sql#instancesList.
1054 }</pre>
1055</div>
1056
1057<div class="method">
1058 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1059 <pre>Retrieves the next page of results.
1060
1061Args:
1062 previous_request: The request for the previous page. (required)
1063 previous_response: The response from the request for the previous page. (required)
1064
1065Returns:
1066 A request object that you can call 'execute()' on to request the next
1067 page. Returns None if there are no more items in the collection.
1068 </pre>
1069</div>
1070
1071<div class="method">
1072 <code class="details" id="patch">patch(project, instance, body)</code>
1073 <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.
1074
1075Args:
1076 project: string, Project ID of the project that contains the instance. (required)
1077 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1078 body: object, The request body. (required)
1079 The object takes the form of:
1080
1081{ # A Cloud SQL instance resource.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001082 "backendType": "A String", # FIRST_GEN: Basic Cloud SQL instance that runs in a Google-managed container.
1083 # SECOND_GEN: A newer Cloud SQL backend that runs in a Compute Engine VM.
1084 # EXTERNAL: A MySQL server that is not managed by Google.
1085 "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Users should use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ for details.
1086 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
1087 "ipAddresses": [ # The assigned IP addresses for the instance.
1088 { # Database instance IP Mapping.
1089 "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.
1090 "ipAddress": "A String", # The IP address assigned.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001091 "type": "A String", # The type of this IP address. A PRIMARY address is an address that can accept incoming connections. An OUTGOING address is the source address of connections originating from the instance, if supported.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001092 },
1093 ],
1094 "databaseVersion": "A String", # The database engine type and version. The databaseVersion can not be changed after instance creation. Can be MYSQL_5_5, MYSQL_5_6 or MYSQL_5_7. Defaults to MYSQL_5_6. MYSQL_5_7 is applicable only to Second Generation instances.
1095 "instanceType": "A String", # The instance type. This can be one of the following.
1096 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
1097 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
1098 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
1099 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
1100 "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension.
1101 "A String",
1102 ],
1103 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
1104 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
1105 # RUNNABLE: The instance is running, or is ready to run when accessed.
1106 # SUSPENDED: The instance is not available, for example due to problems with billing.
1107 # PENDING_CREATE: The instance is being created.
1108 # MAINTENANCE: The instance is down for maintenance.
1109 # FAILED: The instance creation failed.
1110 # UNKNOWN_STATE: The state of the instance is unknown.
1111 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
1112 "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
1113 "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The master can only failover to the falover replica when the status is true.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001114 "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001115 },
1116 "replicaNames": [ # The replicas of the instance.
1117 "A String",
1118 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001119 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
1120 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
1121 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
1122 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001123 "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
Craig Citroe633be12015-03-02 13:40:36 -08001124 "kind": "sql#instance", # This is always sql#instance.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001125 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
1126 "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only to First Generation instances.
1127 "serverCaCert": { # SslCerts Resource # SSL configuration.
1128 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
1129 "kind": "sql#sslCert", # This is always sql#sslCert.
1130 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
1131 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1132 "instance": "A String", # Name of the database instance.
1133 "cert": "A String", # PEM representation.
1134 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1135 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
1136 "selfLink": "A String", # The URI of this resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001137 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001138 "region": "A String", # The geographical region. Can be us-central (FIRST_GEN instances only), us-central1 (SECOND_GEN instances only), asia-east1 or europe-west1. Defaults to us-central or us-central1 depending on the instance type (First Generation or Second Generation). The region can not be changed after instance creation.
1139 "settings": { # Database instance settings. # The user settings.
1140 "databaseFlags": [ # The database flags passed to the instance at startup.
1141 { # MySQL flags for Cloud SQL instances.
1142 "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.
1143 "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.
1144 },
1145 ],
1146 "kind": "sql#settings", # This is always sql#settings.
1147 "dataDiskType": "A String", # The type of data disk. Only supported for Second Generation instances. The default type is PD_SSD. Applies only to Second Generation instances.
1148 "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should preferably be restarted for system maintenance puruposes. # The maintenance window for this instance. This specifies when the instance may be restarted for maintenance purposes. Applies only to Second Generation instances.
1149 "kind": "sql#maintenanceWindow", # This is always sql#maintenanceWindow.
1150 "updateTrack": "A String",
1151 "day": 42, # day of week (1-7), starting on Monday.
1152 "hour": 42, # hour of day - 0 to 23.
1153 },
1154 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. This property is only applicable to First Generation instances.
1155 "A String",
1156 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001157 "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. The activation policy cannot be updated together with other settings for Second Generation instances. Valid values:
1158 # ALWAYS: The instance is on; it is not deactivated by inactivity.
1159 # NEVER: The instance is off; it is not activated, even if a connection request arrives.
1160 # ON_DEMAND: The instance responds to incoming requests, and turns itself off when not in use. Instances with PER_USE pricing turn off after 15 minutes of inactivity. Instances with PER_PACKAGE pricing turn off after 12 hours of inactivity.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001161 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
1162 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
1163 "enabled": True or False, # Whether this configuration is enabled.
1164 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
1165 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
1166 },
1167 "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
1168 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
1169 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
1170 "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).
1171 { # An entry for an Access Control list.
1172 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1173 "kind": "sql#aclEntry", # This is always sql#aclEntry.
1174 "value": "A String", # The whitelisted value for the access control list.
1175 "name": "A String", # An optional label to identify this entry.
1176 },
1177 ],
1178 },
1179 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
1180 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1181 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS. This property is only applicable to First Generation instances.
1182 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property is only applicable to First Generation instances.
1183 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE. Only PER_USE is supported for Second Generation instances.
1184 "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.
1185 "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is false. Applies only to Second Generation instances.
1186 "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or GCE zone for better performance. App Engine co-location is only applicable to First Generation instances.
1187 "kind": "sql#locationPreference", # This is always sql#locationPreference.
1188 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
1189 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
1190 },
1191 "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Applies only to Second Generation instances.
1192 },
1193 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001194 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
1195 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001196 "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.
1197 # 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 +00001198 "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.
1199 "username": "A String", # The username for the replication connection.
1200 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
1201 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
1202 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
1203 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
1204 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
1205 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
1206 "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.
1207 "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.
1208 "password": "A String", # The password for the replication connection.
1209 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
1210 },
1211 },
Craig Citroe633be12015-03-02 13:40:36 -08001212 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -08001213 }
1214
1215
1216Returns:
1217 An object of the form:
1218
1219 { # 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.
1220 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1221 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1222 "fileType": "A String", # The file type for the specified uri.
1223 # SQL: The file contains SQL statements.
1224 # CSV: The file contains CSV data.
1225 "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.
1226 "kind": "sql#importContext", # This is always sql#importContext.
1227 "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.
1228 "csvImportOptions": { # Options for importing data as CSV.
1229 "table": "A String", # The table to which CSV data is imported.
1230 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1231 "A String",
1232 ],
1233 },
1234 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001235 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001236 "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.
1237 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1238 "kind": "sql#exportContext", # This is always sql#exportContext.
1239 "fileType": "A String", # The file type for the specified uri.
1240 # SQL: The file contains SQL statements.
1241 # CSV: The file contains CSV data.
1242 "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.
1243 "csvExportOptions": { # Options for exporting data as CSV.
1244 "selectQuery": "A String", # The select query used to extract the data.
1245 },
1246 "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.
1247 "A String",
1248 ],
1249 "sqlExportOptions": { # Options for exporting data as SQL statements.
1250 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1251 "A String",
1252 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001253 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08001254 },
1255 },
1256 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1257 "targetProject": "A String", # The project ID of the target instance related to this operation.
1258 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001259 "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 -08001260 "targetLink": "A String", # The URI of the instance related to the operation.
1261 "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 +00001262 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1263 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001264 "errors": [ # The list of errors encountered while processing this operation.
1265 { # Database instance operation error.
1266 "kind": "sql#operationError", # This is always sql#operationError.
1267 "code": "A String", # Identifies the specific error that occurred.
1268 "message": "A String", # Additional information about the error encountered.
1269 },
1270 ],
1271 },
1272 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1273 "selfLink": "A String", # The URI of this resource.
1274 "user": "A String", # The email address of the user who initiated this operation.
1275 }</pre>
1276</div>
1277
1278<div class="method">
1279 <code class="details" id="promoteReplica">promoteReplica(project, instance)</code>
1280 <pre>Promotes the read replica instance to be a stand-alone Cloud SQL instance.
1281
1282Args:
1283 project: string, ID of the project that contains the read replica. (required)
1284 instance: string, Cloud SQL read replica instance name. (required)
1285
1286Returns:
1287 An object of the form:
1288
1289 { # 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.
1290 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1291 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1292 "fileType": "A String", # The file type for the specified uri.
1293 # SQL: The file contains SQL statements.
1294 # CSV: The file contains CSV data.
1295 "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.
1296 "kind": "sql#importContext", # This is always sql#importContext.
1297 "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.
1298 "csvImportOptions": { # Options for importing data as CSV.
1299 "table": "A String", # The table to which CSV data is imported.
1300 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1301 "A String",
1302 ],
1303 },
1304 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001305 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001306 "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.
1307 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1308 "kind": "sql#exportContext", # This is always sql#exportContext.
1309 "fileType": "A String", # The file type for the specified uri.
1310 # SQL: The file contains SQL statements.
1311 # CSV: The file contains CSV data.
1312 "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.
1313 "csvExportOptions": { # Options for exporting data as CSV.
1314 "selectQuery": "A String", # The select query used to extract the data.
1315 },
1316 "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.
1317 "A String",
1318 ],
1319 "sqlExportOptions": { # Options for exporting data as SQL statements.
1320 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1321 "A String",
1322 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001323 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08001324 },
1325 },
1326 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1327 "targetProject": "A String", # The project ID of the target instance related to this operation.
1328 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001329 "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 -08001330 "targetLink": "A String", # The URI of the instance related to the operation.
1331 "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 +00001332 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1333 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001334 "errors": [ # The list of errors encountered while processing this operation.
1335 { # Database instance operation error.
1336 "kind": "sql#operationError", # This is always sql#operationError.
1337 "code": "A String", # Identifies the specific error that occurred.
1338 "message": "A String", # Additional information about the error encountered.
1339 },
1340 ],
1341 },
1342 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1343 "selfLink": "A String", # The URI of this resource.
1344 "user": "A String", # The email address of the user who initiated this operation.
1345 }</pre>
1346</div>
1347
1348<div class="method">
1349 <code class="details" id="resetSslConfig">resetSslConfig(project, instance)</code>
1350 <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.
1351
1352Args:
1353 project: string, Project ID of the project that contains the instance. (required)
1354 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1355
1356Returns:
1357 An object of the form:
1358
1359 { # 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.
1360 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1361 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1362 "fileType": "A String", # The file type for the specified uri.
1363 # SQL: The file contains SQL statements.
1364 # CSV: The file contains CSV data.
1365 "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.
1366 "kind": "sql#importContext", # This is always sql#importContext.
1367 "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.
1368 "csvImportOptions": { # Options for importing data as CSV.
1369 "table": "A String", # The table to which CSV data is imported.
1370 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1371 "A String",
1372 ],
1373 },
1374 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001375 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001376 "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.
1377 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1378 "kind": "sql#exportContext", # This is always sql#exportContext.
1379 "fileType": "A String", # The file type for the specified uri.
1380 # SQL: The file contains SQL statements.
1381 # CSV: The file contains CSV data.
1382 "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.
1383 "csvExportOptions": { # Options for exporting data as CSV.
1384 "selectQuery": "A String", # The select query used to extract the data.
1385 },
1386 "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.
1387 "A String",
1388 ],
1389 "sqlExportOptions": { # Options for exporting data as SQL statements.
1390 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1391 "A String",
1392 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001393 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08001394 },
1395 },
1396 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1397 "targetProject": "A String", # The project ID of the target instance related to this operation.
1398 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001399 "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 -08001400 "targetLink": "A String", # The URI of the instance related to the operation.
1401 "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 +00001402 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1403 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001404 "errors": [ # The list of errors encountered while processing this operation.
1405 { # Database instance operation error.
1406 "kind": "sql#operationError", # This is always sql#operationError.
1407 "code": "A String", # Identifies the specific error that occurred.
1408 "message": "A String", # Additional information about the error encountered.
1409 },
1410 ],
1411 },
1412 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1413 "selfLink": "A String", # The URI of this resource.
1414 "user": "A String", # The email address of the user who initiated this operation.
1415 }</pre>
1416</div>
1417
1418<div class="method">
1419 <code class="details" id="restart">restart(project, instance)</code>
1420 <pre>Restarts a Cloud SQL instance.
1421
1422Args:
1423 project: string, Project ID of the project that contains the instance to be restarted. (required)
1424 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1425
1426Returns:
1427 An object of the form:
1428
1429 { # 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.
1430 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1431 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1432 "fileType": "A String", # The file type for the specified uri.
1433 # SQL: The file contains SQL statements.
1434 # CSV: The file contains CSV data.
1435 "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.
1436 "kind": "sql#importContext", # This is always sql#importContext.
1437 "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.
1438 "csvImportOptions": { # Options for importing data as CSV.
1439 "table": "A String", # The table to which CSV data is imported.
1440 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1441 "A String",
1442 ],
1443 },
1444 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001445 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001446 "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.
1447 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1448 "kind": "sql#exportContext", # This is always sql#exportContext.
1449 "fileType": "A String", # The file type for the specified uri.
1450 # SQL: The file contains SQL statements.
1451 # CSV: The file contains CSV data.
1452 "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.
1453 "csvExportOptions": { # Options for exporting data as CSV.
1454 "selectQuery": "A String", # The select query used to extract the data.
1455 },
1456 "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.
1457 "A String",
1458 ],
1459 "sqlExportOptions": { # Options for exporting data as SQL statements.
1460 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1461 "A String",
1462 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001463 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08001464 },
1465 },
1466 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1467 "targetProject": "A String", # The project ID of the target instance related to this operation.
1468 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001469 "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 -08001470 "targetLink": "A String", # The URI of the instance related to the operation.
1471 "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 +00001472 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1473 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001474 "errors": [ # The list of errors encountered while processing this operation.
1475 { # Database instance operation error.
1476 "kind": "sql#operationError", # This is always sql#operationError.
1477 "code": "A String", # Identifies the specific error that occurred.
1478 "message": "A String", # Additional information about the error encountered.
1479 },
1480 ],
1481 },
1482 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1483 "selfLink": "A String", # The URI of this resource.
1484 "user": "A String", # The email address of the user who initiated this operation.
1485 }</pre>
1486</div>
1487
1488<div class="method">
1489 <code class="details" id="restoreBackup">restoreBackup(project, instance, body)</code>
1490 <pre>Restores a backup of a Cloud SQL instance.
1491
1492Args:
1493 project: string, Project ID of the project that contains the instance. (required)
1494 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1495 body: object, The request body. (required)
1496 The object takes the form of:
1497
1498{ # Database instance restore backup request.
1499 "restoreBackupContext": { # Database instance restore from backup context. # Parameters required to perform the restore backup operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001500 "instanceId": "A String", # The ID of the instance that the backup was taken from.
Craig Citroe633be12015-03-02 13:40:36 -08001501 "kind": "sql#restoreBackupContext", # This is always sql#restoreBackupContext.
1502 "backupRunId": "A String", # The ID of the backup run to restore from.
1503 },
1504 }
1505
1506
1507Returns:
1508 An object of the form:
1509
1510 { # 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.
1511 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1512 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1513 "fileType": "A String", # The file type for the specified uri.
1514 # SQL: The file contains SQL statements.
1515 # CSV: The file contains CSV data.
1516 "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.
1517 "kind": "sql#importContext", # This is always sql#importContext.
1518 "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.
1519 "csvImportOptions": { # Options for importing data as CSV.
1520 "table": "A String", # The table to which CSV data is imported.
1521 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1522 "A String",
1523 ],
1524 },
1525 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001526 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001527 "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.
1528 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1529 "kind": "sql#exportContext", # This is always sql#exportContext.
1530 "fileType": "A String", # The file type for the specified uri.
1531 # SQL: The file contains SQL statements.
1532 # CSV: The file contains CSV data.
1533 "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.
1534 "csvExportOptions": { # Options for exporting data as CSV.
1535 "selectQuery": "A String", # The select query used to extract the data.
1536 },
1537 "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.
1538 "A String",
1539 ],
1540 "sqlExportOptions": { # Options for exporting data as SQL statements.
1541 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1542 "A String",
1543 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001544 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08001545 },
1546 },
1547 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1548 "targetProject": "A String", # The project ID of the target instance related to this operation.
1549 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001550 "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 -08001551 "targetLink": "A String", # The URI of the instance related to the operation.
1552 "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 +00001553 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1554 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001555 "errors": [ # The list of errors encountered while processing this operation.
1556 { # Database instance operation error.
1557 "kind": "sql#operationError", # This is always sql#operationError.
1558 "code": "A String", # Identifies the specific error that occurred.
1559 "message": "A String", # Additional information about the error encountered.
1560 },
1561 ],
1562 },
1563 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1564 "selfLink": "A String", # The URI of this resource.
1565 "user": "A String", # The email address of the user who initiated this operation.
1566 }</pre>
1567</div>
1568
1569<div class="method">
1570 <code class="details" id="startReplica">startReplica(project, instance)</code>
1571 <pre>Starts the replication in the read replica instance.
1572
1573Args:
1574 project: string, ID of the project that contains the read replica. (required)
1575 instance: string, Cloud SQL read replica instance name. (required)
1576
1577Returns:
1578 An object of the form:
1579
1580 { # 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.
1581 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1582 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1583 "fileType": "A String", # The file type for the specified uri.
1584 # SQL: The file contains SQL statements.
1585 # CSV: The file contains CSV data.
1586 "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.
1587 "kind": "sql#importContext", # This is always sql#importContext.
1588 "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.
1589 "csvImportOptions": { # Options for importing data as CSV.
1590 "table": "A String", # The table to which CSV data is imported.
1591 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1592 "A String",
1593 ],
1594 },
1595 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001596 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001597 "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.
1598 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1599 "kind": "sql#exportContext", # This is always sql#exportContext.
1600 "fileType": "A String", # The file type for the specified uri.
1601 # SQL: The file contains SQL statements.
1602 # CSV: The file contains CSV data.
1603 "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.
1604 "csvExportOptions": { # Options for exporting data as CSV.
1605 "selectQuery": "A String", # The select query used to extract the data.
1606 },
1607 "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.
1608 "A String",
1609 ],
1610 "sqlExportOptions": { # Options for exporting data as SQL statements.
1611 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1612 "A String",
1613 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001614 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08001615 },
1616 },
1617 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1618 "targetProject": "A String", # The project ID of the target instance related to this operation.
1619 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001620 "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 -08001621 "targetLink": "A String", # The URI of the instance related to the operation.
1622 "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 +00001623 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1624 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001625 "errors": [ # The list of errors encountered while processing this operation.
1626 { # Database instance operation error.
1627 "kind": "sql#operationError", # This is always sql#operationError.
1628 "code": "A String", # Identifies the specific error that occurred.
1629 "message": "A String", # Additional information about the error encountered.
1630 },
1631 ],
1632 },
1633 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1634 "selfLink": "A String", # The URI of this resource.
1635 "user": "A String", # The email address of the user who initiated this operation.
1636 }</pre>
1637</div>
1638
1639<div class="method">
1640 <code class="details" id="stopReplica">stopReplica(project, instance)</code>
1641 <pre>Stops the replication in the read replica instance.
1642
1643Args:
1644 project: string, ID of the project that contains the read replica. (required)
1645 instance: string, Cloud SQL read replica instance name. (required)
1646
1647Returns:
1648 An object of the form:
1649
1650 { # 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.
1651 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1652 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1653 "fileType": "A String", # The file type for the specified uri.
1654 # SQL: The file contains SQL statements.
1655 # CSV: The file contains CSV data.
1656 "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.
1657 "kind": "sql#importContext", # This is always sql#importContext.
1658 "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.
1659 "csvImportOptions": { # Options for importing data as CSV.
1660 "table": "A String", # The table to which CSV data is imported.
1661 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1662 "A String",
1663 ],
1664 },
1665 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001666 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001667 "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.
1668 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1669 "kind": "sql#exportContext", # This is always sql#exportContext.
1670 "fileType": "A String", # The file type for the specified uri.
1671 # SQL: The file contains SQL statements.
1672 # CSV: The file contains CSV data.
1673 "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.
1674 "csvExportOptions": { # Options for exporting data as CSV.
1675 "selectQuery": "A String", # The select query used to extract the data.
1676 },
1677 "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.
1678 "A String",
1679 ],
1680 "sqlExportOptions": { # Options for exporting data as SQL statements.
1681 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1682 "A String",
1683 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001684 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08001685 },
1686 },
1687 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1688 "targetProject": "A String", # The project ID of the target instance related to this operation.
1689 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001690 "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 -08001691 "targetLink": "A String", # The URI of the instance related to the operation.
1692 "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 +00001693 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1694 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001695 "errors": [ # The list of errors encountered while processing this operation.
1696 { # Database instance operation error.
1697 "kind": "sql#operationError", # This is always sql#operationError.
1698 "code": "A String", # Identifies the specific error that occurred.
1699 "message": "A String", # Additional information about the error encountered.
1700 },
1701 ],
1702 },
1703 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1704 "selfLink": "A String", # The URI of this resource.
1705 "user": "A String", # The email address of the user who initiated this operation.
1706 }</pre>
1707</div>
1708
1709<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001710 <code class="details" id="truncateLog">truncateLog(project, instance, body)</code>
1711 <pre>Truncate MySQL general and slow query log tables
1712
1713Args:
1714 project: string, Project ID of the Cloud SQL project. (required)
1715 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1716 body: object, The request body. (required)
1717 The object takes the form of:
1718
1719{ # Instance truncate log request.
1720 "truncateLogContext": { # Database Instance truncate log context. # Contains details about the truncate log operation.
1721 "logType": "A String", # The type of log to truncate. Valid values are MYSQL_GENERAL_TABLE and MYSQL_SLOW_TABLE.
1722 "kind": "sql#truncateLogContext", # This is always sql#truncateLogContext.
1723 },
1724 }
1725
1726
1727Returns:
1728 An object of the form:
1729
1730 { # 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.
1731 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1732 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1733 "fileType": "A String", # The file type for the specified uri.
1734 # SQL: The file contains SQL statements.
1735 # CSV: The file contains CSV data.
1736 "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.
1737 "kind": "sql#importContext", # This is always sql#importContext.
1738 "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.
1739 "csvImportOptions": { # Options for importing data as CSV.
1740 "table": "A String", # The table to which CSV data is imported.
1741 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1742 "A String",
1743 ],
1744 },
1745 },
1746 "kind": "sql#operation", # This is always sql#operation.
1747 "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.
1748 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1749 "kind": "sql#exportContext", # This is always sql#exportContext.
1750 "fileType": "A String", # The file type for the specified uri.
1751 # SQL: The file contains SQL statements.
1752 # CSV: The file contains CSV data.
1753 "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.
1754 "csvExportOptions": { # Options for exporting data as CSV.
1755 "selectQuery": "A String", # The select query used to extract the data.
1756 },
1757 "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.
1758 "A String",
1759 ],
1760 "sqlExportOptions": { # Options for exporting data as SQL statements.
1761 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1762 "A String",
1763 ],
1764 "schemaOnly": True or False, # Export only schemas.
1765 },
1766 },
1767 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1768 "targetProject": "A String", # The project ID of the target instance related to this operation.
1769 "targetId": "A String", # Name of the database instance related to this operation.
1770 "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 .
1771 "targetLink": "A String", # The URI of the instance related to the operation.
1772 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1773 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1774 "kind": "sql#operationErrors", # This is always sql#operationErrors.
1775 "errors": [ # The list of errors encountered while processing this operation.
1776 { # Database instance operation error.
1777 "kind": "sql#operationError", # This is always sql#operationError.
1778 "code": "A String", # Identifies the specific error that occurred.
1779 "message": "A String", # Additional information about the error encountered.
1780 },
1781 ],
1782 },
1783 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1784 "selfLink": "A String", # The URI of this resource.
1785 "user": "A String", # The email address of the user who initiated this operation.
1786 }</pre>
1787</div>
1788
1789<div class="method">
Craig Citroe633be12015-03-02 13:40:36 -08001790 <code class="details" id="update">update(project, instance, body)</code>
1791 <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.
1792
1793Args:
1794 project: string, Project ID of the project that contains the instance. (required)
1795 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1796 body: object, The request body. (required)
1797 The object takes the form of:
1798
1799{ # A Cloud SQL instance resource.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001800 "backendType": "A String", # FIRST_GEN: Basic Cloud SQL instance that runs in a Google-managed container.
1801 # SECOND_GEN: A newer Cloud SQL backend that runs in a Compute Engine VM.
1802 # EXTERNAL: A MySQL server that is not managed by Google.
1803 "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Users should use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ for details.
1804 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
1805 "ipAddresses": [ # The assigned IP addresses for the instance.
1806 { # Database instance IP Mapping.
1807 "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.
1808 "ipAddress": "A String", # The IP address assigned.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001809 "type": "A String", # The type of this IP address. A PRIMARY address is an address that can accept incoming connections. An OUTGOING address is the source address of connections originating from the instance, if supported.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001810 },
1811 ],
1812 "databaseVersion": "A String", # The database engine type and version. The databaseVersion can not be changed after instance creation. Can be MYSQL_5_5, MYSQL_5_6 or MYSQL_5_7. Defaults to MYSQL_5_6. MYSQL_5_7 is applicable only to Second Generation instances.
1813 "instanceType": "A String", # The instance type. This can be one of the following.
1814 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
1815 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
1816 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
1817 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
1818 "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension.
1819 "A String",
1820 ],
1821 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
1822 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
1823 # RUNNABLE: The instance is running, or is ready to run when accessed.
1824 # SUSPENDED: The instance is not available, for example due to problems with billing.
1825 # PENDING_CREATE: The instance is being created.
1826 # MAINTENANCE: The instance is down for maintenance.
1827 # FAILED: The instance creation failed.
1828 # UNKNOWN_STATE: The state of the instance is unknown.
1829 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
1830 "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
1831 "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The master can only failover to the falover replica when the status is true.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001832 "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001833 },
1834 "replicaNames": [ # The replicas of the instance.
1835 "A String",
1836 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001837 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
1838 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
1839 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
1840 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001841 "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
Craig Citroe633be12015-03-02 13:40:36 -08001842 "kind": "sql#instance", # This is always sql#instance.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001843 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
1844 "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only to First Generation instances.
1845 "serverCaCert": { # SslCerts Resource # SSL configuration.
1846 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
1847 "kind": "sql#sslCert", # This is always sql#sslCert.
1848 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
1849 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1850 "instance": "A String", # Name of the database instance.
1851 "cert": "A String", # PEM representation.
1852 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1853 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
1854 "selfLink": "A String", # The URI of this resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001855 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001856 "region": "A String", # The geographical region. Can be us-central (FIRST_GEN instances only), us-central1 (SECOND_GEN instances only), asia-east1 or europe-west1. Defaults to us-central or us-central1 depending on the instance type (First Generation or Second Generation). The region can not be changed after instance creation.
1857 "settings": { # Database instance settings. # The user settings.
1858 "databaseFlags": [ # The database flags passed to the instance at startup.
1859 { # MySQL flags for Cloud SQL instances.
1860 "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.
1861 "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.
1862 },
1863 ],
1864 "kind": "sql#settings", # This is always sql#settings.
1865 "dataDiskType": "A String", # The type of data disk. Only supported for Second Generation instances. The default type is PD_SSD. Applies only to Second Generation instances.
1866 "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should preferably be restarted for system maintenance puruposes. # The maintenance window for this instance. This specifies when the instance may be restarted for maintenance purposes. Applies only to Second Generation instances.
1867 "kind": "sql#maintenanceWindow", # This is always sql#maintenanceWindow.
1868 "updateTrack": "A String",
1869 "day": 42, # day of week (1-7), starting on Monday.
1870 "hour": 42, # hour of day - 0 to 23.
1871 },
1872 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. This property is only applicable to First Generation instances.
1873 "A String",
1874 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001875 "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. The activation policy cannot be updated together with other settings for Second Generation instances. Valid values:
1876 # ALWAYS: The instance is on; it is not deactivated by inactivity.
1877 # NEVER: The instance is off; it is not activated, even if a connection request arrives.
1878 # ON_DEMAND: The instance responds to incoming requests, and turns itself off when not in use. Instances with PER_USE pricing turn off after 15 minutes of inactivity. Instances with PER_PACKAGE pricing turn off after 12 hours of inactivity.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001879 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
1880 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
1881 "enabled": True or False, # Whether this configuration is enabled.
1882 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
1883 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
1884 },
1885 "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
1886 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
1887 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
1888 "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).
1889 { # An entry for an Access Control list.
1890 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1891 "kind": "sql#aclEntry", # This is always sql#aclEntry.
1892 "value": "A String", # The whitelisted value for the access control list.
1893 "name": "A String", # An optional label to identify this entry.
1894 },
1895 ],
1896 },
1897 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
1898 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1899 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS. This property is only applicable to First Generation instances.
1900 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property is only applicable to First Generation instances.
1901 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE. Only PER_USE is supported for Second Generation instances.
1902 "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.
1903 "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is false. Applies only to Second Generation instances.
1904 "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or GCE zone for better performance. App Engine co-location is only applicable to First Generation instances.
1905 "kind": "sql#locationPreference", # This is always sql#locationPreference.
1906 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
1907 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
1908 },
1909 "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Applies only to Second Generation instances.
1910 },
1911 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001912 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
1913 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001914 "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.
1915 # 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 +00001916 "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.
1917 "username": "A String", # The username for the replication connection.
1918 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
1919 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
1920 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
1921 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
1922 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
1923 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
1924 "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.
1925 "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.
1926 "password": "A String", # The password for the replication connection.
1927 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
1928 },
1929 },
Craig Citroe633be12015-03-02 13:40:36 -08001930 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -08001931 }
1932
1933
1934Returns:
1935 An object of the form:
1936
1937 { # 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.
1938 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1939 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1940 "fileType": "A String", # The file type for the specified uri.
1941 # SQL: The file contains SQL statements.
1942 # CSV: The file contains CSV data.
1943 "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.
1944 "kind": "sql#importContext", # This is always sql#importContext.
1945 "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.
1946 "csvImportOptions": { # Options for importing data as CSV.
1947 "table": "A String", # The table to which CSV data is imported.
1948 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1949 "A String",
1950 ],
1951 },
1952 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001953 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001954 "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.
1955 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1956 "kind": "sql#exportContext", # This is always sql#exportContext.
1957 "fileType": "A String", # The file type for the specified uri.
1958 # SQL: The file contains SQL statements.
1959 # CSV: The file contains CSV data.
1960 "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.
1961 "csvExportOptions": { # Options for exporting data as CSV.
1962 "selectQuery": "A String", # The select query used to extract the data.
1963 },
1964 "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.
1965 "A String",
1966 ],
1967 "sqlExportOptions": { # Options for exporting data as SQL statements.
1968 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1969 "A String",
1970 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001971 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08001972 },
1973 },
1974 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1975 "targetProject": "A String", # The project ID of the target instance related to this operation.
1976 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001977 "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 -08001978 "targetLink": "A String", # The URI of the instance related to the operation.
1979 "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 +00001980 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1981 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001982 "errors": [ # The list of errors encountered while processing this operation.
1983 { # Database instance operation error.
1984 "kind": "sql#operationError", # This is always sql#operationError.
1985 "code": "A String", # Identifies the specific error that occurred.
1986 "message": "A String", # Additional information about the error encountered.
1987 },
1988 ],
1989 },
1990 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1991 "selfLink": "A String", # The URI of this resource.
1992 "user": "A String", # The email address of the user who initiated this operation.
1993 }</pre>
1994</div>
1995
1996</body></html>