blob: 2c70e4cfdf44c13bc7c23daf6fd611a5e5db8327 [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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="sqladmin_v1beta4.html">Cloud SQL Admin API</a> . <a href="sqladmin_v1beta4.databases.html">databases</a></h1>
Craig Citroe633be12015-03-02 13:40:36 -080076<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#delete">delete(project, instance, database, x__xgafv=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070079<p class="firstline">Deletes a database from a Cloud SQL instance.</p>
Craig Citroe633be12015-03-02 13:40:36 -080080<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#get">get(project, instance, database, x__xgafv=None)</a></code></p>
82<p class="firstline">Retrieves a resource containing information about a database inside a Cloud</p>
Craig Citroe633be12015-03-02 13:40:36 -080083<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#insert">insert(project, instance, body=None, x__xgafv=None)</a></code></p>
85<p class="firstline">Inserts a resource containing information about a database inside a Cloud</p>
Craig Citroe633be12015-03-02 13:40:36 -080086<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#list">list(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080088<p class="firstline">Lists databases in the specified Cloud SQL instance.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#patch">patch(project, instance, database, body=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Partially updates a resource containing information about a database inside</p>
Craig Citroe633be12015-03-02 13:40:36 -080092<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#update">update(project, instance, database, body=None, x__xgafv=None)</a></code></p>
94<p class="firstline">Updates a resource containing information about a database inside a Cloud</p>
Craig Citroe633be12015-03-02 13:40:36 -080095<h3>Method Details</h3>
96<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070097 <code class="details" id="delete">delete(project, instance, database, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070098 <pre>Deletes a database from a Cloud SQL instance.
Craig Citroe633be12015-03-02 13:40:36 -080099
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)
Dan O'Mearadd494642020-05-01 07:42:23 -0700104 x__xgafv: string, V1 error format.
105 Allowed values
106 1 - v1 error format
107 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800108
109Returns:
110 An object of the form:
111
Dan O'Mearadd494642020-05-01 07:42:23 -0700112 { # An Operation resource.&amp;nbsp;For successful operations that return an
113 # Operation resource, only the fields relevant to the operation are populated
114 # in the resource.
115 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
116 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
117 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800118 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700119 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
120 "encryptionOptions": {
121 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
122 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
123 # write permissions to the bucket and read access to the file.
124 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
125 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
126 # write permissions to the bucket and read access to the file.
127 "pvkPassword": "A String", # Password that encrypts the private key
128 },
129 },
130 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
131 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
132 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
133 # specify a database, and is overridden by any database specification in the
134 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
135 # must be specified.
136 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
137 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
138 "uri": "A String", # Path to the import file in Cloud Storage, in the form
139 # &lt;code&gt;gs:
140 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
141 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
142 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700143 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -0800144 "csvImportOptions": { # Options for importing data as CSV.
145 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -0700146 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
147 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -0800148 "A String",
149 ],
150 },
151 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700152 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
153 "targetProject": "A String", # The project ID of the target instance related to this operation.
154 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
155 # identifier to retrieve the Operations resource that has information about
156 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -0800157 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700158 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
159 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
160 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
161 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
162 # stored. The URI is in the form &lt;code&gt;gs:
163 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
164 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
165 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
166 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -0800167 "csvExportOptions": { # Options for exporting data as CSV.
168 "selectQuery": "A String", # The select query used to extract the data.
169 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700170 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
171 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
172 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
173 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
174 # either by using this property or by using the
175 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
176 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
177 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
178 # this database must match the one specified in the
179 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -0800180 "A String",
181 ],
182 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -0700183 "tables": [ # Tables to export, or that were exported, from the specified database. If
184 # you specify tables, specify one and only one database. For PostgreSQL
185 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -0800186 "A String",
187 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700188 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700189 "masterData": 42, # Option to include SQL statement required to set up replication.
190 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
191 # a CHANGE MASTER TO statement with the binary log coordinates.
192 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
193 # a SQL comment, and has no effect.
194 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700195 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800196 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800197 },
198 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700199 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
200 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
201 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800202 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700203 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
204 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
205 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
206 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
207 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
208 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
209 "user": "A String", # The email address of the user who initiated this operation.
210 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
211 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
212 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
213 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
214 # populated.
215 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800216 "errors": [ # The list of errors encountered while processing this operation.
217 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700218 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800219 "code": "A String", # Identifies the specific error that occurred.
220 "message": "A String", # Additional information about the error encountered.
221 },
222 ],
223 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700224 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
225 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
226 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800227 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700228 "targetLink": "A String",
Craig Citroe633be12015-03-02 13:40:36 -0800229 }</pre>
230</div>
231
232<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700233 <code class="details" id="get">get(project, instance, database, x__xgafv=None)</code>
234 <pre>Retrieves a resource containing information about a database inside a Cloud
235SQL instance.
Craig Citroe633be12015-03-02 13:40:36 -0800236
237Args:
238 project: string, Project ID of the project that contains the instance. (required)
239 instance: string, Database instance ID. This does not include the project ID. (required)
240 database: string, Name of the database in the instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700241 x__xgafv: string, V1 error format.
242 Allowed values
243 1 - v1 error format
244 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800245
246Returns:
247 An object of the form:
248
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700249 { # Represents a SQL database on the Cloud SQL instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700250 "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance.
251 "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible
252 "recoveryModel": "A String", # The recovery model of a SQL Server database
253 },
254 "kind": "A String", # This is always &lt;code&gt;sql#database&lt;/code&gt;.
255 "name": "A String", # The name of the database in the Cloud SQL instance. This does not include
256 # the project ID or instance name.
Craig Citroe633be12015-03-02 13:40:36 -0800257 "charset": "A String", # The MySQL charset value.
Dan O'Mearadd494642020-05-01 07:42:23 -0700258 "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google
259 # apps domain is prefixed if applicable.
Craig Citroe633be12015-03-02 13:40:36 -0800260 "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID.
Dan O'Mearadd494642020-05-01 07:42:23 -0700261 "etag": "A String", # This field is deprecated and will be removed from a future version of the
262 # API.
Craig Citroe633be12015-03-02 13:40:36 -0800263 "collation": "A String", # The MySQL collation value.
264 "selfLink": "A String", # The URI of this resource.
265 }</pre>
266</div>
267
268<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700269 <code class="details" id="insert">insert(project, instance, body=None, x__xgafv=None)</code>
270 <pre>Inserts a resource containing information about a database inside a Cloud
271SQL instance.
Craig Citroe633be12015-03-02 13:40:36 -0800272
273Args:
274 project: string, Project ID of the project that contains the instance. (required)
275 instance: string, Database instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700276 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800277 The object takes the form of:
278
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700279{ # Represents a SQL database on the Cloud SQL instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700280 "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance.
281 "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible
282 "recoveryModel": "A String", # The recovery model of a SQL Server database
283 },
284 "kind": "A String", # This is always &lt;code&gt;sql#database&lt;/code&gt;.
285 "name": "A String", # The name of the database in the Cloud SQL instance. This does not include
286 # the project ID or instance name.
Craig Citroe633be12015-03-02 13:40:36 -0800287 "charset": "A String", # The MySQL charset value.
Dan O'Mearadd494642020-05-01 07:42:23 -0700288 "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google
289 # apps domain is prefixed if applicable.
Craig Citroe633be12015-03-02 13:40:36 -0800290 "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID.
Dan O'Mearadd494642020-05-01 07:42:23 -0700291 "etag": "A String", # This field is deprecated and will be removed from a future version of the
292 # API.
Craig Citroe633be12015-03-02 13:40:36 -0800293 "collation": "A String", # The MySQL collation value.
294 "selfLink": "A String", # The URI of this resource.
295 }
296
Dan O'Mearadd494642020-05-01 07:42:23 -0700297 x__xgafv: string, V1 error format.
298 Allowed values
299 1 - v1 error format
300 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800301
302Returns:
303 An object of the form:
304
Dan O'Mearadd494642020-05-01 07:42:23 -0700305 { # An Operation resource.&amp;nbsp;For successful operations that return an
306 # Operation resource, only the fields relevant to the operation are populated
307 # in the resource.
308 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
309 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
310 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800311 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700312 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
313 "encryptionOptions": {
314 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
315 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
316 # write permissions to the bucket and read access to the file.
317 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
318 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
319 # write permissions to the bucket and read access to the file.
320 "pvkPassword": "A String", # Password that encrypts the private key
321 },
322 },
323 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
324 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
325 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
326 # specify a database, and is overridden by any database specification in the
327 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
328 # must be specified.
329 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
330 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
331 "uri": "A String", # Path to the import file in Cloud Storage, in the form
332 # &lt;code&gt;gs:
333 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
334 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
335 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700336 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -0800337 "csvImportOptions": { # Options for importing data as CSV.
338 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -0700339 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
340 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -0800341 "A String",
342 ],
343 },
344 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700345 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
346 "targetProject": "A String", # The project ID of the target instance related to this operation.
347 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
348 # identifier to retrieve the Operations resource that has information about
349 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -0800350 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700351 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
352 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
353 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
354 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
355 # stored. The URI is in the form &lt;code&gt;gs:
356 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
357 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
358 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
359 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -0800360 "csvExportOptions": { # Options for exporting data as CSV.
361 "selectQuery": "A String", # The select query used to extract the data.
362 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700363 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
364 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
365 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
366 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
367 # either by using this property or by using the
368 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
369 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
370 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
371 # this database must match the one specified in the
372 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -0800373 "A String",
374 ],
375 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -0700376 "tables": [ # Tables to export, or that were exported, from the specified database. If
377 # you specify tables, specify one and only one database. For PostgreSQL
378 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -0800379 "A String",
380 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700381 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700382 "masterData": 42, # Option to include SQL statement required to set up replication.
383 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
384 # a CHANGE MASTER TO statement with the binary log coordinates.
385 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
386 # a SQL comment, and has no effect.
387 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700388 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800389 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800390 },
391 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700392 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
393 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
394 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800395 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700396 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
397 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
398 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
399 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
400 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
401 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
402 "user": "A String", # The email address of the user who initiated this operation.
403 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
404 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
405 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
406 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
407 # populated.
408 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800409 "errors": [ # The list of errors encountered while processing this operation.
410 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700411 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800412 "code": "A String", # Identifies the specific error that occurred.
413 "message": "A String", # Additional information about the error encountered.
414 },
415 ],
416 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700417 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
418 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
419 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800420 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700421 "targetLink": "A String",
Craig Citroe633be12015-03-02 13:40:36 -0800422 }</pre>
423</div>
424
425<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700426 <code class="details" id="list">list(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800427 <pre>Lists databases in the specified Cloud SQL instance.
428
429Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700430 project: string, Project ID of the project that contains the instance. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800431 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700432 x__xgafv: string, V1 error format.
433 Allowed values
434 1 - v1 error format
435 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800436
437Returns:
438 An object of the form:
439
440 { # Database list response.
441 "items": [ # List of database resources in the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700442 { # Represents a SQL database on the Cloud SQL instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700443 "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance.
444 "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible
445 "recoveryModel": "A String", # The recovery model of a SQL Server database
446 },
447 "kind": "A String", # This is always &lt;code&gt;sql#database&lt;/code&gt;.
448 "name": "A String", # The name of the database in the Cloud SQL instance. This does not include
449 # the project ID or instance name.
Craig Citroe633be12015-03-02 13:40:36 -0800450 "charset": "A String", # The MySQL charset value.
Dan O'Mearadd494642020-05-01 07:42:23 -0700451 "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google
452 # apps domain is prefixed if applicable.
Craig Citroe633be12015-03-02 13:40:36 -0800453 "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID.
Dan O'Mearadd494642020-05-01 07:42:23 -0700454 "etag": "A String", # This field is deprecated and will be removed from a future version of the
455 # API.
Craig Citroe633be12015-03-02 13:40:36 -0800456 "collation": "A String", # The MySQL collation value.
457 "selfLink": "A String", # The URI of this resource.
458 },
459 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700460 "kind": "A String", # This is always &lt;code&gt;sql#databasesList&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800461 }</pre>
462</div>
463
464<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700465 <code class="details" id="patch">patch(project, instance, database, body=None, x__xgafv=None)</code>
466 <pre>Partially updates a resource containing information about a database inside
467a Cloud SQL instance. This method supports patch semantics.
Craig Citroe633be12015-03-02 13:40:36 -0800468
469Args:
470 project: string, Project ID of the project that contains the instance. (required)
471 instance: string, Database instance ID. This does not include the project ID. (required)
472 database: string, Name of the database to be updated in the instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700473 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800474 The object takes the form of:
475
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700476{ # Represents a SQL database on the Cloud SQL instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700477 "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance.
478 "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible
479 "recoveryModel": "A String", # The recovery model of a SQL Server database
480 },
481 "kind": "A String", # This is always &lt;code&gt;sql#database&lt;/code&gt;.
482 "name": "A String", # The name of the database in the Cloud SQL instance. This does not include
483 # the project ID or instance name.
Craig Citroe633be12015-03-02 13:40:36 -0800484 "charset": "A String", # The MySQL charset value.
Dan O'Mearadd494642020-05-01 07:42:23 -0700485 "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google
486 # apps domain is prefixed if applicable.
Craig Citroe633be12015-03-02 13:40:36 -0800487 "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID.
Dan O'Mearadd494642020-05-01 07:42:23 -0700488 "etag": "A String", # This field is deprecated and will be removed from a future version of the
489 # API.
Craig Citroe633be12015-03-02 13:40:36 -0800490 "collation": "A String", # The MySQL collation value.
491 "selfLink": "A String", # The URI of this resource.
492 }
493
Dan O'Mearadd494642020-05-01 07:42:23 -0700494 x__xgafv: string, V1 error format.
495 Allowed values
496 1 - v1 error format
497 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800498
499Returns:
500 An object of the form:
501
Dan O'Mearadd494642020-05-01 07:42:23 -0700502 { # An Operation resource.&amp;nbsp;For successful operations that return an
503 # Operation resource, only the fields relevant to the operation are populated
504 # in the resource.
505 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
506 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
507 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800508 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700509 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
510 "encryptionOptions": {
511 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
512 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
513 # write permissions to the bucket and read access to the file.
514 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
515 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
516 # write permissions to the bucket and read access to the file.
517 "pvkPassword": "A String", # Password that encrypts the private key
518 },
519 },
520 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
521 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
522 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
523 # specify a database, and is overridden by any database specification in the
524 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
525 # must be specified.
526 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
527 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
528 "uri": "A String", # Path to the import file in Cloud Storage, in the form
529 # &lt;code&gt;gs:
530 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
531 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
532 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700533 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -0800534 "csvImportOptions": { # Options for importing data as CSV.
535 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -0700536 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
537 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -0800538 "A String",
539 ],
540 },
541 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700542 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
543 "targetProject": "A String", # The project ID of the target instance related to this operation.
544 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
545 # identifier to retrieve the Operations resource that has information about
546 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -0800547 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700548 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
549 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
550 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
551 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
552 # stored. The URI is in the form &lt;code&gt;gs:
553 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
554 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
555 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
556 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -0800557 "csvExportOptions": { # Options for exporting data as CSV.
558 "selectQuery": "A String", # The select query used to extract the data.
559 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700560 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
561 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
562 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
563 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
564 # either by using this property or by using the
565 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
566 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
567 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
568 # this database must match the one specified in the
569 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -0800570 "A String",
571 ],
572 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -0700573 "tables": [ # Tables to export, or that were exported, from the specified database. If
574 # you specify tables, specify one and only one database. For PostgreSQL
575 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -0800576 "A String",
577 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700578 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700579 "masterData": 42, # Option to include SQL statement required to set up replication.
580 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
581 # a CHANGE MASTER TO statement with the binary log coordinates.
582 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
583 # a SQL comment, and has no effect.
584 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700585 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800586 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800587 },
588 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700589 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
590 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
591 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800592 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700593 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
594 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
595 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
596 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
597 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
598 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
599 "user": "A String", # The email address of the user who initiated this operation.
600 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
601 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
602 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
603 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
604 # populated.
605 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800606 "errors": [ # The list of errors encountered while processing this operation.
607 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700608 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800609 "code": "A String", # Identifies the specific error that occurred.
610 "message": "A String", # Additional information about the error encountered.
611 },
612 ],
613 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700614 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
615 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
616 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800617 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700618 "targetLink": "A String",
Craig Citroe633be12015-03-02 13:40:36 -0800619 }</pre>
620</div>
621
622<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700623 <code class="details" id="update">update(project, instance, database, body=None, x__xgafv=None)</code>
624 <pre>Updates a resource containing information about a database inside a Cloud
625SQL instance.
Craig Citroe633be12015-03-02 13:40:36 -0800626
627Args:
628 project: string, Project ID of the project that contains the instance. (required)
629 instance: string, Database instance ID. This does not include the project ID. (required)
630 database: string, Name of the database to be updated in the instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700631 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800632 The object takes the form of:
633
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700634{ # Represents a SQL database on the Cloud SQL instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700635 "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance.
636 "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible
637 "recoveryModel": "A String", # The recovery model of a SQL Server database
638 },
639 "kind": "A String", # This is always &lt;code&gt;sql#database&lt;/code&gt;.
640 "name": "A String", # The name of the database in the Cloud SQL instance. This does not include
641 # the project ID or instance name.
Craig Citroe633be12015-03-02 13:40:36 -0800642 "charset": "A String", # The MySQL charset value.
Dan O'Mearadd494642020-05-01 07:42:23 -0700643 "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google
644 # apps domain is prefixed if applicable.
Craig Citroe633be12015-03-02 13:40:36 -0800645 "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID.
Dan O'Mearadd494642020-05-01 07:42:23 -0700646 "etag": "A String", # This field is deprecated and will be removed from a future version of the
647 # API.
Craig Citroe633be12015-03-02 13:40:36 -0800648 "collation": "A String", # The MySQL collation value.
649 "selfLink": "A String", # The URI of this resource.
650 }
651
Dan O'Mearadd494642020-05-01 07:42:23 -0700652 x__xgafv: string, V1 error format.
653 Allowed values
654 1 - v1 error format
655 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800656
657Returns:
658 An object of the form:
659
Dan O'Mearadd494642020-05-01 07:42:23 -0700660 { # An Operation resource.&amp;nbsp;For successful operations that return an
661 # Operation resource, only the fields relevant to the operation are populated
662 # in the resource.
663 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
664 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
665 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800666 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700667 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
668 "encryptionOptions": {
669 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
670 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
671 # write permissions to the bucket and read access to the file.
672 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
673 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
674 # write permissions to the bucket and read access to the file.
675 "pvkPassword": "A String", # Password that encrypts the private key
676 },
677 },
678 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
679 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
680 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
681 # specify a database, and is overridden by any database specification in the
682 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
683 # must be specified.
684 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
685 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
686 "uri": "A String", # Path to the import file in Cloud Storage, in the form
687 # &lt;code&gt;gs:
688 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
689 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
690 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700691 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -0800692 "csvImportOptions": { # Options for importing data as CSV.
693 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -0700694 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
695 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -0800696 "A String",
697 ],
698 },
699 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700700 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
701 "targetProject": "A String", # The project ID of the target instance related to this operation.
702 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
703 # identifier to retrieve the Operations resource that has information about
704 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -0800705 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700706 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
707 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
708 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
709 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
710 # stored. The URI is in the form &lt;code&gt;gs:
711 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
712 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
713 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
714 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -0800715 "csvExportOptions": { # Options for exporting data as CSV.
716 "selectQuery": "A String", # The select query used to extract the data.
717 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700718 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
719 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
720 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
721 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
722 # either by using this property or by using the
723 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
724 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
725 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
726 # this database must match the one specified in the
727 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -0800728 "A String",
729 ],
730 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -0700731 "tables": [ # Tables to export, or that were exported, from the specified database. If
732 # you specify tables, specify one and only one database. For PostgreSQL
733 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -0800734 "A String",
735 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700736 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700737 "masterData": 42, # Option to include SQL statement required to set up replication.
738 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
739 # a CHANGE MASTER TO statement with the binary log coordinates.
740 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
741 # a SQL comment, and has no effect.
742 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700743 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800744 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800745 },
746 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700747 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
748 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
749 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800750 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700751 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
752 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
753 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
754 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
755 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
756 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
757 "user": "A String", # The email address of the user who initiated this operation.
758 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
759 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
760 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
761 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
762 # populated.
763 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800764 "errors": [ # The list of errors encountered while processing this operation.
765 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700766 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800767 "code": "A String", # Identifies the specific error that occurred.
768 "message": "A String", # Additional information about the error encountered.
769 },
770 ],
771 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700772 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
773 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
774 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800775 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700776 "targetLink": "A String",
Craig Citroe633be12015-03-02 13:40:36 -0800777 }</pre>
778</div>
779
780</body></html>