blob: f94e378c0c027dbad48f961315b3930019254ef2 [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.operations.html">operations</a></h1>
Craig Citroe633be12015-03-02 13:40:36 -080076<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#get">get(project, operation)</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, maxResults=None, pageToken=None)</a></code></p>
82<p class="firstline">Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time.</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)</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
95Returns:
96 An object of the form:
97
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Craig Citroe633be12015-03-02 13:40:36 -080099 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
100 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400101 "kind": "sql#importContext", # This is always sql#importContext.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700102 "database": "A String", # The target database for the import. If fileType is SQL, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If fileType is CSV, one database must be specified.
Craig Citroe633be12015-03-02 13:40:36 -0800103 "fileType": "A String", # The file type for the specified uri.
104 # SQL: The file contains SQL statements.
105 # CSV: The file contains CSV data.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106 "uri": "A String", # Path to the import file in Cloud Storage, in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL. The instance must have write permissions to the bucket and read access to the file.
107 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -0800108 "csvImportOptions": { # Options for importing data as CSV.
109 "table": "A String", # The table to which CSV data is imported.
110 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
111 "A String",
112 ],
113 },
114 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000115 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800116 "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.
117 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
118 "kind": "sql#exportContext", # This is always sql#exportContext.
119 "fileType": "A String", # The file type for the specified uri.
120 # SQL: The file contains SQL statements.
121 # CSV: The file contains CSV data.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700122 "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 requests succeeds, but the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
Craig Citroe633be12015-03-02 13:40:36 -0800123 "csvExportOptions": { # Options for exporting data as CSV.
124 "selectQuery": "A String", # The select query used to extract the data.
125 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700126 "databases": [ # Databases to be exported.
127 # MySQL instances: If fileType is SQL and no database is specified, all databases are exported, except for the mysql system database. If fileType is CSV, you can specify one database, either by using this property or by using the csvExportOptions.selectQuery property, which takes precedence over this property.
128 # PostgreSQL instances: Specify exactly one database to be exported. If fileType is CSV, this database must match the database used in the csvExportOptions.selectQuery property.
Craig Citroe633be12015-03-02 13:40:36 -0800129 "A String",
130 ],
131 "sqlExportOptions": { # Options for exporting data as SQL statements.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700132 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -0800133 "A String",
134 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700135 "mysqlExportOptions": { # Options for exporting from MySQL.
136 "masterData": 42, # Option to include SQL statement required to set up replication. If set to 1, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to 2, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
137 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800138 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800139 },
140 },
141 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
142 "targetProject": "A String", # The project ID of the target instance related to this operation.
143 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000144 "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400145 "targetLink": "A String",
Craig Citroe633be12015-03-02 13:40:36 -0800146 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000147 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
148 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800149 "errors": [ # The list of errors encountered while processing this operation.
150 { # Database instance operation error.
151 "kind": "sql#operationError", # This is always sql#operationError.
152 "code": "A String", # Identifies the specific error that occurred.
153 "message": "A String", # Additional information about the error encountered.
154 },
155 ],
156 },
157 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
158 "selfLink": "A String", # The URI of this resource.
159 "user": "A String", # The email address of the user who initiated this operation.
160 }</pre>
161</div>
162
163<div class="method">
164 <code class="details" id="list">list(project, instance, maxResults=None, pageToken=None)</code>
165 <pre>Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time.
166
167Args:
168 project: string, Project ID of the project that contains the instance. (required)
169 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
170 maxResults: integer, Maximum number of operations per response.
171 pageToken: string, A previously-returned page token representing part of the larger set of results to view.
172
173Returns:
174 An object of the form:
175
176 { # Database instance list operations response.
177 "nextPageToken": "A String", # The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
178 "items": [ # List of operation resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700179 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Craig Citroe633be12015-03-02 13:40:36 -0800180 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
181 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400182 "kind": "sql#importContext", # This is always sql#importContext.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700183 "database": "A String", # The target database for the import. If fileType is SQL, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If fileType is CSV, one database must be specified.
Craig Citroe633be12015-03-02 13:40:36 -0800184 "fileType": "A String", # The file type for the specified uri.
185 # SQL: The file contains SQL statements.
186 # CSV: The file contains CSV data.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700187 "uri": "A String", # Path to the import file in Cloud Storage, in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL. The instance must have write permissions to the bucket and read access to the file.
188 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -0800189 "csvImportOptions": { # Options for importing data as CSV.
190 "table": "A String", # The table to which CSV data is imported.
191 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
192 "A String",
193 ],
194 },
195 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000196 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800197 "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.
198 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
199 "kind": "sql#exportContext", # This is always sql#exportContext.
200 "fileType": "A String", # The file type for the specified uri.
201 # SQL: The file contains SQL statements.
202 # CSV: The file contains CSV data.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700203 "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 requests succeeds, but the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
Craig Citroe633be12015-03-02 13:40:36 -0800204 "csvExportOptions": { # Options for exporting data as CSV.
205 "selectQuery": "A String", # The select query used to extract the data.
206 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700207 "databases": [ # Databases to be exported.
208 # MySQL instances: If fileType is SQL and no database is specified, all databases are exported, except for the mysql system database. If fileType is CSV, you can specify one database, either by using this property or by using the csvExportOptions.selectQuery property, which takes precedence over this property.
209 # PostgreSQL instances: Specify exactly one database to be exported. If fileType is CSV, this database must match the database used in the csvExportOptions.selectQuery property.
Craig Citroe633be12015-03-02 13:40:36 -0800210 "A String",
211 ],
212 "sqlExportOptions": { # Options for exporting data as SQL statements.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700213 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -0800214 "A String",
215 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700216 "mysqlExportOptions": { # Options for exporting from MySQL.
217 "masterData": 42, # Option to include SQL statement required to set up replication. If set to 1, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to 2, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
218 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800219 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800220 },
221 },
222 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
223 "targetProject": "A String", # The project ID of the target instance related to this operation.
224 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000225 "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400226 "targetLink": "A String",
Craig Citroe633be12015-03-02 13:40:36 -0800227 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000228 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
229 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800230 "errors": [ # The list of errors encountered while processing this operation.
231 { # Database instance operation error.
232 "kind": "sql#operationError", # This is always sql#operationError.
233 "code": "A String", # Identifies the specific error that occurred.
234 "message": "A String", # Additional information about the error encountered.
235 },
236 ],
237 },
238 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
239 "selfLink": "A String", # The URI of this resource.
240 "user": "A String", # The email address of the user who initiated this operation.
241 },
242 ],
243 "kind": "sql#operationsList", # This is always sql#operationsList.
244 }</pre>
245</div>
246
247<div class="method">
248 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
249 <pre>Retrieves the next page of results.
250
251Args:
252 previous_request: The request for the previous page. (required)
253 previous_response: The response from the request for the previous page. (required)
254
255Returns:
256 A request object that you can call 'execute()' on to request the next
257 page. Returns None if there are no more items in the collection.
258 </pre>
259</div>
260
261</body></html>