blob: db420f5f6a438ea22271b71ee0d9899355740c9e [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.databases.html">databases</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(project, instance, database)</a></code></p>
79<p class="firstline">Deletes a resource containing information about a database inside a Cloud SQL instance.</p>
80<p class="toc_element">
81 <code><a href="#get">get(project, instance, database)</a></code></p>
82<p class="firstline">Retrieves a resource containing information about a database inside a Cloud SQL instance.</p>
83<p class="toc_element">
84 <code><a href="#insert">insert(project, instance, body)</a></code></p>
85<p class="firstline">Inserts a resource containing information about a database inside a Cloud SQL instance.</p>
86<p class="toc_element">
87 <code><a href="#list">list(project, instance)</a></code></p>
88<p class="firstline">Lists databases in the specified Cloud SQL instance.</p>
89<p class="toc_element">
90 <code><a href="#patch">patch(project, instance, database, body)</a></code></p>
91<p class="firstline">Updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics.</p>
92<p class="toc_element">
93 <code><a href="#update">update(project, instance, database, body)</a></code></p>
94<p class="firstline">Updates a resource containing information about a database inside a Cloud SQL instance.</p>
95<h3>Method Details</h3>
96<div class="method">
97 <code class="details" id="delete">delete(project, instance, database)</code>
98 <pre>Deletes a resource containing information about a database inside a Cloud SQL instance.
99
100Args:
101 project: string, Project ID of the project that contains the instance. (required)
102 instance: string, Database instance ID. This does not include the project ID. (required)
103 database: string, Name of the database to be deleted in the instance. (required)
104
105Returns:
106 An object of the form:
107
108 { # 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.
109 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
110 "importContext": { # Database instance import context. # The context for import operation, if applicable.
111 "fileType": "A String", # The file type for the specified uri.
112 # SQL: The file contains SQL statements.
113 # CSV: The file contains CSV data.
114 "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.
115 "kind": "sql#importContext", # This is always sql#importContext.
116 "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.
117 "csvImportOptions": { # Options for importing data as CSV.
118 "table": "A String", # The table to which CSV data is imported.
119 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
120 "A String",
121 ],
122 },
123 },
124 "kind": "sql#operation", # This is always sql#instanceOperation.
125 "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.
126 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
127 "kind": "sql#exportContext", # This is always sql#exportContext.
128 "fileType": "A String", # The file type for the specified uri.
129 # SQL: The file contains SQL statements.
130 # CSV: The file contains CSV data.
131 "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.
132 "csvExportOptions": { # Options for exporting data as CSV.
133 "selectQuery": "A String", # The select query used to extract the data.
134 },
135 "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.
136 "A String",
137 ],
138 "sqlExportOptions": { # Options for exporting data as SQL statements.
139 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
140 "A String",
141 ],
142 },
143 },
144 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
145 "targetProject": "A String", # The project ID of the target instance related to this operation.
146 "targetId": "A String", # Name of the database instance related to this operation.
147 "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.
148 "targetLink": "A String", # The URI of the instance related to the operation.
149 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
150 "error": { # If errors occurred during processing of this operation, this field will be populated.
151 "errors": [ # The list of errors encountered while processing this operation.
152 { # Database instance operation error.
153 "kind": "sql#operationError", # This is always sql#operationError.
154 "code": "A String", # Identifies the specific error that occurred.
155 "message": "A String", # Additional information about the error encountered.
156 },
157 ],
158 },
159 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
160 "selfLink": "A String", # The URI of this resource.
161 "user": "A String", # The email address of the user who initiated this operation.
162 }</pre>
163</div>
164
165<div class="method">
166 <code class="details" id="get">get(project, instance, database)</code>
167 <pre>Retrieves a resource containing information about a database inside a Cloud SQL instance.
168
169Args:
170 project: string, Project ID of the project that contains the instance. (required)
171 instance: string, Database instance ID. This does not include the project ID. (required)
172 database: string, Name of the database in the instance. (required)
173
174Returns:
175 An object of the form:
176
177 { # A database resource inside a Cloud SQL instance.
178 "kind": "sql#database", # This is always sql#database.
179 "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
180 "charset": "A String", # The MySQL charset value.
181 "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable.
182 "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID.
183 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
184 "collation": "A String", # The MySQL collation value.
185 "selfLink": "A String", # The URI of this resource.
186 }</pre>
187</div>
188
189<div class="method">
190 <code class="details" id="insert">insert(project, instance, body)</code>
191 <pre>Inserts a resource containing information about a database inside a Cloud SQL instance.
192
193Args:
194 project: string, Project ID of the project that contains the instance. (required)
195 instance: string, Database instance ID. This does not include the project ID. (required)
196 body: object, The request body. (required)
197 The object takes the form of:
198
199{ # A database resource inside a Cloud SQL instance.
200 "kind": "sql#database", # This is always sql#database.
201 "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
202 "charset": "A String", # The MySQL charset value.
203 "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable.
204 "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID.
205 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
206 "collation": "A String", # The MySQL collation value.
207 "selfLink": "A String", # The URI of this resource.
208 }
209
210
211Returns:
212 An object of the form:
213
214 { # 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.
215 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
216 "importContext": { # Database instance import context. # The context for import operation, if applicable.
217 "fileType": "A String", # The file type for the specified uri.
218 # SQL: The file contains SQL statements.
219 # CSV: The file contains CSV data.
220 "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.
221 "kind": "sql#importContext", # This is always sql#importContext.
222 "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.
223 "csvImportOptions": { # Options for importing data as CSV.
224 "table": "A String", # The table to which CSV data is imported.
225 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
226 "A String",
227 ],
228 },
229 },
230 "kind": "sql#operation", # This is always sql#instanceOperation.
231 "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.
232 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
233 "kind": "sql#exportContext", # This is always sql#exportContext.
234 "fileType": "A String", # The file type for the specified uri.
235 # SQL: The file contains SQL statements.
236 # CSV: The file contains CSV data.
237 "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.
238 "csvExportOptions": { # Options for exporting data as CSV.
239 "selectQuery": "A String", # The select query used to extract the data.
240 },
241 "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.
242 "A String",
243 ],
244 "sqlExportOptions": { # Options for exporting data as SQL statements.
245 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
246 "A String",
247 ],
248 },
249 },
250 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
251 "targetProject": "A String", # The project ID of the target instance related to this operation.
252 "targetId": "A String", # Name of the database instance related to this operation.
253 "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.
254 "targetLink": "A String", # The URI of the instance related to the operation.
255 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
256 "error": { # If errors occurred during processing of this operation, this field will be populated.
257 "errors": [ # The list of errors encountered while processing this operation.
258 { # Database instance operation error.
259 "kind": "sql#operationError", # This is always sql#operationError.
260 "code": "A String", # Identifies the specific error that occurred.
261 "message": "A String", # Additional information about the error encountered.
262 },
263 ],
264 },
265 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
266 "selfLink": "A String", # The URI of this resource.
267 "user": "A String", # The email address of the user who initiated this operation.
268 }</pre>
269</div>
270
271<div class="method">
272 <code class="details" id="list">list(project, instance)</code>
273 <pre>Lists databases in the specified Cloud SQL instance.
274
275Args:
276 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
277 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
278
279Returns:
280 An object of the form:
281
282 { # Database list response.
283 "items": [ # List of database resources in the instance.
284 { # A database resource inside a Cloud SQL instance.
285 "kind": "sql#database", # This is always sql#database.
286 "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
287 "charset": "A String", # The MySQL charset value.
288 "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable.
289 "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID.
290 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
291 "collation": "A String", # The MySQL collation value.
292 "selfLink": "A String", # The URI of this resource.
293 },
294 ],
295 "kind": "sql#databasesList", # This is always sql#databasesList.
296 }</pre>
297</div>
298
299<div class="method">
300 <code class="details" id="patch">patch(project, instance, database, body)</code>
301 <pre>Updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics.
302
303Args:
304 project: string, Project ID of the project that contains the instance. (required)
305 instance: string, Database instance ID. This does not include the project ID. (required)
306 database: string, Name of the database to be updated in the instance. (required)
307 body: object, The request body. (required)
308 The object takes the form of:
309
310{ # A database resource inside a Cloud SQL instance.
311 "kind": "sql#database", # This is always sql#database.
312 "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
313 "charset": "A String", # The MySQL charset value.
314 "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable.
315 "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID.
316 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
317 "collation": "A String", # The MySQL collation value.
318 "selfLink": "A String", # The URI of this resource.
319 }
320
321
322Returns:
323 An object of the form:
324
325 { # 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.
326 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
327 "importContext": { # Database instance import context. # The context for import operation, if applicable.
328 "fileType": "A String", # The file type for the specified uri.
329 # SQL: The file contains SQL statements.
330 # CSV: The file contains CSV data.
331 "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.
332 "kind": "sql#importContext", # This is always sql#importContext.
333 "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.
334 "csvImportOptions": { # Options for importing data as CSV.
335 "table": "A String", # The table to which CSV data is imported.
336 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
337 "A String",
338 ],
339 },
340 },
341 "kind": "sql#operation", # This is always sql#instanceOperation.
342 "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.
343 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
344 "kind": "sql#exportContext", # This is always sql#exportContext.
345 "fileType": "A String", # The file type for the specified uri.
346 # SQL: The file contains SQL statements.
347 # CSV: The file contains CSV data.
348 "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.
349 "csvExportOptions": { # Options for exporting data as CSV.
350 "selectQuery": "A String", # The select query used to extract the data.
351 },
352 "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.
353 "A String",
354 ],
355 "sqlExportOptions": { # Options for exporting data as SQL statements.
356 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
357 "A String",
358 ],
359 },
360 },
361 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
362 "targetProject": "A String", # The project ID of the target instance related to this operation.
363 "targetId": "A String", # Name of the database instance related to this operation.
364 "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.
365 "targetLink": "A String", # The URI of the instance related to the operation.
366 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
367 "error": { # If errors occurred during processing of this operation, this field will be populated.
368 "errors": [ # The list of errors encountered while processing this operation.
369 { # Database instance operation error.
370 "kind": "sql#operationError", # This is always sql#operationError.
371 "code": "A String", # Identifies the specific error that occurred.
372 "message": "A String", # Additional information about the error encountered.
373 },
374 ],
375 },
376 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
377 "selfLink": "A String", # The URI of this resource.
378 "user": "A String", # The email address of the user who initiated this operation.
379 }</pre>
380</div>
381
382<div class="method">
383 <code class="details" id="update">update(project, instance, database, body)</code>
384 <pre>Updates a resource containing information about a database inside a Cloud SQL instance.
385
386Args:
387 project: string, Project ID of the project that contains the instance. (required)
388 instance: string, Database instance ID. This does not include the project ID. (required)
389 database: string, Name of the database to be updated in the instance. (required)
390 body: object, The request body. (required)
391 The object takes the form of:
392
393{ # A database resource inside a Cloud SQL instance.
394 "kind": "sql#database", # This is always sql#database.
395 "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
396 "charset": "A String", # The MySQL charset value.
397 "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable.
398 "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID.
399 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
400 "collation": "A String", # The MySQL collation value.
401 "selfLink": "A String", # The URI of this resource.
402 }
403
404
405Returns:
406 An object of the form:
407
408 { # 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.
409 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
410 "importContext": { # Database instance import context. # The context for import operation, if applicable.
411 "fileType": "A String", # The file type for the specified uri.
412 # SQL: The file contains SQL statements.
413 # CSV: The file contains CSV data.
414 "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.
415 "kind": "sql#importContext", # This is always sql#importContext.
416 "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.
417 "csvImportOptions": { # Options for importing data as CSV.
418 "table": "A String", # The table to which CSV data is imported.
419 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
420 "A String",
421 ],
422 },
423 },
424 "kind": "sql#operation", # This is always sql#instanceOperation.
425 "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.
426 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
427 "kind": "sql#exportContext", # This is always sql#exportContext.
428 "fileType": "A String", # The file type for the specified uri.
429 # SQL: The file contains SQL statements.
430 # CSV: The file contains CSV data.
431 "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.
432 "csvExportOptions": { # Options for exporting data as CSV.
433 "selectQuery": "A String", # The select query used to extract the data.
434 },
435 "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.
436 "A String",
437 ],
438 "sqlExportOptions": { # Options for exporting data as SQL statements.
439 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
440 "A String",
441 ],
442 },
443 },
444 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
445 "targetProject": "A String", # The project ID of the target instance related to this operation.
446 "targetId": "A String", # Name of the database instance related to this operation.
447 "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.
448 "targetLink": "A String", # The URI of the instance related to the operation.
449 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
450 "error": { # If errors occurred during processing of this operation, this field will be populated.
451 "errors": [ # The list of errors encountered while processing this operation.
452 { # Database instance operation error.
453 "kind": "sql#operationError", # This is always sql#operationError.
454 "code": "A String", # Identifies the specific error that occurred.
455 "message": "A String", # Additional information about the error encountered.
456 },
457 ],
458 },
459 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
460 "selfLink": "A String", # The URI of this resource.
461 "user": "A String", # The email address of the user who initiated this operation.
462 }</pre>
463</div>
464
465</body></html>