blob: 68c71fad31d9a4aa35b2cff92708e04262e64f29 [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 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700186 "schemaOnly": True or False, # Export only schema.
Craig Citroe633be12015-03-02 13:40:36 -0800187 },
188 },
189 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
190 "targetProject": "A String", # The project ID of the target instance related to this operation.
191 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000192 "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 -0800193 "targetLink": "A String", # The URI of the instance related to the operation.
194 "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 +0000195 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
196 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800197 "errors": [ # The list of errors encountered while processing this operation.
198 { # Database instance operation error.
199 "kind": "sql#operationError", # This is always sql#operationError.
200 "code": "A String", # Identifies the specific error that occurred.
201 "message": "A String", # Additional information about the error encountered.
202 },
203 ],
204 },
205 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
206 "selfLink": "A String", # The URI of this resource.
207 "user": "A String", # The email address of the user who initiated this operation.
208 }</pre>
209</div>
210
211<div class="method">
212 <code class="details" id="delete">delete(project, instance)</code>
213 <pre>Deletes a Cloud SQL instance.
214
215Args:
216 project: string, Project ID of the project that contains the instance to be deleted. (required)
217 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
218
219Returns:
220 An object of the form:
221
222 { # 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.
223 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
224 "importContext": { # Database instance import context. # The context for import operation, if applicable.
225 "fileType": "A String", # The file type for the specified uri.
226 # SQL: The file contains SQL statements.
227 # CSV: The file contains CSV data.
228 "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.
229 "kind": "sql#importContext", # This is always sql#importContext.
230 "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.
231 "csvImportOptions": { # Options for importing data as CSV.
232 "table": "A String", # The table to which CSV data is imported.
233 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
234 "A String",
235 ],
236 },
237 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000238 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800239 "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.
240 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
241 "kind": "sql#exportContext", # This is always sql#exportContext.
242 "fileType": "A String", # The file type for the specified uri.
243 # SQL: The file contains SQL statements.
244 # CSV: The file contains CSV data.
245 "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.
246 "csvExportOptions": { # Options for exporting data as CSV.
247 "selectQuery": "A String", # The select query used to extract the data.
248 },
249 "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.
250 "A String",
251 ],
252 "sqlExportOptions": { # Options for exporting data as SQL statements.
253 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
254 "A String",
255 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700256 "schemaOnly": True or False, # Export only schema.
Craig Citroe633be12015-03-02 13:40:36 -0800257 },
258 },
259 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
260 "targetProject": "A String", # The project ID of the target instance related to this operation.
261 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000262 "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 -0800263 "targetLink": "A String", # The URI of the instance related to the operation.
264 "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 +0000265 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
266 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800267 "errors": [ # The list of errors encountered while processing this operation.
268 { # Database instance operation error.
269 "kind": "sql#operationError", # This is always sql#operationError.
270 "code": "A String", # Identifies the specific error that occurred.
271 "message": "A String", # Additional information about the error encountered.
272 },
273 ],
274 },
275 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
276 "selfLink": "A String", # The URI of this resource.
277 "user": "A String", # The email address of the user who initiated this operation.
278 }</pre>
279</div>
280
281<div class="method">
282 <code class="details" id="export">export(project, instance, body)</code>
283 <pre>Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file.
284
285Args:
286 project: string, Project ID of the project that contains the instance to be exported. (required)
287 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
288 body: object, The request body. (required)
289 The object takes the form of:
290
291{ # Database instance export request.
292 "exportContext": { # Database instance export context. # Contains details about the export operation.
293 "kind": "sql#exportContext", # This is always sql#exportContext.
294 "fileType": "A String", # The file type for the specified uri.
295 # SQL: The file contains SQL statements.
296 # CSV: The file contains CSV data.
297 "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.
298 "csvExportOptions": { # Options for exporting data as CSV.
299 "selectQuery": "A String", # The select query used to extract the data.
300 },
301 "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.
302 "A String",
303 ],
304 "sqlExportOptions": { # Options for exporting data as SQL statements.
305 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
306 "A String",
307 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700308 "schemaOnly": True or False, # Export only schema.
Craig Citroe633be12015-03-02 13:40:36 -0800309 },
310 },
311 }
312
313
314Returns:
315 An object of the form:
316
317 { # 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.
318 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
319 "importContext": { # Database instance import context. # The context for import operation, if applicable.
320 "fileType": "A String", # The file type for the specified uri.
321 # SQL: The file contains SQL statements.
322 # CSV: The file contains CSV data.
323 "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.
324 "kind": "sql#importContext", # This is always sql#importContext.
325 "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.
326 "csvImportOptions": { # Options for importing data as CSV.
327 "table": "A String", # The table to which CSV data is imported.
328 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
329 "A String",
330 ],
331 },
332 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000333 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800334 "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.
335 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
336 "kind": "sql#exportContext", # This is always sql#exportContext.
337 "fileType": "A String", # The file type for the specified uri.
338 # SQL: The file contains SQL statements.
339 # CSV: The file contains CSV data.
340 "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.
341 "csvExportOptions": { # Options for exporting data as CSV.
342 "selectQuery": "A String", # The select query used to extract the data.
343 },
344 "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.
345 "A String",
346 ],
347 "sqlExportOptions": { # Options for exporting data as SQL statements.
348 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
349 "A String",
350 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700351 "schemaOnly": True or False, # Export only schema.
Craig Citroe633be12015-03-02 13:40:36 -0800352 },
353 },
354 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
355 "targetProject": "A String", # The project ID of the target instance related to this operation.
356 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000357 "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 -0800358 "targetLink": "A String", # The URI of the instance related to the operation.
359 "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 +0000360 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
361 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800362 "errors": [ # The list of errors encountered while processing this operation.
363 { # Database instance operation error.
364 "kind": "sql#operationError", # This is always sql#operationError.
365 "code": "A String", # Identifies the specific error that occurred.
366 "message": "A String", # Additional information about the error encountered.
367 },
368 ],
369 },
370 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
371 "selfLink": "A String", # The URI of this resource.
372 "user": "A String", # The email address of the user who initiated this operation.
373 }</pre>
374</div>
375
376<div class="method">
377 <code class="details" id="get">get(project, instance)</code>
378 <pre>Retrieves a resource containing information about a Cloud SQL instance.
379
380Args:
381 project: string, Project ID of the project that contains the instance. (required)
382 instance: string, Database instance ID. This does not include the project ID. (required)
383
384Returns:
385 An object of the form:
386
387 { # A Cloud SQL instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000388 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
389 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
390 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
391 },
Craig Citroe633be12015-03-02 13:40:36 -0800392 "kind": "sql#instance", # This is always sql#instance.
393 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
394 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000395 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
396 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
397 "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.
398 "username": "A String", # The username for the replication connection.
399 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
400 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
401 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
402 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
403 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
404 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
405 "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.
406 "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.
407 "password": "A String", # The password for the replication connection.
408 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
409 },
410 },
411 "replicaNames": [ # The replicas of the instance.
412 "A String",
413 ],
414 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
415 "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 -0800416 "serverCaCert": { # SslCerts Resource # SSL configuration.
417 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
418 "kind": "sql#sslCert", # This is always sql#sslCert.
419 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
420 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
421 "instance": "A String", # Name of the database instance.
422 "cert": "A String", # PEM representation.
423 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
424 "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 +0000425 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800426 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000427 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
428 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
429 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
430 # RUNNABLE: The instance is running, or is ready to run when accessed.
431 # SUSPENDED: The instance is not available, for example due to problems with billing.
432 # PENDING_CREATE: The instance is being created.
433 # MAINTENANCE: The instance is down for maintenance.
434 # FAILED: The instance creation failed.
435 # UNKNOWN_STATE: The state of the instance is unknown.
436 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
437 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
438 "ipAddresses": [ # The assigned IP addresses for the instance.
439 { # Database instance IP Mapping.
440 "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.
441 "ipAddress": "A String", # The IP address assigned.
442 },
Craig Citroe633be12015-03-02 13:40:36 -0800443 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000444 "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 -0800445 "settings": { # Database instance settings. # The user settings.
446 "databaseFlags": [ # The database flags passed to the instance at startup.
447 { # MySQL flags for Cloud SQL instances.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000448 "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.
449 "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 -0800450 },
451 ],
452 "kind": "sql#settings", # This is always sql#settings.
453 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
454 "A String",
455 ],
456 "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.
457 # ALWAYS: The instance should always be active.
458 # NEVER: The instance should never be activated.
459 # ON_DEMAND: The instance is activated upon receiving requests.
460 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
461 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
462 "enabled": True or False, # Whether this configuration is enabled.
463 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
464 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
465 },
466 "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.
467 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
468 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
469 "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).
470 { # An entry for an Access Control list.
471 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
472 "kind": "sql#aclEntry", # This is always sql#aclEntry.
473 "value": "A String", # The whitelisted value for the access control list.
474 "name": "A String", # An optional label to identify this entry.
475 },
476 ],
477 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000478 "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 -0800479 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
480 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000481 "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 -0800482 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
483 "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.
484 "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.
485 "kind": "sql#locationPreference", # This is always sql#locationPreference.
486 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
487 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
488 },
489 },
Craig Citroe633be12015-03-02 13:40:36 -0800490 "instanceType": "A String", # The instance type. This can be one of the following.
491 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000492 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
Craig Citroe633be12015-03-02 13:40:36 -0800493 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
494 "selfLink": "A String", # The URI of this resource.
495 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
496 }</pre>
497</div>
498
499<div class="method">
500 <code class="details" id="import_">import_(project, instance, body)</code>
501 <pre>Imports data into a Cloud SQL instance from a MySQL dump file in Google Cloud Storage.
502
503Args:
504 project: string, Project ID of the project that contains the instance. (required)
505 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
506 body: object, The request body. (required)
507 The object takes the form of:
508
509{ # Database instance import request.
510 "importContext": { # Database instance import context. # Contains details about the import operation.
511 "fileType": "A String", # The file type for the specified uri.
512 # SQL: The file contains SQL statements.
513 # CSV: The file contains CSV data.
514 "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.
515 "kind": "sql#importContext", # This is always sql#importContext.
516 "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.
517 "csvImportOptions": { # Options for importing data as CSV.
518 "table": "A String", # The table to which CSV data is imported.
519 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
520 "A String",
521 ],
522 },
523 },
524 }
525
526
527Returns:
528 An object of the form:
529
530 { # 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.
531 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
532 "importContext": { # Database instance import context. # The context for import operation, if applicable.
533 "fileType": "A String", # The file type for the specified uri.
534 # SQL: The file contains SQL statements.
535 # CSV: The file contains CSV data.
536 "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.
537 "kind": "sql#importContext", # This is always sql#importContext.
538 "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.
539 "csvImportOptions": { # Options for importing data as CSV.
540 "table": "A String", # The table to which CSV data is imported.
541 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
542 "A String",
543 ],
544 },
545 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000546 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800547 "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.
548 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
549 "kind": "sql#exportContext", # This is always sql#exportContext.
550 "fileType": "A String", # The file type for the specified uri.
551 # SQL: The file contains SQL statements.
552 # CSV: The file contains CSV data.
553 "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.
554 "csvExportOptions": { # Options for exporting data as CSV.
555 "selectQuery": "A String", # The select query used to extract the data.
556 },
557 "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.
558 "A String",
559 ],
560 "sqlExportOptions": { # Options for exporting data as SQL statements.
561 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
562 "A String",
563 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700564 "schemaOnly": True or False, # Export only schema.
Craig Citroe633be12015-03-02 13:40:36 -0800565 },
566 },
567 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
568 "targetProject": "A String", # The project ID of the target instance related to this operation.
569 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000570 "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 -0800571 "targetLink": "A String", # The URI of the instance related to the operation.
572 "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 +0000573 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
574 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800575 "errors": [ # The list of errors encountered while processing this operation.
576 { # Database instance operation error.
577 "kind": "sql#operationError", # This is always sql#operationError.
578 "code": "A String", # Identifies the specific error that occurred.
579 "message": "A String", # Additional information about the error encountered.
580 },
581 ],
582 },
583 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
584 "selfLink": "A String", # The URI of this resource.
585 "user": "A String", # The email address of the user who initiated this operation.
586 }</pre>
587</div>
588
589<div class="method">
590 <code class="details" id="insert">insert(project, body)</code>
591 <pre>Creates a new Cloud SQL instance.
592
593Args:
594 project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required)
595 body: object, The request body. (required)
596 The object takes the form of:
597
598{ # A Cloud SQL instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000599 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
600 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
601 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
602 },
Craig Citroe633be12015-03-02 13:40:36 -0800603 "kind": "sql#instance", # This is always sql#instance.
604 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
605 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000606 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
607 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
608 "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.
609 "username": "A String", # The username for the replication connection.
610 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
611 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
612 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
613 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
614 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
615 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
616 "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.
617 "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.
618 "password": "A String", # The password for the replication connection.
619 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
620 },
621 },
622 "replicaNames": [ # The replicas of the instance.
623 "A String",
624 ],
625 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
626 "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 -0800627 "serverCaCert": { # SslCerts Resource # SSL configuration.
628 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
629 "kind": "sql#sslCert", # This is always sql#sslCert.
630 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
631 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
632 "instance": "A String", # Name of the database instance.
633 "cert": "A String", # PEM representation.
634 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
635 "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 +0000636 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800637 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000638 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
639 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
640 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
641 # RUNNABLE: The instance is running, or is ready to run when accessed.
642 # SUSPENDED: The instance is not available, for example due to problems with billing.
643 # PENDING_CREATE: The instance is being created.
644 # MAINTENANCE: The instance is down for maintenance.
645 # FAILED: The instance creation failed.
646 # UNKNOWN_STATE: The state of the instance is unknown.
647 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
648 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
649 "ipAddresses": [ # The assigned IP addresses for the instance.
650 { # Database instance IP Mapping.
651 "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.
652 "ipAddress": "A String", # The IP address assigned.
653 },
Craig Citroe633be12015-03-02 13:40:36 -0800654 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000655 "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 -0800656 "settings": { # Database instance settings. # The user settings.
657 "databaseFlags": [ # The database flags passed to the instance at startup.
658 { # MySQL flags for Cloud SQL instances.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000659 "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.
660 "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 -0800661 },
662 ],
663 "kind": "sql#settings", # This is always sql#settings.
664 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
665 "A String",
666 ],
667 "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.
668 # ALWAYS: The instance should always be active.
669 # NEVER: The instance should never be activated.
670 # ON_DEMAND: The instance is activated upon receiving requests.
671 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
672 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
673 "enabled": True or False, # Whether this configuration is enabled.
674 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
675 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
676 },
677 "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.
678 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
679 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
680 "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).
681 { # An entry for an Access Control list.
682 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
683 "kind": "sql#aclEntry", # This is always sql#aclEntry.
684 "value": "A String", # The whitelisted value for the access control list.
685 "name": "A String", # An optional label to identify this entry.
686 },
687 ],
688 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000689 "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 -0800690 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
691 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000692 "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 -0800693 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
694 "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.
695 "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.
696 "kind": "sql#locationPreference", # This is always sql#locationPreference.
697 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
698 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
699 },
700 },
Craig Citroe633be12015-03-02 13:40:36 -0800701 "instanceType": "A String", # The instance type. This can be one of the following.
702 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000703 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
Craig Citroe633be12015-03-02 13:40:36 -0800704 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
705 "selfLink": "A String", # The URI of this resource.
706 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
707 }
708
709
710Returns:
711 An object of the form:
712
713 { # 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.
714 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
715 "importContext": { # Database instance import context. # The context for import operation, if applicable.
716 "fileType": "A String", # The file type for the specified uri.
717 # SQL: The file contains SQL statements.
718 # CSV: The file contains CSV data.
719 "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.
720 "kind": "sql#importContext", # This is always sql#importContext.
721 "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.
722 "csvImportOptions": { # Options for importing data as CSV.
723 "table": "A String", # The table to which CSV data is imported.
724 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
725 "A String",
726 ],
727 },
728 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000729 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800730 "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.
731 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
732 "kind": "sql#exportContext", # This is always sql#exportContext.
733 "fileType": "A String", # The file type for the specified uri.
734 # SQL: The file contains SQL statements.
735 # CSV: The file contains CSV data.
736 "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.
737 "csvExportOptions": { # Options for exporting data as CSV.
738 "selectQuery": "A String", # The select query used to extract the data.
739 },
740 "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.
741 "A String",
742 ],
743 "sqlExportOptions": { # Options for exporting data as SQL statements.
744 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
745 "A String",
746 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700747 "schemaOnly": True or False, # Export only schema.
Craig Citroe633be12015-03-02 13:40:36 -0800748 },
749 },
750 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
751 "targetProject": "A String", # The project ID of the target instance related to this operation.
752 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000753 "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 -0800754 "targetLink": "A String", # The URI of the instance related to the operation.
755 "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 +0000756 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
757 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800758 "errors": [ # The list of errors encountered while processing this operation.
759 { # Database instance operation error.
760 "kind": "sql#operationError", # This is always sql#operationError.
761 "code": "A String", # Identifies the specific error that occurred.
762 "message": "A String", # Additional information about the error encountered.
763 },
764 ],
765 },
766 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
767 "selfLink": "A String", # The URI of this resource.
768 "user": "A String", # The email address of the user who initiated this operation.
769 }</pre>
770</div>
771
772<div class="method">
773 <code class="details" id="list">list(project, pageToken=None, maxResults=None)</code>
774 <pre>Lists instances under a given project in the alphabetical order of the instance name.
775
776Args:
777 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
778 pageToken: string, A previously-returned page token representing part of the larger set of results to view.
779 maxResults: integer, The maximum number of results to return per response.
780
781Returns:
782 An object of the form:
783
784 { # Database instances list response.
785 "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.
786 "items": [ # List of database instance resources.
787 { # A Cloud SQL instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000788 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
789 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
790 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
791 },
Craig Citroe633be12015-03-02 13:40:36 -0800792 "kind": "sql#instance", # This is always sql#instance.
793 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
794 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000795 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
796 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
797 "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.
798 "username": "A String", # The username for the replication connection.
799 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
800 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
801 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
802 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
803 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
804 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
805 "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.
806 "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.
807 "password": "A String", # The password for the replication connection.
808 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
809 },
810 },
811 "replicaNames": [ # The replicas of the instance.
812 "A String",
813 ],
814 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
815 "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 -0800816 "serverCaCert": { # SslCerts Resource # SSL configuration.
817 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
818 "kind": "sql#sslCert", # This is always sql#sslCert.
819 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
820 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
821 "instance": "A String", # Name of the database instance.
822 "cert": "A String", # PEM representation.
823 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
824 "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 +0000825 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800826 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000827 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
828 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
829 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
830 # RUNNABLE: The instance is running, or is ready to run when accessed.
831 # SUSPENDED: The instance is not available, for example due to problems with billing.
832 # PENDING_CREATE: The instance is being created.
833 # MAINTENANCE: The instance is down for maintenance.
834 # FAILED: The instance creation failed.
835 # UNKNOWN_STATE: The state of the instance is unknown.
836 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
837 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
838 "ipAddresses": [ # The assigned IP addresses for the instance.
839 { # Database instance IP Mapping.
840 "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.
841 "ipAddress": "A String", # The IP address assigned.
842 },
Craig Citroe633be12015-03-02 13:40:36 -0800843 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000844 "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 -0800845 "settings": { # Database instance settings. # The user settings.
846 "databaseFlags": [ # The database flags passed to the instance at startup.
847 { # MySQL flags for Cloud SQL instances.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000848 "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.
849 "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 -0800850 },
851 ],
852 "kind": "sql#settings", # This is always sql#settings.
853 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
854 "A String",
855 ],
856 "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.
857 # ALWAYS: The instance should always be active.
858 # NEVER: The instance should never be activated.
859 # ON_DEMAND: The instance is activated upon receiving requests.
860 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
861 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
862 "enabled": True or False, # Whether this configuration is enabled.
863 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
864 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
865 },
866 "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.
867 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
868 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
869 "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).
870 { # An entry for an Access Control list.
871 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
872 "kind": "sql#aclEntry", # This is always sql#aclEntry.
873 "value": "A String", # The whitelisted value for the access control list.
874 "name": "A String", # An optional label to identify this entry.
875 },
876 ],
877 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000878 "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 -0800879 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
880 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000881 "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 -0800882 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
883 "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.
884 "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.
885 "kind": "sql#locationPreference", # This is always sql#locationPreference.
886 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
887 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
888 },
889 },
Craig Citroe633be12015-03-02 13:40:36 -0800890 "instanceType": "A String", # The instance type. This can be one of the following.
891 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000892 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
Craig Citroe633be12015-03-02 13:40:36 -0800893 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
894 "selfLink": "A String", # The URI of this resource.
895 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
896 },
897 ],
898 "kind": "sql#instancesList", # This is always sql#instancesList.
899 }</pre>
900</div>
901
902<div class="method">
903 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
904 <pre>Retrieves the next page of results.
905
906Args:
907 previous_request: The request for the previous page. (required)
908 previous_response: The response from the request for the previous page. (required)
909
910Returns:
911 A request object that you can call 'execute()' on to request the next
912 page. Returns None if there are no more items in the collection.
913 </pre>
914</div>
915
916<div class="method">
917 <code class="details" id="patch">patch(project, instance, body)</code>
918 <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.
919
920Args:
921 project: string, Project ID of the project that contains the instance. (required)
922 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
923 body: object, The request body. (required)
924 The object takes the form of:
925
926{ # A Cloud SQL instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000927 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
928 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
929 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
930 },
Craig Citroe633be12015-03-02 13:40:36 -0800931 "kind": "sql#instance", # This is always sql#instance.
932 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
933 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000934 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
935 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
936 "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.
937 "username": "A String", # The username for the replication connection.
938 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
939 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
940 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
941 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
942 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
943 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
944 "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.
945 "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.
946 "password": "A String", # The password for the replication connection.
947 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
948 },
949 },
950 "replicaNames": [ # The replicas of the instance.
951 "A String",
952 ],
953 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
954 "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 -0800955 "serverCaCert": { # SslCerts Resource # SSL configuration.
956 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
957 "kind": "sql#sslCert", # This is always sql#sslCert.
958 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
959 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
960 "instance": "A String", # Name of the database instance.
961 "cert": "A String", # PEM representation.
962 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
963 "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 +0000964 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800965 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000966 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
967 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
968 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
969 # RUNNABLE: The instance is running, or is ready to run when accessed.
970 # SUSPENDED: The instance is not available, for example due to problems with billing.
971 # PENDING_CREATE: The instance is being created.
972 # MAINTENANCE: The instance is down for maintenance.
973 # FAILED: The instance creation failed.
974 # UNKNOWN_STATE: The state of the instance is unknown.
975 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
976 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
977 "ipAddresses": [ # The assigned IP addresses for the instance.
978 { # Database instance IP Mapping.
979 "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.
980 "ipAddress": "A String", # The IP address assigned.
981 },
Craig Citroe633be12015-03-02 13:40:36 -0800982 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000983 "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 -0800984 "settings": { # Database instance settings. # The user settings.
985 "databaseFlags": [ # The database flags passed to the instance at startup.
986 { # MySQL flags for Cloud SQL instances.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000987 "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.
988 "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 -0800989 },
990 ],
991 "kind": "sql#settings", # This is always sql#settings.
992 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
993 "A String",
994 ],
995 "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.
996 # ALWAYS: The instance should always be active.
997 # NEVER: The instance should never be activated.
998 # ON_DEMAND: The instance is activated upon receiving requests.
999 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
1000 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
1001 "enabled": True or False, # Whether this configuration is enabled.
1002 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
1003 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
1004 },
1005 "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance.
1006 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
1007 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
1008 "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).
1009 { # An entry for an Access Control list.
1010 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1011 "kind": "sql#aclEntry", # This is always sql#aclEntry.
1012 "value": "A String", # The whitelisted value for the access control list.
1013 "name": "A String", # An optional label to identify this entry.
1014 },
1015 ],
1016 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001017 "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 -08001018 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1019 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001020 "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 -08001021 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
1022 "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
1023 "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.
1024 "kind": "sql#locationPreference", # This is always sql#locationPreference.
1025 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
1026 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
1027 },
1028 },
Craig Citroe633be12015-03-02 13:40:36 -08001029 "instanceType": "A String", # The instance type. This can be one of the following.
1030 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001031 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
Craig Citroe633be12015-03-02 13:40:36 -08001032 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
1033 "selfLink": "A String", # The URI of this resource.
1034 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
1035 }
1036
1037
1038Returns:
1039 An object of the form:
1040
1041 { # 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.
1042 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1043 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1044 "fileType": "A String", # The file type for the specified uri.
1045 # SQL: The file contains SQL statements.
1046 # CSV: The file contains CSV data.
1047 "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.
1048 "kind": "sql#importContext", # This is always sql#importContext.
1049 "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.
1050 "csvImportOptions": { # Options for importing data as CSV.
1051 "table": "A String", # The table to which CSV data is imported.
1052 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1053 "A String",
1054 ],
1055 },
1056 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001057 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001058 "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.
1059 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1060 "kind": "sql#exportContext", # This is always sql#exportContext.
1061 "fileType": "A String", # The file type for the specified uri.
1062 # SQL: The file contains SQL statements.
1063 # CSV: The file contains CSV data.
1064 "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.
1065 "csvExportOptions": { # Options for exporting data as CSV.
1066 "selectQuery": "A String", # The select query used to extract the data.
1067 },
1068 "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.
1069 "A String",
1070 ],
1071 "sqlExportOptions": { # Options for exporting data as SQL statements.
1072 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1073 "A String",
1074 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001075 "schemaOnly": True or False, # Export only schema.
Craig Citroe633be12015-03-02 13:40:36 -08001076 },
1077 },
1078 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1079 "targetProject": "A String", # The project ID of the target instance related to this operation.
1080 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001081 "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 -08001082 "targetLink": "A String", # The URI of the instance related to the operation.
1083 "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 +00001084 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1085 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001086 "errors": [ # The list of errors encountered while processing this operation.
1087 { # Database instance operation error.
1088 "kind": "sql#operationError", # This is always sql#operationError.
1089 "code": "A String", # Identifies the specific error that occurred.
1090 "message": "A String", # Additional information about the error encountered.
1091 },
1092 ],
1093 },
1094 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1095 "selfLink": "A String", # The URI of this resource.
1096 "user": "A String", # The email address of the user who initiated this operation.
1097 }</pre>
1098</div>
1099
1100<div class="method">
1101 <code class="details" id="promoteReplica">promoteReplica(project, instance)</code>
1102 <pre>Promotes the read replica instance to be a stand-alone Cloud SQL instance.
1103
1104Args:
1105 project: string, ID of the project that contains the read replica. (required)
1106 instance: string, Cloud SQL read replica instance name. (required)
1107
1108Returns:
1109 An object of the form:
1110
1111 { # 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.
1112 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1113 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1114 "fileType": "A String", # The file type for the specified uri.
1115 # SQL: The file contains SQL statements.
1116 # CSV: The file contains CSV data.
1117 "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.
1118 "kind": "sql#importContext", # This is always sql#importContext.
1119 "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.
1120 "csvImportOptions": { # Options for importing data as CSV.
1121 "table": "A String", # The table to which CSV data is imported.
1122 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1123 "A String",
1124 ],
1125 },
1126 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001127 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001128 "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.
1129 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1130 "kind": "sql#exportContext", # This is always sql#exportContext.
1131 "fileType": "A String", # The file type for the specified uri.
1132 # SQL: The file contains SQL statements.
1133 # CSV: The file contains CSV data.
1134 "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.
1135 "csvExportOptions": { # Options for exporting data as CSV.
1136 "selectQuery": "A String", # The select query used to extract the data.
1137 },
1138 "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.
1139 "A String",
1140 ],
1141 "sqlExportOptions": { # Options for exporting data as SQL statements.
1142 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1143 "A String",
1144 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001145 "schemaOnly": True or False, # Export only schema.
Craig Citroe633be12015-03-02 13:40:36 -08001146 },
1147 },
1148 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1149 "targetProject": "A String", # The project ID of the target instance related to this operation.
1150 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001151 "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 -08001152 "targetLink": "A String", # The URI of the instance related to the operation.
1153 "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 +00001154 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1155 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001156 "errors": [ # The list of errors encountered while processing this operation.
1157 { # Database instance operation error.
1158 "kind": "sql#operationError", # This is always sql#operationError.
1159 "code": "A String", # Identifies the specific error that occurred.
1160 "message": "A String", # Additional information about the error encountered.
1161 },
1162 ],
1163 },
1164 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1165 "selfLink": "A String", # The URI of this resource.
1166 "user": "A String", # The email address of the user who initiated this operation.
1167 }</pre>
1168</div>
1169
1170<div class="method">
1171 <code class="details" id="resetSslConfig">resetSslConfig(project, instance)</code>
1172 <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.
1173
1174Args:
1175 project: string, Project ID of the project that contains the instance. (required)
1176 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1177
1178Returns:
1179 An object of the form:
1180
1181 { # 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.
1182 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1183 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1184 "fileType": "A String", # The file type for the specified uri.
1185 # SQL: The file contains SQL statements.
1186 # CSV: The file contains CSV data.
1187 "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.
1188 "kind": "sql#importContext", # This is always sql#importContext.
1189 "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.
1190 "csvImportOptions": { # Options for importing data as CSV.
1191 "table": "A String", # The table to which CSV data is imported.
1192 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1193 "A String",
1194 ],
1195 },
1196 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001197 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001198 "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.
1199 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1200 "kind": "sql#exportContext", # This is always sql#exportContext.
1201 "fileType": "A String", # The file type for the specified uri.
1202 # SQL: The file contains SQL statements.
1203 # CSV: The file contains CSV data.
1204 "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.
1205 "csvExportOptions": { # Options for exporting data as CSV.
1206 "selectQuery": "A String", # The select query used to extract the data.
1207 },
1208 "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.
1209 "A String",
1210 ],
1211 "sqlExportOptions": { # Options for exporting data as SQL statements.
1212 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1213 "A String",
1214 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001215 "schemaOnly": True or False, # Export only schema.
Craig Citroe633be12015-03-02 13:40:36 -08001216 },
1217 },
1218 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1219 "targetProject": "A String", # The project ID of the target instance related to this operation.
1220 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001221 "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 -08001222 "targetLink": "A String", # The URI of the instance related to the operation.
1223 "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 +00001224 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1225 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001226 "errors": [ # The list of errors encountered while processing this operation.
1227 { # Database instance operation error.
1228 "kind": "sql#operationError", # This is always sql#operationError.
1229 "code": "A String", # Identifies the specific error that occurred.
1230 "message": "A String", # Additional information about the error encountered.
1231 },
1232 ],
1233 },
1234 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1235 "selfLink": "A String", # The URI of this resource.
1236 "user": "A String", # The email address of the user who initiated this operation.
1237 }</pre>
1238</div>
1239
1240<div class="method">
1241 <code class="details" id="restart">restart(project, instance)</code>
1242 <pre>Restarts a Cloud SQL instance.
1243
1244Args:
1245 project: string, Project ID of the project that contains the instance to be restarted. (required)
1246 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1247
1248Returns:
1249 An object of the form:
1250
1251 { # 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.
1252 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1253 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1254 "fileType": "A String", # The file type for the specified uri.
1255 # SQL: The file contains SQL statements.
1256 # CSV: The file contains CSV data.
1257 "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.
1258 "kind": "sql#importContext", # This is always sql#importContext.
1259 "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.
1260 "csvImportOptions": { # Options for importing data as CSV.
1261 "table": "A String", # The table to which CSV data is imported.
1262 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1263 "A String",
1264 ],
1265 },
1266 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001267 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001268 "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.
1269 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1270 "kind": "sql#exportContext", # This is always sql#exportContext.
1271 "fileType": "A String", # The file type for the specified uri.
1272 # SQL: The file contains SQL statements.
1273 # CSV: The file contains CSV data.
1274 "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.
1275 "csvExportOptions": { # Options for exporting data as CSV.
1276 "selectQuery": "A String", # The select query used to extract the data.
1277 },
1278 "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.
1279 "A String",
1280 ],
1281 "sqlExportOptions": { # Options for exporting data as SQL statements.
1282 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1283 "A String",
1284 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001285 "schemaOnly": True or False, # Export only schema.
Craig Citroe633be12015-03-02 13:40:36 -08001286 },
1287 },
1288 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1289 "targetProject": "A String", # The project ID of the target instance related to this operation.
1290 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001291 "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 -08001292 "targetLink": "A String", # The URI of the instance related to the operation.
1293 "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 +00001294 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1295 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001296 "errors": [ # The list of errors encountered while processing this operation.
1297 { # Database instance operation error.
1298 "kind": "sql#operationError", # This is always sql#operationError.
1299 "code": "A String", # Identifies the specific error that occurred.
1300 "message": "A String", # Additional information about the error encountered.
1301 },
1302 ],
1303 },
1304 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1305 "selfLink": "A String", # The URI of this resource.
1306 "user": "A String", # The email address of the user who initiated this operation.
1307 }</pre>
1308</div>
1309
1310<div class="method">
1311 <code class="details" id="restoreBackup">restoreBackup(project, instance, body)</code>
1312 <pre>Restores a backup of a Cloud SQL instance.
1313
1314Args:
1315 project: string, Project ID of the project that contains the instance. (required)
1316 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1317 body: object, The request body. (required)
1318 The object takes the form of:
1319
1320{ # Database instance restore backup request.
1321 "restoreBackupContext": { # Database instance restore from backup context. # Parameters required to perform the restore backup operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001322 "instanceId": "A String", # The ID of the instance that the backup was taken from.
Craig Citroe633be12015-03-02 13:40:36 -08001323 "kind": "sql#restoreBackupContext", # This is always sql#restoreBackupContext.
1324 "backupRunId": "A String", # The ID of the backup run to restore from.
1325 },
1326 }
1327
1328
1329Returns:
1330 An object of the form:
1331
1332 { # 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.
1333 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1334 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1335 "fileType": "A String", # The file type for the specified uri.
1336 # SQL: The file contains SQL statements.
1337 # CSV: The file contains CSV data.
1338 "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.
1339 "kind": "sql#importContext", # This is always sql#importContext.
1340 "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.
1341 "csvImportOptions": { # Options for importing data as CSV.
1342 "table": "A String", # The table to which CSV data is imported.
1343 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1344 "A String",
1345 ],
1346 },
1347 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001348 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001349 "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.
1350 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1351 "kind": "sql#exportContext", # This is always sql#exportContext.
1352 "fileType": "A String", # The file type for the specified uri.
1353 # SQL: The file contains SQL statements.
1354 # CSV: The file contains CSV data.
1355 "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.
1356 "csvExportOptions": { # Options for exporting data as CSV.
1357 "selectQuery": "A String", # The select query used to extract the data.
1358 },
1359 "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.
1360 "A String",
1361 ],
1362 "sqlExportOptions": { # Options for exporting data as SQL statements.
1363 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1364 "A String",
1365 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001366 "schemaOnly": True or False, # Export only schema.
Craig Citroe633be12015-03-02 13:40:36 -08001367 },
1368 },
1369 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1370 "targetProject": "A String", # The project ID of the target instance related to this operation.
1371 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001372 "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 -08001373 "targetLink": "A String", # The URI of the instance related to the operation.
1374 "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 +00001375 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1376 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001377 "errors": [ # The list of errors encountered while processing this operation.
1378 { # Database instance operation error.
1379 "kind": "sql#operationError", # This is always sql#operationError.
1380 "code": "A String", # Identifies the specific error that occurred.
1381 "message": "A String", # Additional information about the error encountered.
1382 },
1383 ],
1384 },
1385 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1386 "selfLink": "A String", # The URI of this resource.
1387 "user": "A String", # The email address of the user who initiated this operation.
1388 }</pre>
1389</div>
1390
1391<div class="method">
1392 <code class="details" id="startReplica">startReplica(project, instance)</code>
1393 <pre>Starts the replication in the read replica instance.
1394
1395Args:
1396 project: string, ID of the project that contains the read replica. (required)
1397 instance: string, Cloud SQL read replica instance name. (required)
1398
1399Returns:
1400 An object of the form:
1401
1402 { # 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.
1403 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1404 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1405 "fileType": "A String", # The file type for the specified uri.
1406 # SQL: The file contains SQL statements.
1407 # CSV: The file contains CSV data.
1408 "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.
1409 "kind": "sql#importContext", # This is always sql#importContext.
1410 "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.
1411 "csvImportOptions": { # Options for importing data as CSV.
1412 "table": "A String", # The table to which CSV data is imported.
1413 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1414 "A String",
1415 ],
1416 },
1417 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001418 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001419 "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.
1420 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1421 "kind": "sql#exportContext", # This is always sql#exportContext.
1422 "fileType": "A String", # The file type for the specified uri.
1423 # SQL: The file contains SQL statements.
1424 # CSV: The file contains CSV data.
1425 "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.
1426 "csvExportOptions": { # Options for exporting data as CSV.
1427 "selectQuery": "A String", # The select query used to extract the data.
1428 },
1429 "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.
1430 "A String",
1431 ],
1432 "sqlExportOptions": { # Options for exporting data as SQL statements.
1433 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1434 "A String",
1435 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001436 "schemaOnly": True or False, # Export only schema.
Craig Citroe633be12015-03-02 13:40:36 -08001437 },
1438 },
1439 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1440 "targetProject": "A String", # The project ID of the target instance related to this operation.
1441 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001442 "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 -08001443 "targetLink": "A String", # The URI of the instance related to the operation.
1444 "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 +00001445 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1446 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001447 "errors": [ # The list of errors encountered while processing this operation.
1448 { # Database instance operation error.
1449 "kind": "sql#operationError", # This is always sql#operationError.
1450 "code": "A String", # Identifies the specific error that occurred.
1451 "message": "A String", # Additional information about the error encountered.
1452 },
1453 ],
1454 },
1455 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1456 "selfLink": "A String", # The URI of this resource.
1457 "user": "A String", # The email address of the user who initiated this operation.
1458 }</pre>
1459</div>
1460
1461<div class="method">
1462 <code class="details" id="stopReplica">stopReplica(project, instance)</code>
1463 <pre>Stops the replication in the read replica instance.
1464
1465Args:
1466 project: string, ID of the project that contains the read replica. (required)
1467 instance: string, Cloud SQL read replica instance name. (required)
1468
1469Returns:
1470 An object of the form:
1471
1472 { # 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.
1473 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1474 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1475 "fileType": "A String", # The file type for the specified uri.
1476 # SQL: The file contains SQL statements.
1477 # CSV: The file contains CSV data.
1478 "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.
1479 "kind": "sql#importContext", # This is always sql#importContext.
1480 "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.
1481 "csvImportOptions": { # Options for importing data as CSV.
1482 "table": "A String", # The table to which CSV data is imported.
1483 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1484 "A String",
1485 ],
1486 },
1487 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001488 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001489 "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.
1490 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1491 "kind": "sql#exportContext", # This is always sql#exportContext.
1492 "fileType": "A String", # The file type for the specified uri.
1493 # SQL: The file contains SQL statements.
1494 # CSV: The file contains CSV data.
1495 "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.
1496 "csvExportOptions": { # Options for exporting data as CSV.
1497 "selectQuery": "A String", # The select query used to extract the data.
1498 },
1499 "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.
1500 "A String",
1501 ],
1502 "sqlExportOptions": { # Options for exporting data as SQL statements.
1503 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1504 "A String",
1505 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001506 "schemaOnly": True or False, # Export only schema.
Craig Citroe633be12015-03-02 13:40:36 -08001507 },
1508 },
1509 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1510 "targetProject": "A String", # The project ID of the target instance related to this operation.
1511 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001512 "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 -08001513 "targetLink": "A String", # The URI of the instance related to the operation.
1514 "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 +00001515 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1516 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001517 "errors": [ # The list of errors encountered while processing this operation.
1518 { # Database instance operation error.
1519 "kind": "sql#operationError", # This is always sql#operationError.
1520 "code": "A String", # Identifies the specific error that occurred.
1521 "message": "A String", # Additional information about the error encountered.
1522 },
1523 ],
1524 },
1525 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1526 "selfLink": "A String", # The URI of this resource.
1527 "user": "A String", # The email address of the user who initiated this operation.
1528 }</pre>
1529</div>
1530
1531<div class="method">
1532 <code class="details" id="update">update(project, instance, body)</code>
1533 <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.
1534
1535Args:
1536 project: string, Project ID of the project that contains the instance. (required)
1537 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1538 body: object, The request body. (required)
1539 The object takes the form of:
1540
1541{ # A Cloud SQL instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001542 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
1543 "kind": "sql#onPremisesConfiguration", # This is always sql#onPremisesConfiguration.
1544 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
1545 },
Craig Citroe633be12015-03-02 13:40:36 -08001546 "kind": "sql#instance", # This is always sql#instance.
1547 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
1548 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001549 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to read-replicas replicating from on-premises masters.
1550 "kind": "sql#replicaConfiguration", # This is always sql#replicaConfiguration.
1551 "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.
1552 "username": "A String", # The username for the replication connection.
1553 "kind": "sql#mysqlReplicaConfiguration", # This is always sql#mysqlReplicaConfiguration.
1554 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
1555 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
1556 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
1557 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
1558 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
1559 "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.
1560 "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.
1561 "password": "A String", # The password for the replication connection.
1562 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
1563 },
1564 },
1565 "replicaNames": [ # The replicas of the instance.
1566 "A String",
1567 ],
1568 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
1569 "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 -08001570 "serverCaCert": { # SslCerts Resource # SSL configuration.
1571 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
1572 "kind": "sql#sslCert", # This is always sql#sslCert.
1573 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
1574 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1575 "instance": "A String", # Name of the database instance.
1576 "cert": "A String", # PEM representation.
1577 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1578 "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 +00001579 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -08001580 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001581 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
1582 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
1583 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
1584 # RUNNABLE: The instance is running, or is ready to run when accessed.
1585 # SUSPENDED: The instance is not available, for example due to problems with billing.
1586 # PENDING_CREATE: The instance is being created.
1587 # MAINTENANCE: The instance is down for maintenance.
1588 # FAILED: The instance creation failed.
1589 # UNKNOWN_STATE: The state of the instance is unknown.
1590 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
1591 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
1592 "ipAddresses": [ # The assigned IP addresses for the instance.
1593 { # Database instance IP Mapping.
1594 "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.
1595 "ipAddress": "A String", # The IP address assigned.
1596 },
Craig Citroe633be12015-03-02 13:40:36 -08001597 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001598 "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 -08001599 "settings": { # Database instance settings. # The user settings.
1600 "databaseFlags": [ # The database flags passed to the instance at startup.
1601 { # MySQL flags for Cloud SQL instances.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001602 "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.
1603 "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 -08001604 },
1605 ],
1606 "kind": "sql#settings", # This is always sql#settings.
1607 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
1608 "A String",
1609 ],
1610 "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.
1611 # ALWAYS: The instance should always be active.
1612 # NEVER: The instance should never be activated.
1613 # ON_DEMAND: The instance is activated upon receiving requests.
1614 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
1615 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
1616 "enabled": True or False, # Whether this configuration is enabled.
1617 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
1618 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
1619 },
1620 "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.
1621 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
1622 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
1623 "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).
1624 { # An entry for an Access Control list.
1625 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1626 "kind": "sql#aclEntry", # This is always sql#aclEntry.
1627 "value": "A String", # The whitelisted value for the access control list.
1628 "name": "A String", # An optional label to identify this entry.
1629 },
1630 ],
1631 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001632 "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 -08001633 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1634 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001635 "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 -08001636 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
1637 "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.
1638 "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.
1639 "kind": "sql#locationPreference", # This is always sql#locationPreference.
1640 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
1641 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
1642 },
1643 },
Craig Citroe633be12015-03-02 13:40:36 -08001644 "instanceType": "A String", # The instance type. This can be one of the following.
1645 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001646 # ON_PREMISES_INSTANCE: An instance running on the customer's premises.
Craig Citroe633be12015-03-02 13:40:36 -08001647 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
1648 "selfLink": "A String", # The URI of this resource.
1649 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
1650 }
1651
1652
1653Returns:
1654 An object of the form:
1655
1656 { # 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.
1657 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1658 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1659 "fileType": "A String", # The file type for the specified uri.
1660 # SQL: The file contains SQL statements.
1661 # CSV: The file contains CSV data.
1662 "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.
1663 "kind": "sql#importContext", # This is always sql#importContext.
1664 "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.
1665 "csvImportOptions": { # Options for importing data as CSV.
1666 "table": "A String", # The table to which CSV data is imported.
1667 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1668 "A String",
1669 ],
1670 },
1671 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001672 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -08001673 "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.
1674 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1675 "kind": "sql#exportContext", # This is always sql#exportContext.
1676 "fileType": "A String", # The file type for the specified uri.
1677 # SQL: The file contains SQL statements.
1678 # CSV: The file contains CSV data.
1679 "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.
1680 "csvExportOptions": { # Options for exporting data as CSV.
1681 "selectQuery": "A String", # The select query used to extract the data.
1682 },
1683 "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.
1684 "A String",
1685 ],
1686 "sqlExportOptions": { # Options for exporting data as SQL statements.
1687 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1688 "A String",
1689 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001690 "schemaOnly": True or False, # Export only schema.
Craig Citroe633be12015-03-02 13:40:36 -08001691 },
1692 },
1693 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1694 "targetProject": "A String", # The project ID of the target instance related to this operation.
1695 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001696 "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 -08001697 "targetLink": "A String", # The URI of the instance related to the operation.
1698 "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 +00001699 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1700 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -08001701 "errors": [ # The list of errors encountered while processing this operation.
1702 { # Database instance operation error.
1703 "kind": "sql#operationError", # This is always sql#operationError.
1704 "code": "A String", # Identifies the specific error that occurred.
1705 "message": "A String", # Additional information about the error encountered.
1706 },
1707 ],
1708 },
1709 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1710 "selfLink": "A String", # The URI of this resource.
1711 "user": "A String", # The email address of the user who initiated this operation.
1712 }</pre>
1713</div>
1714
1715</body></html>