blob: 0637c55b524bd18f3a429a0148939bd8a25009be [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -07001<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="sql_v1beta4.html">Cloud SQL Admin API</a> . <a href="sql_v1beta4.operations.html">operations</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#get">get(project, operation, x__xgafv=None)</a></code></p>
79<p class="firstline">Retrieves an instance operation that has been performed on an instance.</p>
80<p class="toc_element">
81 <code><a href="#list">list(project, instance=None, pageToken=None, maxResults=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Lists all instance operations that have been performed on the given Cloud</p>
83<p class="toc_element">
84 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<h3>Method Details</h3>
87<div class="method">
88 <code class="details" id="get">get(project, operation, x__xgafv=None)</code>
89 <pre>Retrieves an instance operation that has been performed on an instance.
90
91Args:
92 project: string, Project ID of the project that contains the instance. (required)
93 operation: string, Instance operation ID. (required)
94 x__xgafv: string, V1 error format.
95 Allowed values
96 1 - v1 error format
97 2 - v2 error format
98
99Returns:
100 An object of the form:
101
102 { # An Operation resource.&amp;nbsp;For successful operations that return an
103 # Operation resource, only the fields relevant to the operation are populated
104 # in the resource.
105 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
106 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
107 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
108 &quot;targetLink&quot;: &quot;A String&quot;,
109 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
110 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
111 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
112 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
113 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
114 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
115 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
116 # populated.
117 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
118 { # Database instance operation error.
119 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
120 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
121 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
122 },
123 ],
124 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
125 },
126 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
127 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
128 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
129 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
130 # of the database table are loaded with CSV data.
131 &quot;A String&quot;,
132 ],
133 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
134 },
135 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
136 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
137 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
138 # specify a database, and is overridden by any database specification in the
139 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
140 # must be specified.
141 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
142 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
143 &quot;encryptionOptions&quot;: {
144 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
145 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
146 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
147 # write permissions to the bucket and read access to the file.
148 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
149 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
150 # write permissions to the bucket and read access to the file.
151 },
152 },
153 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
154 # &lt;code&gt;gs:
155 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
156 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
157 # // write permissions to the bucket and read access to the file.
158 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
159 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
160 },
161 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
162 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
163 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
164 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
165 # identifier to retrieve the Operations resource that has information about
166 # the operation.
167 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
168 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
169 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
170 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
171 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
172 # either by using this property or by using the
173 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
174 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
175 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
176 # this database must match the one specified in the
177 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
178 &quot;A String&quot;,
179 ],
180 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
181 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
182 # you specify tables, specify one and only one database. For PostgreSQL
183 # instances, you can specify only one table.
184 &quot;A String&quot;,
185 ],
186 &quot;schemaOnly&quot;: True or False, # Export only schemas.
187 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
188 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
189 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
190 # a CHANGE MASTER TO statement with the binary log coordinates.
191 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
192 # a SQL comment, and has no effect.
193 # All other values are ignored.
194 },
195 },
196 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
197 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
198 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
199 # stored. The URI is in the form &lt;code&gt;gs:
200 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
201 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
202 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
203 # // compressed.
204 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
205 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
206 },
207 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
208 },
209 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
210 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
211 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
212 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
213 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
214 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
215 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
216 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
217 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
218 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
219 }</pre>
220</div>
221
222<div class="method">
223 <code class="details" id="list">list(project, instance=None, pageToken=None, maxResults=None, x__xgafv=None)</code>
224 <pre>Lists all instance operations that have been performed on the given Cloud
225SQL instance in the reverse chronological order of the start time.
226
227Args:
228 project: string, Project ID of the project that contains the instance. (required)
229 instance: string, Cloud SQL instance ID. This does not include the project ID.
230 pageToken: string, A previously-returned page token representing part of the larger set of
231results to view.
232 maxResults: integer, Maximum number of operations per response.
233 x__xgafv: string, V1 error format.
234 Allowed values
235 1 - v1 error format
236 2 - v2 error format
237
238Returns:
239 An object of the form:
240
241 { # Database instance list operations response.
242 &quot;items&quot;: [ # List of operation resources.
243 { # An Operation resource.&amp;nbsp;For successful operations that return an
244 # Operation resource, only the fields relevant to the operation are populated
245 # in the resource.
246 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
247 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
248 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
249 &quot;targetLink&quot;: &quot;A String&quot;,
250 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
251 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
252 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
253 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
254 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
255 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
256 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
257 # populated.
258 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
259 { # Database instance operation error.
260 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
261 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
262 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
263 },
264 ],
265 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
266 },
267 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
268 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
269 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
270 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
271 # of the database table are loaded with CSV data.
272 &quot;A String&quot;,
273 ],
274 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
275 },
276 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
277 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
278 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
279 # specify a database, and is overridden by any database specification in the
280 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
281 # must be specified.
282 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
283 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
284 &quot;encryptionOptions&quot;: {
285 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
286 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
287 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
288 # write permissions to the bucket and read access to the file.
289 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
290 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
291 # write permissions to the bucket and read access to the file.
292 },
293 },
294 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
295 # &lt;code&gt;gs:
296 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
297 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
298 # // write permissions to the bucket and read access to the file.
299 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
300 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
301 },
302 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
303 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
304 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
305 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
306 # identifier to retrieve the Operations resource that has information about
307 # the operation.
308 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
309 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
310 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
311 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
312 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
313 # either by using this property or by using the
314 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
315 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
316 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
317 # this database must match the one specified in the
318 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
319 &quot;A String&quot;,
320 ],
321 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
322 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
323 # you specify tables, specify one and only one database. For PostgreSQL
324 # instances, you can specify only one table.
325 &quot;A String&quot;,
326 ],
327 &quot;schemaOnly&quot;: True or False, # Export only schemas.
328 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
329 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
330 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
331 # a CHANGE MASTER TO statement with the binary log coordinates.
332 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
333 # a SQL comment, and has no effect.
334 # All other values are ignored.
335 },
336 },
337 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
338 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
339 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
340 # stored. The URI is in the form &lt;code&gt;gs:
341 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
342 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
343 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
344 # // compressed.
345 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
346 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
347 },
348 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
349 },
350 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
351 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
352 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
353 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
354 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
355 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
356 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
357 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
358 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
359 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
360 },
361 ],
362 &quot;nextPageToken&quot;: &quot;A String&quot;, # The continuation token, used to page through large result sets. Provide
363 # this value in a subsequent request to return the next page of results.
364 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationsList&lt;/code&gt;.
365 }</pre>
366</div>
367
368<div class="method">
369 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
370 <pre>Retrieves the next page of results.
371
372Args:
373 previous_request: The request for the previous page. (required)
374 previous_response: The response from the request for the previous page. (required)
375
376Returns:
377 A request object that you can call &#x27;execute()&#x27; on to request the next
378 page. Returns None if there are no more items in the collection.
379 </pre>
380</div>
381
382</body></html>