blob: a493aae251eed66cf231e2d8b88c4f9a74aaf208 [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 },
168 "kind": "sql#operation", # This is always sql#instanceOperation.
169 "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
170 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
171 "kind": "sql#exportContext", # This is always sql#exportContext.
172 "fileType": "A String", # The file type for the specified uri.
173 # SQL: The file contains SQL statements.
174 # CSV: The file contains CSV data.
175 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
176 "csvExportOptions": { # Options for exporting data as CSV.
177 "selectQuery": "A String", # The select query used to extract the data.
178 },
179 "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
180 "A String",
181 ],
182 "sqlExportOptions": { # Options for exporting data as SQL statements.
183 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
184 "A String",
185 ],
186 },
187 },
188 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
189 "targetProject": "A String", # The project ID of the target instance related to this operation.
190 "targetId": "A String", # Name of the database instance related to this operation.
191 "operationType": "A String", # TODO(b/18431310): update this list to reflect current values. The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME.
192 "targetLink": "A String", # The URI of the instance related to the operation.
193 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
194 "error": { # If errors occurred during processing of this operation, this field will be populated.
195 "errors": [ # The list of errors encountered while processing this operation.
196 { # Database instance operation error.
197 "kind": "sql#operationError", # This is always sql#operationError.
198 "code": "A String", # Identifies the specific error that occurred.
199 "message": "A String", # Additional information about the error encountered.
200 },
201 ],
202 },
203 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
204 "selfLink": "A String", # The URI of this resource.
205 "user": "A String", # The email address of the user who initiated this operation.
206 }</pre>
207</div>
208
209<div class="method">
210 <code class="details" id="delete">delete(project, instance)</code>
211 <pre>Deletes a Cloud SQL instance.
212
213Args:
214 project: string, Project ID of the project that contains the instance to be deleted. (required)
215 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
216
217Returns:
218 An object of the form:
219
220 { # 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.
221 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
222 "importContext": { # Database instance import context. # The context for import operation, if applicable.
223 "fileType": "A String", # The file type for the specified uri.
224 # SQL: The file contains SQL statements.
225 # CSV: The file contains CSV data.
226 "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.
227 "kind": "sql#importContext", # This is always sql#importContext.
228 "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.
229 "csvImportOptions": { # Options for importing data as CSV.
230 "table": "A String", # The table to which CSV data is imported.
231 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
232 "A String",
233 ],
234 },
235 },
236 "kind": "sql#operation", # This is always sql#instanceOperation.
237 "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.
238 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
239 "kind": "sql#exportContext", # This is always sql#exportContext.
240 "fileType": "A String", # The file type for the specified uri.
241 # SQL: The file contains SQL statements.
242 # CSV: The file contains CSV data.
243 "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.
244 "csvExportOptions": { # Options for exporting data as CSV.
245 "selectQuery": "A String", # The select query used to extract the data.
246 },
247 "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.
248 "A String",
249 ],
250 "sqlExportOptions": { # Options for exporting data as SQL statements.
251 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
252 "A String",
253 ],
254 },
255 },
256 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
257 "targetProject": "A String", # The project ID of the target instance related to this operation.
258 "targetId": "A String", # Name of the database instance related to this operation.
259 "operationType": "A String", # TODO(b/18431310): update this list to reflect current values. The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME.
260 "targetLink": "A String", # The URI of the instance related to the operation.
261 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
262 "error": { # If errors occurred during processing of this operation, this field will be populated.
263 "errors": [ # The list of errors encountered while processing this operation.
264 { # Database instance operation error.
265 "kind": "sql#operationError", # This is always sql#operationError.
266 "code": "A String", # Identifies the specific error that occurred.
267 "message": "A String", # Additional information about the error encountered.
268 },
269 ],
270 },
271 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
272 "selfLink": "A String", # The URI of this resource.
273 "user": "A String", # The email address of the user who initiated this operation.
274 }</pre>
275</div>
276
277<div class="method">
278 <code class="details" id="export">export(project, instance, body)</code>
279 <pre>Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file.
280
281Args:
282 project: string, Project ID of the project that contains the instance to be exported. (required)
283 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
284 body: object, The request body. (required)
285 The object takes the form of:
286
287{ # Database instance export request.
288 "exportContext": { # Database instance export context. # Contains details about the export operation.
289 "kind": "sql#exportContext", # This is always sql#exportContext.
290 "fileType": "A String", # The file type for the specified uri.
291 # SQL: The file contains SQL statements.
292 # CSV: The file contains CSV data.
293 "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.
294 "csvExportOptions": { # Options for exporting data as CSV.
295 "selectQuery": "A String", # The select query used to extract the data.
296 },
297 "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.
298 "A String",
299 ],
300 "sqlExportOptions": { # Options for exporting data as SQL statements.
301 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
302 "A String",
303 ],
304 },
305 },
306 }
307
308
309Returns:
310 An object of the form:
311
312 { # 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.
313 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
314 "importContext": { # Database instance import context. # The context for import operation, if applicable.
315 "fileType": "A String", # The file type for the specified uri.
316 # SQL: The file contains SQL statements.
317 # CSV: The file contains CSV data.
318 "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.
319 "kind": "sql#importContext", # This is always sql#importContext.
320 "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.
321 "csvImportOptions": { # Options for importing data as CSV.
322 "table": "A String", # The table to which CSV data is imported.
323 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
324 "A String",
325 ],
326 },
327 },
328 "kind": "sql#operation", # This is always sql#instanceOperation.
329 "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.
330 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
331 "kind": "sql#exportContext", # This is always sql#exportContext.
332 "fileType": "A String", # The file type for the specified uri.
333 # SQL: The file contains SQL statements.
334 # CSV: The file contains CSV data.
335 "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.
336 "csvExportOptions": { # Options for exporting data as CSV.
337 "selectQuery": "A String", # The select query used to extract the data.
338 },
339 "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.
340 "A String",
341 ],
342 "sqlExportOptions": { # Options for exporting data as SQL statements.
343 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
344 "A String",
345 ],
346 },
347 },
348 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
349 "targetProject": "A String", # The project ID of the target instance related to this operation.
350 "targetId": "A String", # Name of the database instance related to this operation.
351 "operationType": "A String", # TODO(b/18431310): update this list to reflect current values. The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME.
352 "targetLink": "A String", # The URI of the instance related to the operation.
353 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
354 "error": { # If errors occurred during processing of this operation, this field will be populated.
355 "errors": [ # The list of errors encountered while processing this operation.
356 { # Database instance operation error.
357 "kind": "sql#operationError", # This is always sql#operationError.
358 "code": "A String", # Identifies the specific error that occurred.
359 "message": "A String", # Additional information about the error encountered.
360 },
361 ],
362 },
363 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
364 "selfLink": "A String", # The URI of this resource.
365 "user": "A String", # The email address of the user who initiated this operation.
366 }</pre>
367</div>
368
369<div class="method">
370 <code class="details" id="get">get(project, instance)</code>
371 <pre>Retrieves a resource containing information about a Cloud SQL instance.
372
373Args:
374 project: string, Project ID of the project that contains the instance. (required)
375 instance: string, Database instance ID. This does not include the project ID. (required)
376
377Returns:
378 An object of the form:
379
380 { # A Cloud SQL instance resource.
381 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
382 "kind": "sql#instance", # This is always sql#instance.
383 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
384 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
385 "serverCaCert": { # SslCerts Resource # SSL configuration.
386 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
387 "kind": "sql#sslCert", # This is always sql#sslCert.
388 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
389 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
390 "instance": "A String", # Name of the database instance.
391 "cert": "A String", # PEM representation.
392 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
393 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
394 "selfLink": "A String",
395 },
396 "replicaNames": [ # The replicas of the instance.
397 "A String",
398 ],
399 "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.
400 "settings": { # Database instance settings. # The user settings.
401 "databaseFlags": [ # The database flags passed to the instance at startup.
402 { # MySQL flags for Cloud SQL instances.
403 "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. Refer to the official MySQL documentation on server options and system variables for descriptions of what these flags do. Acceptable values are: character_set_server utf8 or utf8mb4 event_scheduler on or off (Note: The event scheduler will only work reliably if the instance activationPolicy is set to ALWAYS) general_log on or off group_concat_max_len 4..17179869184 innodb_flush_log_at_trx_commit 0..2 innodb_lock_wait_timeout 1..1073741824 log_bin_trust_function_creators on or off log_output Can be either TABLE or NONE, FILE is not supported log_queries_not_using_indexes on or off long_query_time 0..30000000 lower_case_table_names 0..2 max_allowed_packet 16384..1073741824 read_only on or off skip_show_database on or off slow_query_log on or off. If set to on, you must also set the log_output flag to TABLE to receive logs. wait_timeout 1..31536000
404 "value": "A String", # The value of the flag. Booleans should be set using 1 for true, and 0 for false. This field must be omitted if the flag doesn't take a value.
405 },
406 ],
407 "kind": "sql#settings", # This is always sql#settings.
408 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
409 "A String",
410 ],
411 "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.
412 # ALWAYS: The instance should always be active.
413 # NEVER: The instance should never be activated.
414 # ON_DEMAND: The instance is activated upon receiving requests.
415 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
416 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
417 "enabled": True or False, # Whether this configuration is enabled.
418 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
419 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
420 },
421 "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.
422 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
423 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
424 "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).
425 { # An entry for an Access Control list.
426 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
427 "kind": "sql#aclEntry", # This is always sql#aclEntry.
428 "value": "A String", # The whitelisted value for the access control list.
429 "name": "A String", # An optional label to identify this entry.
430 },
431 ],
432 },
433 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
434 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
435 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
436 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
437 "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.
438 "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.
439 "kind": "sql#locationPreference", # This is always sql#locationPreference.
440 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
441 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
442 },
443 },
444 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
445 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
446 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
447 # RUNNABLE: The instance is running, or is ready to run when accessed.
448 # SUSPENDED: The instance is not available, for example due to problems with billing.
449 # PENDING_CREATE: The instance is being created.
450 # MAINTENANCE: The instance is down for maintenance.
451 # UNKNOWN_STATE: The state of the instance is unknown.
452 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
453 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
454 "ipAddresses": [ # The assigned IP addresses for the instance.
455 { # Database instance IP Mapping.
456 "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.
457 "ipAddress": "A String", # The IP address assigned.
458 },
459 ],
460 "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.
461 "instanceType": "A String", # The instance type. This can be one of the following.
462 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
463 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
464 "selfLink": "A String", # The URI of this resource.
465 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
466 }</pre>
467</div>
468
469<div class="method">
470 <code class="details" id="import_">import_(project, instance, body)</code>
471 <pre>Imports data into a Cloud SQL instance from a MySQL dump file in Google Cloud Storage.
472
473Args:
474 project: string, Project ID of the project that contains the instance. (required)
475 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
476 body: object, The request body. (required)
477 The object takes the form of:
478
479{ # Database instance import request.
480 "importContext": { # Database instance import context. # Contains details about the import operation.
481 "fileType": "A String", # The file type for the specified uri.
482 # SQL: The file contains SQL statements.
483 # CSV: The file contains CSV data.
484 "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.
485 "kind": "sql#importContext", # This is always sql#importContext.
486 "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.
487 "csvImportOptions": { # Options for importing data as CSV.
488 "table": "A String", # The table to which CSV data is imported.
489 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
490 "A String",
491 ],
492 },
493 },
494 }
495
496
497Returns:
498 An object of the form:
499
500 { # 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.
501 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
502 "importContext": { # Database instance import context. # The context for import operation, if applicable.
503 "fileType": "A String", # The file type for the specified uri.
504 # SQL: The file contains SQL statements.
505 # CSV: The file contains CSV data.
506 "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.
507 "kind": "sql#importContext", # This is always sql#importContext.
508 "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.
509 "csvImportOptions": { # Options for importing data as CSV.
510 "table": "A String", # The table to which CSV data is imported.
511 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
512 "A String",
513 ],
514 },
515 },
516 "kind": "sql#operation", # This is always sql#instanceOperation.
517 "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.
518 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
519 "kind": "sql#exportContext", # This is always sql#exportContext.
520 "fileType": "A String", # The file type for the specified uri.
521 # SQL: The file contains SQL statements.
522 # CSV: The file contains CSV data.
523 "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.
524 "csvExportOptions": { # Options for exporting data as CSV.
525 "selectQuery": "A String", # The select query used to extract the data.
526 },
527 "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.
528 "A String",
529 ],
530 "sqlExportOptions": { # Options for exporting data as SQL statements.
531 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
532 "A String",
533 ],
534 },
535 },
536 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
537 "targetProject": "A String", # The project ID of the target instance related to this operation.
538 "targetId": "A String", # Name of the database instance related to this operation.
539 "operationType": "A String", # TODO(b/18431310): update this list to reflect current values. The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME.
540 "targetLink": "A String", # The URI of the instance related to the operation.
541 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
542 "error": { # If errors occurred during processing of this operation, this field will be populated.
543 "errors": [ # The list of errors encountered while processing this operation.
544 { # Database instance operation error.
545 "kind": "sql#operationError", # This is always sql#operationError.
546 "code": "A String", # Identifies the specific error that occurred.
547 "message": "A String", # Additional information about the error encountered.
548 },
549 ],
550 },
551 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
552 "selfLink": "A String", # The URI of this resource.
553 "user": "A String", # The email address of the user who initiated this operation.
554 }</pre>
555</div>
556
557<div class="method">
558 <code class="details" id="insert">insert(project, body)</code>
559 <pre>Creates a new Cloud SQL instance.
560
561Args:
562 project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required)
563 body: object, The request body. (required)
564 The object takes the form of:
565
566{ # A Cloud SQL instance resource.
567 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
568 "kind": "sql#instance", # This is always sql#instance.
569 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
570 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
571 "serverCaCert": { # SslCerts Resource # SSL configuration.
572 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
573 "kind": "sql#sslCert", # This is always sql#sslCert.
574 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
575 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
576 "instance": "A String", # Name of the database instance.
577 "cert": "A String", # PEM representation.
578 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
579 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
580 "selfLink": "A String",
581 },
582 "replicaNames": [ # The replicas of the instance.
583 "A String",
584 ],
585 "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.
586 "settings": { # Database instance settings. # The user settings.
587 "databaseFlags": [ # The database flags passed to the instance at startup.
588 { # MySQL flags for Cloud SQL instances.
589 "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. Refer to the official MySQL documentation on server options and system variables for descriptions of what these flags do. Acceptable values are: character_set_server utf8 or utf8mb4 event_scheduler on or off (Note: The event scheduler will only work reliably if the instance activationPolicy is set to ALWAYS) general_log on or off group_concat_max_len 4..17179869184 innodb_flush_log_at_trx_commit 0..2 innodb_lock_wait_timeout 1..1073741824 log_bin_trust_function_creators on or off log_output Can be either TABLE or NONE, FILE is not supported log_queries_not_using_indexes on or off long_query_time 0..30000000 lower_case_table_names 0..2 max_allowed_packet 16384..1073741824 read_only on or off skip_show_database on or off slow_query_log on or off. If set to on, you must also set the log_output flag to TABLE to receive logs. wait_timeout 1..31536000
590 "value": "A String", # The value of the flag. Booleans should be set using 1 for true, and 0 for false. This field must be omitted if the flag doesn't take a value.
591 },
592 ],
593 "kind": "sql#settings", # This is always sql#settings.
594 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
595 "A String",
596 ],
597 "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.
598 # ALWAYS: The instance should always be active.
599 # NEVER: The instance should never be activated.
600 # ON_DEMAND: The instance is activated upon receiving requests.
601 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
602 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
603 "enabled": True or False, # Whether this configuration is enabled.
604 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
605 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
606 },
607 "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.
608 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
609 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
610 "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).
611 { # An entry for an Access Control list.
612 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
613 "kind": "sql#aclEntry", # This is always sql#aclEntry.
614 "value": "A String", # The whitelisted value for the access control list.
615 "name": "A String", # An optional label to identify this entry.
616 },
617 ],
618 },
619 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
620 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
621 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
622 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
623 "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.
624 "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.
625 "kind": "sql#locationPreference", # This is always sql#locationPreference.
626 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
627 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
628 },
629 },
630 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
631 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
632 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
633 # RUNNABLE: The instance is running, or is ready to run when accessed.
634 # SUSPENDED: The instance is not available, for example due to problems with billing.
635 # PENDING_CREATE: The instance is being created.
636 # MAINTENANCE: The instance is down for maintenance.
637 # UNKNOWN_STATE: The state of the instance is unknown.
638 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
639 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
640 "ipAddresses": [ # The assigned IP addresses for the instance.
641 { # Database instance IP Mapping.
642 "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.
643 "ipAddress": "A String", # The IP address assigned.
644 },
645 ],
646 "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.
647 "instanceType": "A String", # The instance type. This can be one of the following.
648 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
649 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
650 "selfLink": "A String", # The URI of this resource.
651 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
652 }
653
654
655Returns:
656 An object of the form:
657
658 { # 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.
659 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
660 "importContext": { # Database instance import context. # The context for import operation, if applicable.
661 "fileType": "A String", # The file type for the specified uri.
662 # SQL: The file contains SQL statements.
663 # CSV: The file contains CSV data.
664 "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.
665 "kind": "sql#importContext", # This is always sql#importContext.
666 "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.
667 "csvImportOptions": { # Options for importing data as CSV.
668 "table": "A String", # The table to which CSV data is imported.
669 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
670 "A String",
671 ],
672 },
673 },
674 "kind": "sql#operation", # This is always sql#instanceOperation.
675 "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.
676 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
677 "kind": "sql#exportContext", # This is always sql#exportContext.
678 "fileType": "A String", # The file type for the specified uri.
679 # SQL: The file contains SQL statements.
680 # CSV: The file contains CSV data.
681 "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.
682 "csvExportOptions": { # Options for exporting data as CSV.
683 "selectQuery": "A String", # The select query used to extract the data.
684 },
685 "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.
686 "A String",
687 ],
688 "sqlExportOptions": { # Options for exporting data as SQL statements.
689 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
690 "A String",
691 ],
692 },
693 },
694 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
695 "targetProject": "A String", # The project ID of the target instance related to this operation.
696 "targetId": "A String", # Name of the database instance related to this operation.
697 "operationType": "A String", # TODO(b/18431310): update this list to reflect current values. The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME.
698 "targetLink": "A String", # The URI of the instance related to the operation.
699 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
700 "error": { # If errors occurred during processing of this operation, this field will be populated.
701 "errors": [ # The list of errors encountered while processing this operation.
702 { # Database instance operation error.
703 "kind": "sql#operationError", # This is always sql#operationError.
704 "code": "A String", # Identifies the specific error that occurred.
705 "message": "A String", # Additional information about the error encountered.
706 },
707 ],
708 },
709 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
710 "selfLink": "A String", # The URI of this resource.
711 "user": "A String", # The email address of the user who initiated this operation.
712 }</pre>
713</div>
714
715<div class="method">
716 <code class="details" id="list">list(project, pageToken=None, maxResults=None)</code>
717 <pre>Lists instances under a given project in the alphabetical order of the instance name.
718
719Args:
720 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
721 pageToken: string, A previously-returned page token representing part of the larger set of results to view.
722 maxResults: integer, The maximum number of results to return per response.
723
724Returns:
725 An object of the form:
726
727 { # Database instances list response.
728 "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.
729 "items": [ # List of database instance resources.
730 { # A Cloud SQL instance resource.
731 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
732 "kind": "sql#instance", # This is always sql#instance.
733 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
734 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
735 "serverCaCert": { # SslCerts Resource # SSL configuration.
736 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
737 "kind": "sql#sslCert", # This is always sql#sslCert.
738 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
739 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
740 "instance": "A String", # Name of the database instance.
741 "cert": "A String", # PEM representation.
742 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
743 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
744 "selfLink": "A String",
745 },
746 "replicaNames": [ # The replicas of the instance.
747 "A String",
748 ],
749 "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.
750 "settings": { # Database instance settings. # The user settings.
751 "databaseFlags": [ # The database flags passed to the instance at startup.
752 { # MySQL flags for Cloud SQL instances.
753 "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. Refer to the official MySQL documentation on server options and system variables for descriptions of what these flags do. Acceptable values are: character_set_server utf8 or utf8mb4 event_scheduler on or off (Note: The event scheduler will only work reliably if the instance activationPolicy is set to ALWAYS) general_log on or off group_concat_max_len 4..17179869184 innodb_flush_log_at_trx_commit 0..2 innodb_lock_wait_timeout 1..1073741824 log_bin_trust_function_creators on or off log_output Can be either TABLE or NONE, FILE is not supported log_queries_not_using_indexes on or off long_query_time 0..30000000 lower_case_table_names 0..2 max_allowed_packet 16384..1073741824 read_only on or off skip_show_database on or off slow_query_log on or off. If set to on, you must also set the log_output flag to TABLE to receive logs. wait_timeout 1..31536000
754 "value": "A String", # The value of the flag. Booleans should be set using 1 for true, and 0 for false. This field must be omitted if the flag doesn't take a value.
755 },
756 ],
757 "kind": "sql#settings", # This is always sql#settings.
758 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
759 "A String",
760 ],
761 "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.
762 # ALWAYS: The instance should always be active.
763 # NEVER: The instance should never be activated.
764 # ON_DEMAND: The instance is activated upon receiving requests.
765 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
766 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
767 "enabled": True or False, # Whether this configuration is enabled.
768 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
769 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
770 },
771 "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.
772 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
773 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
774 "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).
775 { # An entry for an Access Control list.
776 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
777 "kind": "sql#aclEntry", # This is always sql#aclEntry.
778 "value": "A String", # The whitelisted value for the access control list.
779 "name": "A String", # An optional label to identify this entry.
780 },
781 ],
782 },
783 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
784 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
785 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
786 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
787 "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.
788 "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.
789 "kind": "sql#locationPreference", # This is always sql#locationPreference.
790 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
791 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
792 },
793 },
794 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
795 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
796 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
797 # RUNNABLE: The instance is running, or is ready to run when accessed.
798 # SUSPENDED: The instance is not available, for example due to problems with billing.
799 # PENDING_CREATE: The instance is being created.
800 # MAINTENANCE: The instance is down for maintenance.
801 # UNKNOWN_STATE: The state of the instance is unknown.
802 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
803 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
804 "ipAddresses": [ # The assigned IP addresses for the instance.
805 { # Database instance IP Mapping.
806 "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.
807 "ipAddress": "A String", # The IP address assigned.
808 },
809 ],
810 "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.
811 "instanceType": "A String", # The instance type. This can be one of the following.
812 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
813 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
814 "selfLink": "A String", # The URI of this resource.
815 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
816 },
817 ],
818 "kind": "sql#instancesList", # This is always sql#instancesList.
819 }</pre>
820</div>
821
822<div class="method">
823 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
824 <pre>Retrieves the next page of results.
825
826Args:
827 previous_request: The request for the previous page. (required)
828 previous_response: The response from the request for the previous page. (required)
829
830Returns:
831 A request object that you can call 'execute()' on to request the next
832 page. Returns None if there are no more items in the collection.
833 </pre>
834</div>
835
836<div class="method">
837 <code class="details" id="patch">patch(project, instance, body)</code>
838 <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.
839
840Args:
841 project: string, Project ID of the project that contains the instance. (required)
842 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
843 body: object, The request body. (required)
844 The object takes the form of:
845
846{ # A Cloud SQL instance resource.
847 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
848 "kind": "sql#instance", # This is always sql#instance.
849 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
850 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
851 "serverCaCert": { # SslCerts Resource # SSL configuration.
852 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
853 "kind": "sql#sslCert", # This is always sql#sslCert.
854 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
855 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
856 "instance": "A String", # Name of the database instance.
857 "cert": "A String", # PEM representation.
858 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
859 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
860 "selfLink": "A String",
861 },
862 "replicaNames": [ # The replicas of the instance.
863 "A String",
864 ],
865 "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.
866 "settings": { # Database instance settings. # The user settings.
867 "databaseFlags": [ # The database flags passed to the instance at startup.
868 { # MySQL flags for Cloud SQL instances.
869 "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. Refer to the official MySQL documentation on server options and system variables for descriptions of what these flags do. Acceptable values are: character_set_server utf8 or utf8mb4 event_scheduler on or off (Note: The event scheduler will only work reliably if the instance activationPolicy is set to ALWAYS) general_log on or off group_concat_max_len 4..17179869184 innodb_flush_log_at_trx_commit 0..2 innodb_lock_wait_timeout 1..1073741824 log_bin_trust_function_creators on or off log_output Can be either TABLE or NONE, FILE is not supported log_queries_not_using_indexes on or off long_query_time 0..30000000 lower_case_table_names 0..2 max_allowed_packet 16384..1073741824 read_only on or off skip_show_database on or off slow_query_log on or off. If set to on, you must also set the log_output flag to TABLE to receive logs. wait_timeout 1..31536000
870 "value": "A String", # The value of the flag. Booleans should be set using 1 for true, and 0 for false. This field must be omitted if the flag doesn't take a value.
871 },
872 ],
873 "kind": "sql#settings", # This is always sql#settings.
874 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
875 "A String",
876 ],
877 "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.
878 # ALWAYS: The instance should always be active.
879 # NEVER: The instance should never be activated.
880 # ON_DEMAND: The instance is activated upon receiving requests.
881 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
882 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
883 "enabled": True or False, # Whether this configuration is enabled.
884 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
885 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
886 },
887 "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.
888 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
889 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
890 "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).
891 { # An entry for an Access Control list.
892 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
893 "kind": "sql#aclEntry", # This is always sql#aclEntry.
894 "value": "A String", # The whitelisted value for the access control list.
895 "name": "A String", # An optional label to identify this entry.
896 },
897 ],
898 },
899 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
900 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
901 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
902 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
903 "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.
904 "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.
905 "kind": "sql#locationPreference", # This is always sql#locationPreference.
906 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
907 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
908 },
909 },
910 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
911 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
912 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
913 # RUNNABLE: The instance is running, or is ready to run when accessed.
914 # SUSPENDED: The instance is not available, for example due to problems with billing.
915 # PENDING_CREATE: The instance is being created.
916 # MAINTENANCE: The instance is down for maintenance.
917 # UNKNOWN_STATE: The state of the instance is unknown.
918 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
919 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
920 "ipAddresses": [ # The assigned IP addresses for the instance.
921 { # Database instance IP Mapping.
922 "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.
923 "ipAddress": "A String", # The IP address assigned.
924 },
925 ],
926 "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.
927 "instanceType": "A String", # The instance type. This can be one of the following.
928 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
929 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
930 "selfLink": "A String", # The URI of this resource.
931 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
932 }
933
934
935Returns:
936 An object of the form:
937
938 { # 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.
939 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
940 "importContext": { # Database instance import context. # The context for import operation, if applicable.
941 "fileType": "A String", # The file type for the specified uri.
942 # SQL: The file contains SQL statements.
943 # CSV: The file contains CSV data.
944 "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.
945 "kind": "sql#importContext", # This is always sql#importContext.
946 "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.
947 "csvImportOptions": { # Options for importing data as CSV.
948 "table": "A String", # The table to which CSV data is imported.
949 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
950 "A String",
951 ],
952 },
953 },
954 "kind": "sql#operation", # This is always sql#instanceOperation.
955 "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.
956 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
957 "kind": "sql#exportContext", # This is always sql#exportContext.
958 "fileType": "A String", # The file type for the specified uri.
959 # SQL: The file contains SQL statements.
960 # CSV: The file contains CSV data.
961 "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.
962 "csvExportOptions": { # Options for exporting data as CSV.
963 "selectQuery": "A String", # The select query used to extract the data.
964 },
965 "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.
966 "A String",
967 ],
968 "sqlExportOptions": { # Options for exporting data as SQL statements.
969 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
970 "A String",
971 ],
972 },
973 },
974 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
975 "targetProject": "A String", # The project ID of the target instance related to this operation.
976 "targetId": "A String", # Name of the database instance related to this operation.
977 "operationType": "A String", # TODO(b/18431310): update this list to reflect current values. The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME.
978 "targetLink": "A String", # The URI of the instance related to the operation.
979 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
980 "error": { # If errors occurred during processing of this operation, this field will be populated.
981 "errors": [ # The list of errors encountered while processing this operation.
982 { # Database instance operation error.
983 "kind": "sql#operationError", # This is always sql#operationError.
984 "code": "A String", # Identifies the specific error that occurred.
985 "message": "A String", # Additional information about the error encountered.
986 },
987 ],
988 },
989 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
990 "selfLink": "A String", # The URI of this resource.
991 "user": "A String", # The email address of the user who initiated this operation.
992 }</pre>
993</div>
994
995<div class="method">
996 <code class="details" id="promoteReplica">promoteReplica(project, instance)</code>
997 <pre>Promotes the read replica instance to be a stand-alone Cloud SQL instance.
998
999Args:
1000 project: string, ID of the project that contains the read replica. (required)
1001 instance: string, Cloud SQL read replica instance name. (required)
1002
1003Returns:
1004 An object of the form:
1005
1006 { # 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.
1007 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1008 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1009 "fileType": "A String", # The file type for the specified uri.
1010 # SQL: The file contains SQL statements.
1011 # CSV: The file contains CSV data.
1012 "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.
1013 "kind": "sql#importContext", # This is always sql#importContext.
1014 "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.
1015 "csvImportOptions": { # Options for importing data as CSV.
1016 "table": "A String", # The table to which CSV data is imported.
1017 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1018 "A String",
1019 ],
1020 },
1021 },
1022 "kind": "sql#operation", # This is always sql#instanceOperation.
1023 "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.
1024 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1025 "kind": "sql#exportContext", # This is always sql#exportContext.
1026 "fileType": "A String", # The file type for the specified uri.
1027 # SQL: The file contains SQL statements.
1028 # CSV: The file contains CSV data.
1029 "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.
1030 "csvExportOptions": { # Options for exporting data as CSV.
1031 "selectQuery": "A String", # The select query used to extract the data.
1032 },
1033 "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.
1034 "A String",
1035 ],
1036 "sqlExportOptions": { # Options for exporting data as SQL statements.
1037 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1038 "A String",
1039 ],
1040 },
1041 },
1042 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1043 "targetProject": "A String", # The project ID of the target instance related to this operation.
1044 "targetId": "A String", # Name of the database instance related to this operation.
1045 "operationType": "A String", # TODO(b/18431310): update this list to reflect current values. The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME.
1046 "targetLink": "A String", # The URI of the instance related to the operation.
1047 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1048 "error": { # If errors occurred during processing of this operation, this field will be populated.
1049 "errors": [ # The list of errors encountered while processing this operation.
1050 { # Database instance operation error.
1051 "kind": "sql#operationError", # This is always sql#operationError.
1052 "code": "A String", # Identifies the specific error that occurred.
1053 "message": "A String", # Additional information about the error encountered.
1054 },
1055 ],
1056 },
1057 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1058 "selfLink": "A String", # The URI of this resource.
1059 "user": "A String", # The email address of the user who initiated this operation.
1060 }</pre>
1061</div>
1062
1063<div class="method">
1064 <code class="details" id="resetSslConfig">resetSslConfig(project, instance)</code>
1065 <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.
1066
1067Args:
1068 project: string, Project ID of the project that contains the instance. (required)
1069 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1070
1071Returns:
1072 An object of the form:
1073
1074 { # 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.
1075 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1076 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1077 "fileType": "A String", # The file type for the specified uri.
1078 # SQL: The file contains SQL statements.
1079 # CSV: The file contains CSV data.
1080 "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.
1081 "kind": "sql#importContext", # This is always sql#importContext.
1082 "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.
1083 "csvImportOptions": { # Options for importing data as CSV.
1084 "table": "A String", # The table to which CSV data is imported.
1085 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1086 "A String",
1087 ],
1088 },
1089 },
1090 "kind": "sql#operation", # This is always sql#instanceOperation.
1091 "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.
1092 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1093 "kind": "sql#exportContext", # This is always sql#exportContext.
1094 "fileType": "A String", # The file type for the specified uri.
1095 # SQL: The file contains SQL statements.
1096 # CSV: The file contains CSV data.
1097 "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.
1098 "csvExportOptions": { # Options for exporting data as CSV.
1099 "selectQuery": "A String", # The select query used to extract the data.
1100 },
1101 "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.
1102 "A String",
1103 ],
1104 "sqlExportOptions": { # Options for exporting data as SQL statements.
1105 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1106 "A String",
1107 ],
1108 },
1109 },
1110 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1111 "targetProject": "A String", # The project ID of the target instance related to this operation.
1112 "targetId": "A String", # Name of the database instance related to this operation.
1113 "operationType": "A String", # TODO(b/18431310): update this list to reflect current values. The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME.
1114 "targetLink": "A String", # The URI of the instance related to the operation.
1115 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1116 "error": { # If errors occurred during processing of this operation, this field will be populated.
1117 "errors": [ # The list of errors encountered while processing this operation.
1118 { # Database instance operation error.
1119 "kind": "sql#operationError", # This is always sql#operationError.
1120 "code": "A String", # Identifies the specific error that occurred.
1121 "message": "A String", # Additional information about the error encountered.
1122 },
1123 ],
1124 },
1125 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1126 "selfLink": "A String", # The URI of this resource.
1127 "user": "A String", # The email address of the user who initiated this operation.
1128 }</pre>
1129</div>
1130
1131<div class="method">
1132 <code class="details" id="restart">restart(project, instance)</code>
1133 <pre>Restarts a Cloud SQL instance.
1134
1135Args:
1136 project: string, Project ID of the project that contains the instance to be restarted. (required)
1137 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1138
1139Returns:
1140 An object of the form:
1141
1142 { # 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.
1143 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1144 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1145 "fileType": "A String", # The file type for the specified uri.
1146 # SQL: The file contains SQL statements.
1147 # CSV: The file contains CSV data.
1148 "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.
1149 "kind": "sql#importContext", # This is always sql#importContext.
1150 "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.
1151 "csvImportOptions": { # Options for importing data as CSV.
1152 "table": "A String", # The table to which CSV data is imported.
1153 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1154 "A String",
1155 ],
1156 },
1157 },
1158 "kind": "sql#operation", # This is always sql#instanceOperation.
1159 "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.
1160 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1161 "kind": "sql#exportContext", # This is always sql#exportContext.
1162 "fileType": "A String", # The file type for the specified uri.
1163 # SQL: The file contains SQL statements.
1164 # CSV: The file contains CSV data.
1165 "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.
1166 "csvExportOptions": { # Options for exporting data as CSV.
1167 "selectQuery": "A String", # The select query used to extract the data.
1168 },
1169 "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.
1170 "A String",
1171 ],
1172 "sqlExportOptions": { # Options for exporting data as SQL statements.
1173 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1174 "A String",
1175 ],
1176 },
1177 },
1178 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1179 "targetProject": "A String", # The project ID of the target instance related to this operation.
1180 "targetId": "A String", # Name of the database instance related to this operation.
1181 "operationType": "A String", # TODO(b/18431310): update this list to reflect current values. The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME.
1182 "targetLink": "A String", # The URI of the instance related to the operation.
1183 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1184 "error": { # If errors occurred during processing of this operation, this field will be populated.
1185 "errors": [ # The list of errors encountered while processing this operation.
1186 { # Database instance operation error.
1187 "kind": "sql#operationError", # This is always sql#operationError.
1188 "code": "A String", # Identifies the specific error that occurred.
1189 "message": "A String", # Additional information about the error encountered.
1190 },
1191 ],
1192 },
1193 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1194 "selfLink": "A String", # The URI of this resource.
1195 "user": "A String", # The email address of the user who initiated this operation.
1196 }</pre>
1197</div>
1198
1199<div class="method">
1200 <code class="details" id="restoreBackup">restoreBackup(project, instance, body)</code>
1201 <pre>Restores a backup of a Cloud SQL instance.
1202
1203Args:
1204 project: string, Project ID of the project that contains the instance. (required)
1205 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1206 body: object, The request body. (required)
1207 The object takes the form of:
1208
1209{ # Database instance restore backup request.
1210 "restoreBackupContext": { # Database instance restore from backup context. # Parameters required to perform the restore backup operation.
1211 "kind": "sql#restoreBackupContext", # This is always sql#restoreBackupContext.
1212 "backupRunId": "A String", # The ID of the backup run to restore from.
1213 },
1214 }
1215
1216
1217Returns:
1218 An object of the form:
1219
1220 { # 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.
1221 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1222 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1223 "fileType": "A String", # The file type for the specified uri.
1224 # SQL: The file contains SQL statements.
1225 # CSV: The file contains CSV data.
1226 "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.
1227 "kind": "sql#importContext", # This is always sql#importContext.
1228 "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.
1229 "csvImportOptions": { # Options for importing data as CSV.
1230 "table": "A String", # The table to which CSV data is imported.
1231 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1232 "A String",
1233 ],
1234 },
1235 },
1236 "kind": "sql#operation", # This is always sql#instanceOperation.
1237 "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.
1238 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1239 "kind": "sql#exportContext", # This is always sql#exportContext.
1240 "fileType": "A String", # The file type for the specified uri.
1241 # SQL: The file contains SQL statements.
1242 # CSV: The file contains CSV data.
1243 "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.
1244 "csvExportOptions": { # Options for exporting data as CSV.
1245 "selectQuery": "A String", # The select query used to extract the data.
1246 },
1247 "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.
1248 "A String",
1249 ],
1250 "sqlExportOptions": { # Options for exporting data as SQL statements.
1251 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1252 "A String",
1253 ],
1254 },
1255 },
1256 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1257 "targetProject": "A String", # The project ID of the target instance related to this operation.
1258 "targetId": "A String", # Name of the database instance related to this operation.
1259 "operationType": "A String", # TODO(b/18431310): update this list to reflect current values. The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME.
1260 "targetLink": "A String", # The URI of the instance related to the operation.
1261 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1262 "error": { # If errors occurred during processing of this operation, this field will be populated.
1263 "errors": [ # The list of errors encountered while processing this operation.
1264 { # Database instance operation error.
1265 "kind": "sql#operationError", # This is always sql#operationError.
1266 "code": "A String", # Identifies the specific error that occurred.
1267 "message": "A String", # Additional information about the error encountered.
1268 },
1269 ],
1270 },
1271 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1272 "selfLink": "A String", # The URI of this resource.
1273 "user": "A String", # The email address of the user who initiated this operation.
1274 }</pre>
1275</div>
1276
1277<div class="method">
1278 <code class="details" id="startReplica">startReplica(project, instance)</code>
1279 <pre>Starts the replication in the read replica instance.
1280
1281Args:
1282 project: string, ID of the project that contains the read replica. (required)
1283 instance: string, Cloud SQL read replica instance name. (required)
1284
1285Returns:
1286 An object of the form:
1287
1288 { # 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.
1289 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1290 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1291 "fileType": "A String", # The file type for the specified uri.
1292 # SQL: The file contains SQL statements.
1293 # CSV: The file contains CSV data.
1294 "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.
1295 "kind": "sql#importContext", # This is always sql#importContext.
1296 "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.
1297 "csvImportOptions": { # Options for importing data as CSV.
1298 "table": "A String", # The table to which CSV data is imported.
1299 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1300 "A String",
1301 ],
1302 },
1303 },
1304 "kind": "sql#operation", # This is always sql#instanceOperation.
1305 "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.
1306 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1307 "kind": "sql#exportContext", # This is always sql#exportContext.
1308 "fileType": "A String", # The file type for the specified uri.
1309 # SQL: The file contains SQL statements.
1310 # CSV: The file contains CSV data.
1311 "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.
1312 "csvExportOptions": { # Options for exporting data as CSV.
1313 "selectQuery": "A String", # The select query used to extract the data.
1314 },
1315 "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.
1316 "A String",
1317 ],
1318 "sqlExportOptions": { # Options for exporting data as SQL statements.
1319 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1320 "A String",
1321 ],
1322 },
1323 },
1324 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1325 "targetProject": "A String", # The project ID of the target instance related to this operation.
1326 "targetId": "A String", # Name of the database instance related to this operation.
1327 "operationType": "A String", # TODO(b/18431310): update this list to reflect current values. The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME.
1328 "targetLink": "A String", # The URI of the instance related to the operation.
1329 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1330 "error": { # If errors occurred during processing of this operation, this field will be populated.
1331 "errors": [ # The list of errors encountered while processing this operation.
1332 { # Database instance operation error.
1333 "kind": "sql#operationError", # This is always sql#operationError.
1334 "code": "A String", # Identifies the specific error that occurred.
1335 "message": "A String", # Additional information about the error encountered.
1336 },
1337 ],
1338 },
1339 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1340 "selfLink": "A String", # The URI of this resource.
1341 "user": "A String", # The email address of the user who initiated this operation.
1342 }</pre>
1343</div>
1344
1345<div class="method">
1346 <code class="details" id="stopReplica">stopReplica(project, instance)</code>
1347 <pre>Stops the replication in the read replica instance.
1348
1349Args:
1350 project: string, ID of the project that contains the read replica. (required)
1351 instance: string, Cloud SQL read replica instance name. (required)
1352
1353Returns:
1354 An object of the form:
1355
1356 { # 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.
1357 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1358 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1359 "fileType": "A String", # The file type for the specified uri.
1360 # SQL: The file contains SQL statements.
1361 # CSV: The file contains CSV data.
1362 "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.
1363 "kind": "sql#importContext", # This is always sql#importContext.
1364 "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.
1365 "csvImportOptions": { # Options for importing data as CSV.
1366 "table": "A String", # The table to which CSV data is imported.
1367 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1368 "A String",
1369 ],
1370 },
1371 },
1372 "kind": "sql#operation", # This is always sql#instanceOperation.
1373 "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.
1374 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1375 "kind": "sql#exportContext", # This is always sql#exportContext.
1376 "fileType": "A String", # The file type for the specified uri.
1377 # SQL: The file contains SQL statements.
1378 # CSV: The file contains CSV data.
1379 "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.
1380 "csvExportOptions": { # Options for exporting data as CSV.
1381 "selectQuery": "A String", # The select query used to extract the data.
1382 },
1383 "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.
1384 "A String",
1385 ],
1386 "sqlExportOptions": { # Options for exporting data as SQL statements.
1387 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1388 "A String",
1389 ],
1390 },
1391 },
1392 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1393 "targetProject": "A String", # The project ID of the target instance related to this operation.
1394 "targetId": "A String", # Name of the database instance related to this operation.
1395 "operationType": "A String", # TODO(b/18431310): update this list to reflect current values. The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME.
1396 "targetLink": "A String", # The URI of the instance related to the operation.
1397 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1398 "error": { # If errors occurred during processing of this operation, this field will be populated.
1399 "errors": [ # The list of errors encountered while processing this operation.
1400 { # Database instance operation error.
1401 "kind": "sql#operationError", # This is always sql#operationError.
1402 "code": "A String", # Identifies the specific error that occurred.
1403 "message": "A String", # Additional information about the error encountered.
1404 },
1405 ],
1406 },
1407 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1408 "selfLink": "A String", # The URI of this resource.
1409 "user": "A String", # The email address of the user who initiated this operation.
1410 }</pre>
1411</div>
1412
1413<div class="method">
1414 <code class="details" id="update">update(project, instance, body)</code>
1415 <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.
1416
1417Args:
1418 project: string, Project ID of the project that contains the instance. (required)
1419 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1420 body: object, The request body. (required)
1421 The object takes the form of:
1422
1423{ # A Cloud SQL instance resource.
1424 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
1425 "kind": "sql#instance", # This is always sql#instance.
1426 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
1427 "ipv6Address": "A String", # The IPv6 address assigned to the instance.
1428 "serverCaCert": { # SslCerts Resource # SSL configuration.
1429 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
1430 "kind": "sql#sslCert", # This is always sql#sslCert.
1431 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
1432 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1433 "instance": "A String", # Name of the database instance.
1434 "cert": "A String", # PEM representation.
1435 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1436 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
1437 "selfLink": "A String",
1438 },
1439 "replicaNames": [ # The replicas of the instance.
1440 "A String",
1441 ],
1442 "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.
1443 "settings": { # Database instance settings. # The user settings.
1444 "databaseFlags": [ # The database flags passed to the instance at startup.
1445 { # MySQL flags for Cloud SQL instances.
1446 "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. Refer to the official MySQL documentation on server options and system variables for descriptions of what these flags do. Acceptable values are: character_set_server utf8 or utf8mb4 event_scheduler on or off (Note: The event scheduler will only work reliably if the instance activationPolicy is set to ALWAYS) general_log on or off group_concat_max_len 4..17179869184 innodb_flush_log_at_trx_commit 0..2 innodb_lock_wait_timeout 1..1073741824 log_bin_trust_function_creators on or off log_output Can be either TABLE or NONE, FILE is not supported log_queries_not_using_indexes on or off long_query_time 0..30000000 lower_case_table_names 0..2 max_allowed_packet 16384..1073741824 read_only on or off skip_show_database on or off slow_query_log on or off. If set to on, you must also set the log_output flag to TABLE to receive logs. wait_timeout 1..31536000
1447 "value": "A String", # The value of the flag. Booleans should be set using 1 for true, and 0 for false. This field must be omitted if the flag doesn't take a value.
1448 },
1449 ],
1450 "kind": "sql#settings", # This is always sql#settings.
1451 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
1452 "A String",
1453 ],
1454 "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.
1455 # ALWAYS: The instance should always be active.
1456 # NEVER: The instance should never be activated.
1457 # ON_DEMAND: The instance is activated upon receiving requests.
1458 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
1459 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
1460 "enabled": True or False, # Whether this configuration is enabled.
1461 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
1462 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
1463 },
1464 "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.
1465 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
1466 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
1467 "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).
1468 { # An entry for an Access Control list.
1469 "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1470 "kind": "sql#aclEntry", # This is always sql#aclEntry.
1471 "value": "A String", # The whitelisted value for the access control list.
1472 "name": "A String", # An optional label to identify this entry.
1473 },
1474 ],
1475 },
1476 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1477 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
1478 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
1479 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
1480 "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.
1481 "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.
1482 "kind": "sql#locationPreference", # This is always sql#locationPreference.
1483 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
1484 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
1485 },
1486 },
1487 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
1488 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
1489 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
1490 # RUNNABLE: The instance is running, or is ready to run when accessed.
1491 # SUSPENDED: The instance is not available, for example due to problems with billing.
1492 # PENDING_CREATE: The instance is being created.
1493 # MAINTENANCE: The instance is down for maintenance.
1494 # UNKNOWN_STATE: The state of the instance is unknown.
1495 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
1496 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
1497 "ipAddresses": [ # The assigned IP addresses for the instance.
1498 { # Database instance IP Mapping.
1499 "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.
1500 "ipAddress": "A String", # The IP address assigned.
1501 },
1502 ],
1503 "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.
1504 "instanceType": "A String", # The instance type. This can be one of the following.
1505 # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
1506 # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
1507 "selfLink": "A String", # The URI of this resource.
1508 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
1509 }
1510
1511
1512Returns:
1513 An object of the form:
1514
1515 { # 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.
1516 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
1517 "importContext": { # Database instance import context. # The context for import operation, if applicable.
1518 "fileType": "A String", # The file type for the specified uri.
1519 # SQL: The file contains SQL statements.
1520 # CSV: The file contains CSV data.
1521 "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.
1522 "kind": "sql#importContext", # This is always sql#importContext.
1523 "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.
1524 "csvImportOptions": { # Options for importing data as CSV.
1525 "table": "A String", # The table to which CSV data is imported.
1526 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1527 "A String",
1528 ],
1529 },
1530 },
1531 "kind": "sql#operation", # This is always sql#instanceOperation.
1532 "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.
1533 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
1534 "kind": "sql#exportContext", # This is always sql#exportContext.
1535 "fileType": "A String", # The file type for the specified uri.
1536 # SQL: The file contains SQL statements.
1537 # CSV: The file contains CSV data.
1538 "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.
1539 "csvExportOptions": { # Options for exporting data as CSV.
1540 "selectQuery": "A String", # The select query used to extract the data.
1541 },
1542 "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.
1543 "A String",
1544 ],
1545 "sqlExportOptions": { # Options for exporting data as SQL statements.
1546 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
1547 "A String",
1548 ],
1549 },
1550 },
1551 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1552 "targetProject": "A String", # The project ID of the target instance related to this operation.
1553 "targetId": "A String", # Name of the database instance related to this operation.
1554 "operationType": "A String", # TODO(b/18431310): update this list to reflect current values. The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME.
1555 "targetLink": "A String", # The URI of the instance related to the operation.
1556 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1557 "error": { # If errors occurred during processing of this operation, this field will be populated.
1558 "errors": [ # The list of errors encountered while processing this operation.
1559 { # Database instance operation error.
1560 "kind": "sql#operationError", # This is always sql#operationError.
1561 "code": "A String", # Identifies the specific error that occurred.
1562 "message": "A String", # Additional information about the error encountered.
1563 },
1564 ],
1565 },
1566 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
1567 "selfLink": "A String", # The URI of this resource.
1568 "user": "A String", # The email address of the user who initiated this operation.
1569 }</pre>
1570</div>
1571
1572</body></html>