blob: 734af62490947d671ad8d5e32adfa3efef77f20d [file] [log] [blame]
Craig Citroe633be12015-03-02 13:40:36 -08001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="sqladmin_v1beta4.html">Cloud SQL Administration API</a> . <a href="sqladmin_v1beta4.instances.html">instances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#clone">clone(project, instance, body)</a></code></p>
79<p class="firstline">Creates a Cloud SQL instance as a clone of the source instance.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(project, instance)</a></code></p>
82<p class="firstline">Deletes a Cloud SQL instance.</p>
83<p class="toc_element">
84 <code><a href="#export">export(project, instance, body)</a></code></p>
85<p class="firstline">Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, instance)</a></code></p>
88<p class="firstline">Retrieves a resource containing information about a Cloud SQL instance.</p>
89<p class="toc_element">
90 <code><a href="#import_">import_(project, instance, body)</a></code></p>
91<p class="firstline">Imports data into a Cloud SQL instance from a MySQL dump file in Google Cloud Storage.</p>
92<p class="toc_element">
93 <code><a href="#insert">insert(project, body)</a></code></p>
94<p class="firstline">Creates a new Cloud SQL instance.</p>
95<p class="toc_element">
96 <code><a href="#list">list(project, pageToken=None, maxResults=None)</a></code></p>
97<p class="firstline">Lists instances under a given project in the alphabetical order of the instance name.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
102 <code><a href="#patch">patch(project, instance, body)</a></code></p>
103<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>
104<p class="toc_element">
105 <code><a href="#promoteReplica">promoteReplica(project, instance)</a></code></p>
106<p class="firstline">Promotes the read replica instance to be a stand-alone Cloud SQL instance.</p>
107<p class="toc_element">
108 <code><a href="#resetSslConfig">resetSslConfig(project, instance)</a></code></p>
109<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>
110<p class="toc_element">
111 <code><a href="#restart">restart(project, instance)</a></code></p>
112<p class="firstline">Restarts a Cloud SQL instance.</p>
113<p class="toc_element">
114 <code><a href="#restoreBackup">restoreBackup(project, instance, body)</a></code></p>
115<p class="firstline">Restores a backup of a Cloud SQL instance.</p>
116<p class="toc_element">
117 <code><a href="#startReplica">startReplica(project, instance)</a></code></p>
118<p class="firstline">Starts the replication in the read replica instance.</p>
119<p class="toc_element">
120 <code><a href="#stopReplica">stopReplica(project, instance)</a></code></p>
121<p class="firstline">Stops the replication in the read replica instance.</p>
122<p class="toc_element">
123 <code><a href="#update">update(project, instance, body)</a></code></p>
124<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>
125<h3>Method Details</h3>
126<div class="method">
127 <code class="details" id="clone">clone(project, instance, body)</code>
128 <pre>Creates a Cloud SQL instance as a clone of the source instance.
129
130Args:
131 project: string, Project ID of the source as well as the clone Cloud SQL instance. (required)
132 instance: string, The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID. (required)
133 body: object, The request body. (required)
134 The object takes the form of:
135
136{ # Database instance clone request.
137 "cloneContext": { # Database instance clone context. # Contains details about the clone operation.
138 "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.
139 "binLogPosition": "A String", # Position (offset) within the binary log file.
140 "kind": "sql#binLogCoordinates", # This is always sql#binLogCoordinates.
141 "binLogFileName": "A String", # Name of the binary log file for a Cloud SQL instance.
142 },
143 "kind": "sql#cloneContext", # This is always sql#cloneContext.
144 "destinationInstanceName": "A String", # Name of the Cloud SQL instance to be created as a clone.
145 },
146 }
147
148
149Returns:
150 An object of the form:
151
152 { # 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.
153 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
154 "importContext": { # Database instance import context. # The context for import operation, if applicable.
155 "fileType": "A String", # The file type for the specified uri.
156 # SQL: The file contains SQL statements.
157 # CSV: The file contains CSV data.
158 "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.
159 "kind": "sql#importContext", # This is always sql#importContext.
160 "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.
161 "csvImportOptions": { # Options for importing data as CSV.
162 "table": "A String", # The table to which CSV data is imported.
163 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
164 "A String",
165 ],
166 },
167 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000168 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800169 "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.
170 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
171 "kind": "sql#exportContext", # This is always sql#exportContext.
172 "fileType": "A String", # The file type for the specified uri.
173 # SQL: The file contains SQL statements.
174 # CSV: The file contains CSV data.
175 "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.
176 "csvExportOptions": { # Options for exporting data as CSV.
177 "selectQuery": "A String", # The select query used to extract the data.
178 },
179 "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.
180 "A String",
181 ],
182 "sqlExportOptions": { # Options for exporting data as SQL statements.
183 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
184 "A String",
185 ],
186 },
187 },
188 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
189 "targetProject": "A String", # The project ID of the target instance related to this operation.
190 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000191 "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 -0800192 "targetLink": "A String", # The URI of the instance related to the operation.
193 "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 +0000194 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
195 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800196 "errors": [ # The list of errors encountered while processing this operation.
197 { # Database instance operation error.
198 "kind": "sql#operationError", # This is always sql#operationError.
199 "code": "A String", # Identifies the specific error that occurred.
200 "message": "A String", # Additional information about the error encountered.
201 },
202 ],
203 },
204 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
205 "selfLink": "A String", # The URI of this resource.
206 "user": "A String", # The email address of the user who initiated this operation.
207 }</pre>
208</div>
209
210<div class="method">
211 <code class="details" id="delete">delete(project, instance)</code>
212 <pre>Deletes a Cloud SQL instance.
213
214Args:
215 project: string, Project ID of the project that contains the instance to be deleted. (required)
216 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
217
218Returns:
219 An object of the form:
220
221 { # 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.
222 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
223 "importContext": { # Database instance import context. # The context for import operation, if applicable.
224 "fileType": "A String", # The file type for the specified uri.
225 # SQL: The file contains SQL statements.
226 # CSV: The file contains CSV data.
227 "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.
228 "kind": "sql#importContext", # This is always sql#importContext.
229 "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.
230 "csvImportOptions": { # Options for importing data as CSV.
231 "table": "A String", # The table to which CSV data is imported.
232 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
233 "A String",
234 ],
235 },
236 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000237 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800238 "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.
239 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
240 "kind": "sql#exportContext", # This is always sql#exportContext.
241 "fileType": "A String", # The file type for the specified uri.
242 # SQL: The file contains SQL statements.
243 # CSV: The file contains CSV data.
244 "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.
245 "csvExportOptions": { # Options for exporting data as CSV.
246 "selectQuery": "A String", # The select query used to extract the data.
247 },
248 "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.
249 "A String",
250 ],
251 "sqlExportOptions": { # Options for exporting data as SQL statements.
252 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
253 "A String",
254 ],
255 },
256 },
257 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
258 "targetProject": "A String", # The project ID of the target instance related to this operation.
259 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000260 "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 -0800261 "targetLink": "A String", # The URI of the instance related to the operation.
262 "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 +0000263 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
264 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800265 "errors": [ # The list of errors encountered while processing this operation.
266 { # Database instance operation error.
267 "kind": "sql#operationError", # This is always sql#operationError.
268 "code": "A String", # Identifies the specific error that occurred.
269 "message": "A String", # Additional information about the error encountered.
270 },
271 ],
272 },
273 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
274 "selfLink": "A String", # The URI of this resource.
275 "user": "A String", # The email address of the user who initiated this operation.
276 }</pre>
277</div>
278
279<div class="method">
280 <code class="details" id="export">export(project, instance, body)</code>
281 <pre>Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file.
282
283Args:
284 project: string, Project ID of the project that contains the instance to be exported. (required)
285 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
286 body: object, The request body. (required)
287 The object takes the form of:
288
289{ # Database instance export request.
290 "exportContext": { # Database instance export context. # Contains details about the export operation.
291 "kind": "sql#exportContext", # This is always sql#exportContext.
292 "fileType": "A String", # The file type for the specified uri.
293 # SQL: The file contains SQL statements.
294 # CSV: The file contains CSV data.
295 "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.
296 "csvExportOptions": { # Options for exporting data as CSV.
297 "selectQuery": "A String", # The select query used to extract the data.
298 },
299 "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.
300 "A String",
301 ],
302 "sqlExportOptions": { # Options for exporting data as SQL statements.
303 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
304 "A String",
305 ],
306 },
307 },
308 }
309
310
311Returns:
312 An object of the form:
313
314 { # 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.
315 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
316 "importContext": { # Database instance import context. # The context for import operation, if applicable.
317 "fileType": "A String", # The file type for the specified uri.
318 # SQL: The file contains SQL statements.
319 # CSV: The file contains CSV data.
320 "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.
321 "kind": "sql#importContext", # This is always sql#importContext.
322 "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.
323 "csvImportOptions": { # Options for importing data as CSV.
324 "table": "A String", # The table to which CSV data is imported.
325 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
326 "A String",
327 ],
328 },
329 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000330 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800331 "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.
332 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
333 "kind": "sql#exportContext", # This is always sql#exportContext.
334 "fileType": "A String", # The file type for the specified uri.
335 # SQL: The file contains SQL statements.
336 # CSV: The file contains CSV data.
337 "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.
338 "csvExportOptions": { # Options for exporting data as CSV.
339 "selectQuery": "A String", # The select query used to extract the data.
340 },
341 "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.
342 "A String",
343 ],
344 "sqlExportOptions": { # Options for exporting data as SQL statements.
345 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
346 "A String",
347 ],
348 },
349 },
350 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
351 "targetProject": "A String", # The project ID of the target instance related to this operation.
352 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000353 "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 -0800354 "targetLink": "A String", # The URI of the instance related to the operation.
355 "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 +0000356 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
357 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800358 "errors": [ # The list of errors encountered while processing this operation.
359 { # Database instance operation error.
360 "kind": "sql#operationError", # This is always sql#operationError.
361 "code": "A String", # Identifies the specific error that occurred.
362 "message": "A String", # Additional information about the error encountered.
363 },
364 ],
365 },
366 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
367 "selfLink": "A String", # The URI of this resource.
368 "user": "A String", # The email address of the user who initiated this operation.
369 }</pre>
370</div>
371
372<div class="method">
373 <code class="details" id="get">get(project, instance)</code>
374 <pre>Retrieves a resource containing information about a Cloud SQL instance.
375
376Args:
377 project: string, Project ID of the project that contains the instance. (required)
378 instance: string, Database instance ID. This does not include the project ID. (required)
379
380Returns:
381 An object of the form:
382
383 { # A Cloud SQL instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000384 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
385 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
386 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
387 },
Craig Citroe633be12015-03-02 13:40:36 -0800388 "kind": "sql#instance", # This is always sql#instance.
389 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
390 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000391 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
392 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
393 "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.
394 "username": "A String", # The username for the replication connection.
395 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
396 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
397 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
398 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
399 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
400 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
401 "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.
402 "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.
403 "password": "A String", # The password for the replication connection.
404 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
405 },
406 },
407 "replicaNames": [ # The replicas of the instance.
408 "A String",
409 ],
410 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
411 "region": "A String", # The geographical region. Can be us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -0800412 "serverCaCert": { # SslCerts Resource # SSL configuration.
413 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
414 "kind": "sql#sslCert", # This is always sql#sslCert.
415 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
416 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
417 "instance": "A String", # Name of the database instance.
418 "cert": "A String", # PEM representation.
419 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
420 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000421 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800422 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000423 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
424 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
425 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
426 # RUNNABLE: The instance is running, or is ready to run when accessed.
427 # SUSPENDED: The instance is not available, for example due to problems with billing.
428 # PENDING_CREATE: The instance is being created.
429 # MAINTENANCE: The instance is down for maintenance.
430 # FAILED: The instance creation failed.
431 # UNKNOWN_STATE: The state of the instance is unknown.
432 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
433 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
434 "ipAddresses": [ # The assigned IP addresses for the instance.
435 { # Database instance IP Mapping.
436 "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.
437 "ipAddress": "A String", # The IP address assigned.
438 },
Craig Citroe633be12015-03-02 13:40:36 -0800439 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000440 "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -0800441 "settings": { # Database instance settings. # The user settings.
442 "databaseFlags": [ # The database flags passed to the instance at startup.
443 { # MySQL flags for Cloud SQL instances.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000444 "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.
445 "value": "A String", # The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value.
Craig Citroe633be12015-03-02 13:40:36 -0800446 },
447 ],
448 "kind": "sql#settings", # This is always sql#settings.
449 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
450 "A String",
451 ],
452 "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
453 # ALWAYS: The instance should always be active.
454 # NEVER: The instance should never be activated.
455 # ON_DEMAND: The instance is activated upon receiving requests.
456 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
457 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
458 "enabled": True or False, # Whether this configuration is enabled.
459 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
460 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
461 },
462 "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.
463 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
464 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
465 "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).
466 { # An entry for an Access Control list.
467 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
468 "kind": "sql#aclEntry", # This is always sql#aclEntry.
469 "value": "A String", # The whitelisted value for the access control list.
470 "name": "A String", # An optional label to identify this entry.
471 },
472 ],
473 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000474 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
Craig Citroe633be12015-03-02 13:40:36 -0800475 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
476 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000477 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled.
Craig Citroe633be12015-03-02 13:40:36 -0800478 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
479 "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.
480 "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.
481 "kind": "sql#locationPreference", # This is always sql#locationPreference.
482 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
483 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
484 },
485 },
Craig Citroe633be12015-03-02 13:40:36 -0800486 "instanceType": "A String", # The instance type. This can be one of the following.
487 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000488 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
Craig Citroe633be12015-03-02 13:40:36 -0800489 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
490 "selfLink": "A String", # The URI of this resource.
491 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
492 }</pre>
493</div>
494
495<div class="method">
496 <code class="details" id="import_">import_(project, instance, body)</code>
497 <pre>Imports data into a Cloud SQL instance from a MySQL dump file in Google Cloud Storage.
498
499Args:
500 project: string, Project ID of the project that contains the instance. (required)
501 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
502 body: object, The request body. (required)
503 The object takes the form of:
504
505{ # Database instance import request.
506 "importContext": { # Database instance import context. # Contains details about the import operation.
507 "fileType": "A String", # The file type for the specified uri.
508 # SQL: The file contains SQL statements.
509 # CSV: The file contains CSV data.
510 "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.
511 "kind": "sql#importContext", # This is always sql#importContext.
512 "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.
513 "csvImportOptions": { # Options for importing data as CSV.
514 "table": "A String", # The table to which CSV data is imported.
515 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
516 "A String",
517 ],
518 },
519 },
520 }
521
522
523Returns:
524 An object of the form:
525
526 { # 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.
527 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
528 "importContext": { # Database instance import context. # The context for import operation, if applicable.
529 "fileType": "A String", # The file type for the specified uri.
530 # SQL: The file contains SQL statements.
531 # CSV: The file contains CSV data.
532 "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.
533 "kind": "sql#importContext", # This is always sql#importContext.
534 "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.
535 "csvImportOptions": { # Options for importing data as CSV.
536 "table": "A String", # The table to which CSV data is imported.
537 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
538 "A String",
539 ],
540 },
541 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000542 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800543 "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.
544 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
545 "kind": "sql#exportContext", # This is always sql#exportContext.
546 "fileType": "A String", # The file type for the specified uri.
547 # SQL: The file contains SQL statements.
548 # CSV: The file contains CSV data.
549 "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.
550 "csvExportOptions": { # Options for exporting data as CSV.
551 "selectQuery": "A String", # The select query used to extract the data.
552 },
553 "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.
554 "A String",
555 ],
556 "sqlExportOptions": { # Options for exporting data as SQL statements.
557 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
558 "A String",
559 ],
560 },
561 },
562 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
563 "targetProject": "A String", # The project ID of the target instance related to this operation.
564 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000565 "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 -0800566 "targetLink": "A String", # The URI of the instance related to the operation.
567 "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 +0000568 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
569 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800570 "errors": [ # The list of errors encountered while processing this operation.
571 { # Database instance operation error.
572 "kind": "sql#operationError", # This is always sql#operationError.
573 "code": "A String", # Identifies the specific error that occurred.
574 "message": "A String", # Additional information about the error encountered.
575 },
576 ],
577 },
578 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
579 "selfLink": "A String", # The URI of this resource.
580 "user": "A String", # The email address of the user who initiated this operation.
581 }</pre>
582</div>
583
584<div class="method">
585 <code class="details" id="insert">insert(project, body)</code>
586 <pre>Creates a new Cloud SQL instance.
587
588Args:
589 project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required)
590 body: object, The request body. (required)
591 The object takes the form of:
592
593{ # A Cloud SQL instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000594 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
595 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
596 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
597 },
Craig Citroe633be12015-03-02 13:40:36 -0800598 "kind": "sql#instance", # This is always sql#instance.
599 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
600 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000601 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
602 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
603 "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.
604 "username": "A String", # The username for the replication connection.
605 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
606 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
607 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
608 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
609 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
610 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
611 "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.
612 "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.
613 "password": "A String", # The password for the replication connection.
614 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
615 },
616 },
617 "replicaNames": [ # The replicas of the instance.
618 "A String",
619 ],
620 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
621 "region": "A String", # The geographical region. Can be us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -0800622 "serverCaCert": { # SslCerts Resource # SSL configuration.
623 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
624 "kind": "sql#sslCert", # This is always sql#sslCert.
625 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
626 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
627 "instance": "A String", # Name of the database instance.
628 "cert": "A String", # PEM representation.
629 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
630 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000631 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800632 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000633 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
634 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
635 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
636 # RUNNABLE: The instance is running, or is ready to run when accessed.
637 # SUSPENDED: The instance is not available, for example due to problems with billing.
638 # PENDING_CREATE: The instance is being created.
639 # MAINTENANCE: The instance is down for maintenance.
640 # FAILED: The instance creation failed.
641 # UNKNOWN_STATE: The state of the instance is unknown.
642 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
643 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
644 "ipAddresses": [ # The assigned IP addresses for the instance.
645 { # Database instance IP Mapping.
646 "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.
647 "ipAddress": "A String", # The IP address assigned.
648 },
Craig Citroe633be12015-03-02 13:40:36 -0800649 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000650 "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -0800651 "settings": { # Database instance settings. # The user settings.
652 "databaseFlags": [ # The database flags passed to the instance at startup.
653 { # MySQL flags for Cloud SQL instances.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000654 "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.
655 "value": "A String", # The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value.
Craig Citroe633be12015-03-02 13:40:36 -0800656 },
657 ],
658 "kind": "sql#settings", # This is always sql#settings.
659 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
660 "A String",
661 ],
662 "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
663 # ALWAYS: The instance should always be active.
664 # NEVER: The instance should never be activated.
665 # ON_DEMAND: The instance is activated upon receiving requests.
666 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
667 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
668 "enabled": True or False, # Whether this configuration is enabled.
669 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
670 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
671 },
672 "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.
673 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
674 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
675 "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).
676 { # An entry for an Access Control list.
677 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
678 "kind": "sql#aclEntry", # This is always sql#aclEntry.
679 "value": "A String", # The whitelisted value for the access control list.
680 "name": "A String", # An optional label to identify this entry.
681 },
682 ],
683 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000684 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
Craig Citroe633be12015-03-02 13:40:36 -0800685 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
686 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000687 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled.
Craig Citroe633be12015-03-02 13:40:36 -0800688 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
689 "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.
690 "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.
691 "kind": "sql#locationPreference", # This is always sql#locationPreference.
692 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
693 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
694 },
695 },
Craig Citroe633be12015-03-02 13:40:36 -0800696 "instanceType": "A String", # The instance type. This can be one of the following.
697 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000698 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
Craig Citroe633be12015-03-02 13:40:36 -0800699 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
700 "selfLink": "A String", # The URI of this resource.
701 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
702 }
703
704
705Returns:
706 An object of the form:
707
708 { # 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.
709 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
710 "importContext": { # Database instance import context. # The context for import operation, if applicable.
711 "fileType": "A String", # The file type for the specified uri.
712 # SQL: The file contains SQL statements.
713 # CSV: The file contains CSV data.
714 "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.
715 "kind": "sql#importContext", # This is always sql#importContext.
716 "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.
717 "csvImportOptions": { # Options for importing data as CSV.
718 "table": "A String", # The table to which CSV data is imported.
719 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
720 "A String",
721 ],
722 },
723 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000724 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800725 "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.
726 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
727 "kind": "sql#exportContext", # This is always sql#exportContext.
728 "fileType": "A String", # The file type for the specified uri.
729 # SQL: The file contains SQL statements.
730 # CSV: The file contains CSV data.
731 "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.
732 "csvExportOptions": { # Options for exporting data as CSV.
733 "selectQuery": "A String", # The select query used to extract the data.
734 },
735 "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.
736 "A String",
737 ],
738 "sqlExportOptions": { # Options for exporting data as SQL statements.
739 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
740 "A String",
741 ],
742 },
743 },
744 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
745 "targetProject": "A String", # The project ID of the target instance related to this operation.
746 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000747 "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 -0800748 "targetLink": "A String", # The URI of the instance related to the operation.
749 "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 +0000750 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
751 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800752 "errors": [ # The list of errors encountered while processing this operation.
753 { # Database instance operation error.
754 "kind": "sql#operationError", # This is always sql#operationError.
755 "code": "A String", # Identifies the specific error that occurred.
756 "message": "A String", # Additional information about the error encountered.
757 },
758 ],
759 },
760 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
761 "selfLink": "A String", # The URI of this resource.
762 "user": "A String", # The email address of the user who initiated this operation.
763 }</pre>
764</div>
765
766<div class="method">
767 <code class="details" id="list">list(project, pageToken=None, maxResults=None)</code>
768 <pre>Lists instances under a given project in the alphabetical order of the instance name.
769
770Args:
771 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
772 pageToken: string, A previously-returned page token representing part of the larger set of results to view.
773 maxResults: integer, The maximum number of results to return per response.
774
775Returns:
776 An object of the form:
777
778 { # Database instances list response.
779 "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.
780 "items": [ # List of database instance resources.
781 { # A Cloud SQL instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000782 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
783 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
784 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
785 },
Craig Citroe633be12015-03-02 13:40:36 -0800786 "kind": "sql#instance", # This is always sql#instance.
787 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
788 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000789 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
790 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
791 "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.
792 "username": "A String", # The username for the replication connection.
793 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
794 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
795 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
796 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
797 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
798 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
799 "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.
800 "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.
801 "password": "A String", # The password for the replication connection.
802 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
803 },
804 },
805 "replicaNames": [ # The replicas of the instance.
806 "A String",
807 ],
808 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
809 "region": "A String", # The geographical region. Can be us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -0800810 "serverCaCert": { # SslCerts Resource # SSL configuration.
811 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
812 "kind": "sql#sslCert", # This is always sql#sslCert.
813 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
814 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
815 "instance": "A String", # Name of the database instance.
816 "cert": "A String", # PEM representation.
817 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
818 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000819 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800820 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000821 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
822 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
823 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
824 # RUNNABLE: The instance is running, or is ready to run when accessed.
825 # SUSPENDED: The instance is not available, for example due to problems with billing.
826 # PENDING_CREATE: The instance is being created.
827 # MAINTENANCE: The instance is down for maintenance.
828 # FAILED: The instance creation failed.
829 # UNKNOWN_STATE: The state of the instance is unknown.
830 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
831 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
832 "ipAddresses": [ # The assigned IP addresses for the instance.
833 { # Database instance IP Mapping.
834 "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.
835 "ipAddress": "A String", # The IP address assigned.
836 },
Craig Citroe633be12015-03-02 13:40:36 -0800837 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000838 "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -0800839 "settings": { # Database instance settings. # The user settings.
840 "databaseFlags": [ # The database flags passed to the instance at startup.
841 { # MySQL flags for Cloud SQL instances.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000842 "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.
843 "value": "A String", # The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value.
Craig Citroe633be12015-03-02 13:40:36 -0800844 },
845 ],
846 "kind": "sql#settings", # This is always sql#settings.
847 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
848 "A String",
849 ],
850 "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
851 # ALWAYS: The instance should always be active.
852 # NEVER: The instance should never be activated.
853 # ON_DEMAND: The instance is activated upon receiving requests.
854 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
855 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
856 "enabled": True or False, # Whether this configuration is enabled.
857 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
858 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
859 },
860 "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.
861 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
862 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
863 "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).
864 { # An entry for an Access Control list.
865 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
866 "kind": "sql#aclEntry", # This is always sql#aclEntry.
867 "value": "A String", # The whitelisted value for the access control list.
868 "name": "A String", # An optional label to identify this entry.
869 },
870 ],
871 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000872 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
Craig Citroe633be12015-03-02 13:40:36 -0800873 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
874 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000875 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled.
Craig Citroe633be12015-03-02 13:40:36 -0800876 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
877 "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.
878 "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.
879 "kind": "sql#locationPreference", # This is always sql#locationPreference.
880 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
881 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
882 },
883 },
Craig Citroe633be12015-03-02 13:40:36 -0800884 "instanceType": "A String", # The instance type. This can be one of the following.
885 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000886 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
Craig Citroe633be12015-03-02 13:40:36 -0800887 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
888 "selfLink": "A String", # The URI of this resource.
889 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
890 },
891 ],
892 "kind": "sql#instancesList", # This is always sql#instancesList.
893 }</pre>
894</div>
895
896<div class="method">
897 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
898 <pre>Retrieves the next page of results.
899
900Args:
901 previous_request: The request for the previous page. (required)
902 previous_response: The response from the request for the previous page. (required)
903
904Returns:
905 A request object that you can call 'execute()' on to request the next
906 page. Returns None if there are no more items in the collection.
907 </pre>
908</div>
909
910<div class="method">
911 <code class="details" id="patch">patch(project, instance, body)</code>
912 <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.
913
914Args:
915 project: string, Project ID of the project that contains the instance. (required)
916 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
917 body: object, The request body. (required)
918 The object takes the form of:
919
920{ # A Cloud SQL instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000921 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
922 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
923 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
924 },
Craig Citroe633be12015-03-02 13:40:36 -0800925 "kind": "sql#instance", # This is always sql#instance.
926 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
927 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000928 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
929 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
930 "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.
931 "username": "A String", # The username for the replication connection.
932 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
933 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
934 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
935 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
936 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
937 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
938 "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.
939 "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.
940 "password": "A String", # The password for the replication connection.
941 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
942 },
943 },
944 "replicaNames": [ # The replicas of the instance.
945 "A String",
946 ],
947 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
948 "region": "A String", # The geographical region. Can be us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -0800949 "serverCaCert": { # SslCerts Resource # SSL configuration.
950 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
951 "kind": "sql#sslCert", # This is always sql#sslCert.
952 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
953 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
954 "instance": "A String", # Name of the database instance.
955 "cert": "A String", # PEM representation.
956 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
957 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000958 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800959 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000960 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
961 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
962 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
963 # RUNNABLE: The instance is running, or is ready to run when accessed.
964 # SUSPENDED: The instance is not available, for example due to problems with billing.
965 # PENDING_CREATE: The instance is being created.
966 # MAINTENANCE: The instance is down for maintenance.
967 # FAILED: The instance creation failed.
968 # UNKNOWN_STATE: The state of the instance is unknown.
969 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
970 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
971 "ipAddresses": [ # The assigned IP addresses for the instance.
972 { # Database instance IP Mapping.
973 "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.
974 "ipAddress": "A String", # The IP address assigned.
975 },
Craig Citroe633be12015-03-02 13:40:36 -0800976 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000977 "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -0800978 "settings": { # Database instance settings. # The user settings.
979 "databaseFlags": [ # The database flags passed to the instance at startup.
980 { # MySQL flags for Cloud SQL instances.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000981 "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.
982 "value": "A String", # The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value.
Craig Citroe633be12015-03-02 13:40:36 -0800983 },
984 ],
985 "kind": "sql#settings", # This is always sql#settings.
986 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
987 "A String",
988 ],
989 "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
990 # ALWAYS: The instance should always be active.
991 # NEVER: The instance should never be activated.
992 # ON_DEMAND: The instance is activated upon receiving requests.
993 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
994 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
995 "enabled": True or False, # Whether this configuration is enabled.
996 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
997 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
998 },
999 "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.
1000 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
1001 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
1002 "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).
1003 { # An entry for an Access Control list.
1004 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1005 "kind": "sql#aclEntry", # This is always sql#aclEntry.
1006 "value": "A String", # The whitelisted value for the access control list.
1007 "name": "A String", # An optional label to identify this entry.
1008 },
1009 ],
1010 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001011 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
Craig Citroe633be12015-03-02 13:40:36 -08001012 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1013 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001014 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled.
Craig Citroe633be12015-03-02 13:40:36 -08001015 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
1016 "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.
1017 "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.
1018 "kind": "sql#locationPreference", # This is always sql#locationPreference.
1019 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
1020 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
1021 },
1022 },
Craig Citroe633be12015-03-02 13:40:36 -08001023 "instanceType": "A String", # The instance type. This can be one of the following.
1024 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001025 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
Craig Citroe633be12015-03-02 13:40:36 -08001026 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
1027 "selfLink": "A String", # The URI of this resource.
1028 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
1029 }
1030
1031
1032Returns:
1033 An object of the form:
1034
1035 { # 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.
1036 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1037 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1038 "fileType": "A String", # The file type for the specified uri.
1039 # SQL: The file contains SQL statements.
1040 # CSV: The file contains CSV data.
1041 "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.
1042 "kind": "sql#importContext", # This is always sql#importContext.
1043 "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.
1044 "csvImportOptions": { # Options for importing data as CSV.
1045 "table": "A String", # The table to which CSV data is imported.
1046 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1047 "A String",
1048 ],
1049 },
1050 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001051 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001052 "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.
1053 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1054 "kind": "sql#exportContext", # This is always sql#exportContext.
1055 "fileType": "A String", # The file type for the specified uri.
1056 # SQL: The file contains SQL statements.
1057 # CSV: The file contains CSV data.
1058 "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.
1059 "csvExportOptions": { # Options for exporting data as CSV.
1060 "selectQuery": "A String", # The select query used to extract the data.
1061 },
1062 "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.
1063 "A String",
1064 ],
1065 "sqlExportOptions": { # Options for exporting data as SQL statements.
1066 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1067 "A String",
1068 ],
1069 },
1070 },
1071 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1072 "targetProject": "A String", # The project ID of the target instance related to this operation.
1073 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001074 "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 -08001075 "targetLink": "A String", # The URI of the instance related to the operation.
1076 "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 +00001077 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1078 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001079 "errors": [ # The list of errors encountered while processing this operation.
1080 { # Database instance operation error.
1081 "kind": "sql#operationError", # This is always sql#operationError.
1082 "code": "A String", # Identifies the specific error that occurred.
1083 "message": "A String", # Additional information about the error encountered.
1084 },
1085 ],
1086 },
1087 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1088 "selfLink": "A String", # The URI of this resource.
1089 "user": "A String", # The email address of the user who initiated this operation.
1090 }</pre>
1091</div>
1092
1093<div class="method">
1094 <code class="details" id="promoteReplica">promoteReplica(project, instance)</code>
1095 <pre>Promotes the read replica instance to be a stand-alone Cloud SQL instance.
1096
1097Args:
1098 project: string, ID of the project that contains the read replica. (required)
1099 instance: string, Cloud SQL read replica instance name. (required)
1100
1101Returns:
1102 An object of the form:
1103
1104 { # 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.
1105 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1106 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1107 "fileType": "A String", # The file type for the specified uri.
1108 # SQL: The file contains SQL statements.
1109 # CSV: The file contains CSV data.
1110 "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.
1111 "kind": "sql#importContext", # This is always sql#importContext.
1112 "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.
1113 "csvImportOptions": { # Options for importing data as CSV.
1114 "table": "A String", # The table to which CSV data is imported.
1115 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1116 "A String",
1117 ],
1118 },
1119 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001120 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001121 "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.
1122 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1123 "kind": "sql#exportContext", # This is always sql#exportContext.
1124 "fileType": "A String", # The file type for the specified uri.
1125 # SQL: The file contains SQL statements.
1126 # CSV: The file contains CSV data.
1127 "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.
1128 "csvExportOptions": { # Options for exporting data as CSV.
1129 "selectQuery": "A String", # The select query used to extract the data.
1130 },
1131 "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.
1132 "A String",
1133 ],
1134 "sqlExportOptions": { # Options for exporting data as SQL statements.
1135 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1136 "A String",
1137 ],
1138 },
1139 },
1140 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1141 "targetProject": "A String", # The project ID of the target instance related to this operation.
1142 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001143 "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 -08001144 "targetLink": "A String", # The URI of the instance related to the operation.
1145 "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 +00001146 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1147 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001148 "errors": [ # The list of errors encountered while processing this operation.
1149 { # Database instance operation error.
1150 "kind": "sql#operationError", # This is always sql#operationError.
1151 "code": "A String", # Identifies the specific error that occurred.
1152 "message": "A String", # Additional information about the error encountered.
1153 },
1154 ],
1155 },
1156 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1157 "selfLink": "A String", # The URI of this resource.
1158 "user": "A String", # The email address of the user who initiated this operation.
1159 }</pre>
1160</div>
1161
1162<div class="method">
1163 <code class="details" id="resetSslConfig">resetSslConfig(project, instance)</code>
1164 <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.
1165
1166Args:
1167 project: string, Project ID of the project that contains the instance. (required)
1168 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1169
1170Returns:
1171 An object of the form:
1172
1173 { # 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.
1174 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1175 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1176 "fileType": "A String", # The file type for the specified uri.
1177 # SQL: The file contains SQL statements.
1178 # CSV: The file contains CSV data.
1179 "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.
1180 "kind": "sql#importContext", # This is always sql#importContext.
1181 "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.
1182 "csvImportOptions": { # Options for importing data as CSV.
1183 "table": "A String", # The table to which CSV data is imported.
1184 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1185 "A String",
1186 ],
1187 },
1188 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001189 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001190 "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.
1191 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1192 "kind": "sql#exportContext", # This is always sql#exportContext.
1193 "fileType": "A String", # The file type for the specified uri.
1194 # SQL: The file contains SQL statements.
1195 # CSV: The file contains CSV data.
1196 "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.
1197 "csvExportOptions": { # Options for exporting data as CSV.
1198 "selectQuery": "A String", # The select query used to extract the data.
1199 },
1200 "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.
1201 "A String",
1202 ],
1203 "sqlExportOptions": { # Options for exporting data as SQL statements.
1204 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1205 "A String",
1206 ],
1207 },
1208 },
1209 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1210 "targetProject": "A String", # The project ID of the target instance related to this operation.
1211 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001212 "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 -08001213 "targetLink": "A String", # The URI of the instance related to the operation.
1214 "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 +00001215 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1216 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001217 "errors": [ # The list of errors encountered while processing this operation.
1218 { # Database instance operation error.
1219 "kind": "sql#operationError", # This is always sql#operationError.
1220 "code": "A String", # Identifies the specific error that occurred.
1221 "message": "A String", # Additional information about the error encountered.
1222 },
1223 ],
1224 },
1225 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1226 "selfLink": "A String", # The URI of this resource.
1227 "user": "A String", # The email address of the user who initiated this operation.
1228 }</pre>
1229</div>
1230
1231<div class="method">
1232 <code class="details" id="restart">restart(project, instance)</code>
1233 <pre>Restarts a Cloud SQL instance.
1234
1235Args:
1236 project: string, Project ID of the project that contains the instance to be restarted. (required)
1237 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1238
1239Returns:
1240 An object of the form:
1241
1242 { # 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.
1243 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1244 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1245 "fileType": "A String", # The file type for the specified uri.
1246 # SQL: The file contains SQL statements.
1247 # CSV: The file contains CSV data.
1248 "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.
1249 "kind": "sql#importContext", # This is always sql#importContext.
1250 "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.
1251 "csvImportOptions": { # Options for importing data as CSV.
1252 "table": "A String", # The table to which CSV data is imported.
1253 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1254 "A String",
1255 ],
1256 },
1257 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001258 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001259 "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.
1260 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1261 "kind": "sql#exportContext", # This is always sql#exportContext.
1262 "fileType": "A String", # The file type for the specified uri.
1263 # SQL: The file contains SQL statements.
1264 # CSV: The file contains CSV data.
1265 "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.
1266 "csvExportOptions": { # Options for exporting data as CSV.
1267 "selectQuery": "A String", # The select query used to extract the data.
1268 },
1269 "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.
1270 "A String",
1271 ],
1272 "sqlExportOptions": { # Options for exporting data as SQL statements.
1273 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1274 "A String",
1275 ],
1276 },
1277 },
1278 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1279 "targetProject": "A String", # The project ID of the target instance related to this operation.
1280 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001281 "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 -08001282 "targetLink": "A String", # The URI of the instance related to the operation.
1283 "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 +00001284 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1285 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001286 "errors": [ # The list of errors encountered while processing this operation.
1287 { # Database instance operation error.
1288 "kind": "sql#operationError", # This is always sql#operationError.
1289 "code": "A String", # Identifies the specific error that occurred.
1290 "message": "A String", # Additional information about the error encountered.
1291 },
1292 ],
1293 },
1294 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1295 "selfLink": "A String", # The URI of this resource.
1296 "user": "A String", # The email address of the user who initiated this operation.
1297 }</pre>
1298</div>
1299
1300<div class="method">
1301 <code class="details" id="restoreBackup">restoreBackup(project, instance, body)</code>
1302 <pre>Restores a backup of a Cloud SQL instance.
1303
1304Args:
1305 project: string, Project ID of the project that contains the instance. (required)
1306 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1307 body: object, The request body. (required)
1308 The object takes the form of:
1309
1310{ # Database instance restore backup request.
1311 "restoreBackupContext": { # Database instance restore from backup context. # Parameters required to perform the restore backup operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001312 "instanceId": "A String", # The ID of the instance that the backup was taken from.
Craig Citroe633be12015-03-02 13:40:36 -08001313 "kind": "sql#restoreBackupContext", # This is always sql#restoreBackupContext.
1314 "backupRunId": "A String", # The ID of the backup run to restore from.
1315 },
1316 }
1317
1318
1319Returns:
1320 An object of the form:
1321
1322 { # 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.
1323 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1324 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1325 "fileType": "A String", # The file type for the specified uri.
1326 # SQL: The file contains SQL statements.
1327 # CSV: The file contains CSV data.
1328 "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.
1329 "kind": "sql#importContext", # This is always sql#importContext.
1330 "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.
1331 "csvImportOptions": { # Options for importing data as CSV.
1332 "table": "A String", # The table to which CSV data is imported.
1333 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1334 "A String",
1335 ],
1336 },
1337 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001338 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001339 "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.
1340 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1341 "kind": "sql#exportContext", # This is always sql#exportContext.
1342 "fileType": "A String", # The file type for the specified uri.
1343 # SQL: The file contains SQL statements.
1344 # CSV: The file contains CSV data.
1345 "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.
1346 "csvExportOptions": { # Options for exporting data as CSV.
1347 "selectQuery": "A String", # The select query used to extract the data.
1348 },
1349 "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.
1350 "A String",
1351 ],
1352 "sqlExportOptions": { # Options for exporting data as SQL statements.
1353 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1354 "A String",
1355 ],
1356 },
1357 },
1358 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1359 "targetProject": "A String", # The project ID of the target instance related to this operation.
1360 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001361 "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 -08001362 "targetLink": "A String", # The URI of the instance related to the operation.
1363 "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 +00001364 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1365 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001366 "errors": [ # The list of errors encountered while processing this operation.
1367 { # Database instance operation error.
1368 "kind": "sql#operationError", # This is always sql#operationError.
1369 "code": "A String", # Identifies the specific error that occurred.
1370 "message": "A String", # Additional information about the error encountered.
1371 },
1372 ],
1373 },
1374 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1375 "selfLink": "A String", # The URI of this resource.
1376 "user": "A String", # The email address of the user who initiated this operation.
1377 }</pre>
1378</div>
1379
1380<div class="method">
1381 <code class="details" id="startReplica">startReplica(project, instance)</code>
1382 <pre>Starts the replication in the read replica instance.
1383
1384Args:
1385 project: string, ID of the project that contains the read replica. (required)
1386 instance: string, Cloud SQL read replica instance name. (required)
1387
1388Returns:
1389 An object of the form:
1390
1391 { # 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.
1392 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1393 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1394 "fileType": "A String", # The file type for the specified uri.
1395 # SQL: The file contains SQL statements.
1396 # CSV: The file contains CSV data.
1397 "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.
1398 "kind": "sql#importContext", # This is always sql#importContext.
1399 "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.
1400 "csvImportOptions": { # Options for importing data as CSV.
1401 "table": "A String", # The table to which CSV data is imported.
1402 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1403 "A String",
1404 ],
1405 },
1406 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001407 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001408 "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.
1409 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1410 "kind": "sql#exportContext", # This is always sql#exportContext.
1411 "fileType": "A String", # The file type for the specified uri.
1412 # SQL: The file contains SQL statements.
1413 # CSV: The file contains CSV data.
1414 "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.
1415 "csvExportOptions": { # Options for exporting data as CSV.
1416 "selectQuery": "A String", # The select query used to extract the data.
1417 },
1418 "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.
1419 "A String",
1420 ],
1421 "sqlExportOptions": { # Options for exporting data as SQL statements.
1422 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1423 "A String",
1424 ],
1425 },
1426 },
1427 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1428 "targetProject": "A String", # The project ID of the target instance related to this operation.
1429 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001430 "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
Craig Citroe633be12015-03-02 13:40:36 -08001431 "targetLink": "A String", # The URI of the instance related to the operation.
1432 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001433 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1434 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001435 "errors": [ # The list of errors encountered while processing this operation.
1436 { # Database instance operation error.
1437 "kind": "sql#operationError", # This is always sql#operationError.
1438 "code": "A String", # Identifies the specific error that occurred.
1439 "message": "A String", # Additional information about the error encountered.
1440 },
1441 ],
1442 },
1443 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1444 "selfLink": "A String", # The URI of this resource.
1445 "user": "A String", # The email address of the user who initiated this operation.
1446 }</pre>
1447</div>
1448
1449<div class="method">
1450 <code class="details" id="stopReplica">stopReplica(project, instance)</code>
1451 <pre>Stops the replication in the read replica instance.
1452
1453Args:
1454 project: string, ID of the project that contains the read replica. (required)
1455 instance: string, Cloud SQL read replica instance name. (required)
1456
1457Returns:
1458 An object of the form:
1459
1460 { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
1461 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1462 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1463 "fileType": "A String", # The file type for the specified uri.
1464 # SQL: The file contains SQL statements.
1465 # CSV: The file contains CSV data.
1466 "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.
1467 "kind": "sql#importContext", # This is always sql#importContext.
1468 "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
1469 "csvImportOptions": { # Options for importing data as CSV.
1470 "table": "A String", # The table to which CSV data is imported.
1471 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1472 "A String",
1473 ],
1474 },
1475 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001476 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001477 "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.
1478 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1479 "kind": "sql#exportContext", # This is always sql#exportContext.
1480 "fileType": "A String", # The file type for the specified uri.
1481 # SQL: The file contains SQL statements.
1482 # CSV: The file contains CSV data.
1483 "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.
1484 "csvExportOptions": { # Options for exporting data as CSV.
1485 "selectQuery": "A String", # The select query used to extract the data.
1486 },
1487 "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.
1488 "A String",
1489 ],
1490 "sqlExportOptions": { # Options for exporting data as SQL statements.
1491 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1492 "A String",
1493 ],
1494 },
1495 },
1496 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1497 "targetProject": "A String", # The project ID of the target instance related to this operation.
1498 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001499 "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 -08001500 "targetLink": "A String", # The URI of the instance related to the operation.
1501 "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 +00001502 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1503 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001504 "errors": [ # The list of errors encountered while processing this operation.
1505 { # Database instance operation error.
1506 "kind": "sql#operationError", # This is always sql#operationError.
1507 "code": "A String", # Identifies the specific error that occurred.
1508 "message": "A String", # Additional information about the error encountered.
1509 },
1510 ],
1511 },
1512 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1513 "selfLink": "A String", # The URI of this resource.
1514 "user": "A String", # The email address of the user who initiated this operation.
1515 }</pre>
1516</div>
1517
1518<div class="method">
1519 <code class="details" id="update">update(project, instance, body)</code>
1520 <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.
1521
1522Args:
1523 project: string, Project ID of the project that contains the instance. (required)
1524 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1525 body: object, The request body. (required)
1526 The object takes the form of:
1527
1528{ # A Cloud SQL instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001529 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
1530 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
1531 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
1532 },
Craig Citroe633be12015-03-02 13:40:36 -08001533 "kind": "sql#instance", # This is always sql#instance.
1534 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
1535 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001536 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
1537 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
1538 "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.
1539 "username": "A String", # The username for the replication connection.
1540 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
1541 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
1542 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
1543 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
1544 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
1545 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
1546 "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.
1547 "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.
1548 "password": "A String", # The password for the replication connection.
1549 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
1550 },
1551 },
1552 "replicaNames": [ # The replicas of the instance.
1553 "A String",
1554 ],
1555 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
1556 "region": "A String", # The geographical region. Can be us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -08001557 "serverCaCert": { # SslCerts Resource # SSL configuration.
1558 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
1559 "kind": "sql#sslCert", # This is always sql#sslCert.
1560 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
1561 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1562 "instance": "A String", # Name of the database instance.
1563 "cert": "A String", # PEM representation.
1564 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1565 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001566 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -08001567 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001568 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
1569 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
1570 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
1571 # RUNNABLE: The instance is running, or is ready to run when accessed.
1572 # SUSPENDED: The instance is not available, for example due to problems with billing.
1573 # PENDING_CREATE: The instance is being created.
1574 # MAINTENANCE: The instance is down for maintenance.
1575 # FAILED: The instance creation failed.
1576 # UNKNOWN_STATE: The state of the instance is unknown.
1577 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
1578 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
1579 "ipAddresses": [ # The assigned IP addresses for the instance.
1580 { # Database instance IP Mapping.
1581 "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.
1582 "ipAddress": "A String", # The IP address assigned.
1583 },
Craig Citroe633be12015-03-02 13:40:36 -08001584 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001585 "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion can not be changed after instance creation.
Craig Citroe633be12015-03-02 13:40:36 -08001586 "settings": { # Database instance settings. # The user settings.
1587 "databaseFlags": [ # The database flags passed to the instance at startup.
1588 { # MySQL flags for Cloud SQL instances.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001589 "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.
1590 "value": "A String", # The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value.
Craig Citroe633be12015-03-02 13:40:36 -08001591 },
1592 ],
1593 "kind": "sql#settings", # This is always sql#settings.
1594 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
1595 "A String",
1596 ],
1597 "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
1598 # ALWAYS: The instance should always be active.
1599 # NEVER: The instance should never be activated.
1600 # ON_DEMAND: The instance is activated upon receiving requests.
1601 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
1602 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
1603 "enabled": True or False, # Whether this configuration is enabled.
1604 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
1605 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
1606 },
1607 "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.
1608 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
1609 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
1610 "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).
1611 { # An entry for an Access Control list.
1612 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1613 "kind": "sql#aclEntry", # This is always sql#aclEntry.
1614 "value": "A String", # The whitelisted value for the access control list.
1615 "name": "A String", # An optional label to identify this entry.
1616 },
1617 ],
1618 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001619 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
Craig Citroe633be12015-03-02 13:40:36 -08001620 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1621 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001622 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled.
Craig Citroe633be12015-03-02 13:40:36 -08001623 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
1624 "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.
1625 "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.
1626 "kind": "sql#locationPreference", # This is always sql#locationPreference.
1627 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
1628 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
1629 },
1630 },
Craig Citroe633be12015-03-02 13:40:36 -08001631 "instanceType": "A String", # The instance type. This can be one of the following.
1632 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001633 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
Craig Citroe633be12015-03-02 13:40:36 -08001634 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
1635 "selfLink": "A String", # The URI of this resource.
1636 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
1637 }
1638
1639
1640Returns:
1641 An object of the form:
1642
1643 { # 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.
1644 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1645 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1646 "fileType": "A String", # The file type for the specified uri.
1647 # SQL: The file contains SQL statements.
1648 # CSV: The file contains CSV data.
1649 "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.
1650 "kind": "sql#importContext", # This is always sql#importContext.
1651 "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.
1652 "csvImportOptions": { # Options for importing data as CSV.
1653 "table": "A String", # The table to which CSV data is imported.
1654 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1655 "A String",
1656 ],
1657 },
1658 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001659 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001660 "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.
1661 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1662 "kind": "sql#exportContext", # This is always sql#exportContext.
1663 "fileType": "A String", # The file type for the specified uri.
1664 # SQL: The file contains SQL statements.
1665 # CSV: The file contains CSV data.
1666 "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.
1667 "csvExportOptions": { # Options for exporting data as CSV.
1668 "selectQuery": "A String", # The select query used to extract the data.
1669 },
1670 "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.
1671 "A String",
1672 ],
1673 "sqlExportOptions": { # Options for exporting data as SQL statements.
1674 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1675 "A String",
1676 ],
1677 },
1678 },
1679 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1680 "targetProject": "A String", # The project ID of the target instance related to this operation.
1681 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001682 "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 -08001683 "targetLink": "A String", # The URI of the instance related to the operation.
1684 "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 +00001685 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1686 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001687 "errors": [ # The list of errors encountered while processing this operation.
1688 { # Database instance operation error.
1689 "kind": "sql#operationError", # This is always sql#operationError.
1690 "code": "A String", # Identifies the specific error that occurred.
1691 "message": "A String", # Additional information about the error encountered.
1692 },
1693 ],
1694 },
1695 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1696 "selfLink": "A String", # The URI of this resource.
1697 "user": "A String", # The email address of the user who initiated this operation.
1698 }</pre>
1699</div>
1700
1701</body></html>