Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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 | |
| 91 | Args: |
| 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 | |
| 99 | Returns: |
| 100 | An object of the form: |
| 101 | |
| 102 | { # An Operation resource.&nbsp;For successful operations that return an |
| 103 | # Operation resource, only the fields relevant to the operation are populated |
| 104 | # in the resource. |
| 105 | "user": "A String", # The email address of the user who initiated this operation. |
| 106 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 107 | "selfLink": "A String", # The URI of this resource. |
| 108 | "targetLink": "A String", |
| 109 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 110 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 111 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 112 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 113 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 114 | # <code>DELETE_DATABASE</code> . |
| 115 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 116 | # populated. |
| 117 | "errors": [ # The list of errors encountered while processing this operation. |
| 118 | { # Database instance operation error. |
| 119 | "code": "A String", # Identifies the specific error that occurred. |
| 120 | "message": "A String", # Additional information about the error encountered. |
| 121 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 122 | }, |
| 123 | ], |
| 124 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 125 | }, |
| 126 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 127 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 128 | "csvImportOptions": { # Options for importing data as CSV. |
| 129 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 130 | # of the database table are loaded with CSV data. |
| 131 | "A String", |
| 132 | ], |
| 133 | "table": "A String", # The table to which CSV data is imported. |
| 134 | }, |
| 135 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 136 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 137 | # <code>SQL</code>, 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 <code>fileType</code> is <code>CSV</code>, one database |
| 140 | # must be specified. |
| 141 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 142 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 143 | "encryptionOptions": { |
| 144 | "pvkPassword": "A String", # Password that encrypts the private key |
| 145 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 146 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 147 | # write permissions to the bucket and read access to the file. |
| 148 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 149 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 150 | # write permissions to the bucket and read access to the file. |
| 151 | }, |
| 152 | }, |
| 153 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 154 | # <code>gs: |
| 155 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 156 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 157 | # // write permissions to the bucket and read access to the file. |
| 158 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 159 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 160 | }, |
| 161 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 162 | # <code>RUNNING</code>, <code>DONE</code>, |
| 163 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 164 | "name": "A String", # 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 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 168 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 169 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 170 | # databases are exported, except for the <code>mysql</code> system database. |
| 171 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 172 | # either by using this property or by using the |
| 173 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 174 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 175 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 176 | # this database must match the one specified in the |
| 177 | # <code>csvExportOptions.selectQuery</code> property. |
| 178 | "A String", |
| 179 | ], |
| 180 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 181 | "tables": [ # 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 | "A String", |
| 185 | ], |
| 186 | "schemaOnly": True or False, # Export only schemas. |
| 187 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 188 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 189 | # If set to <code>1</code>, the dump file includes |
| 190 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 191 | # If set to <code>2</code>, 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 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 197 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 198 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 199 | # stored. The URI is in the form <code>gs: |
| 200 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 201 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 202 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 203 | # // compressed. |
| 204 | "csvExportOptions": { # Options for exporting data as CSV. |
| 205 | "selectQuery": "A String", # The select query used to extract the data. |
| 206 | }, |
| 207 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 208 | }, |
| 209 | "targetId": "A String", # Name of the database instance related to this operation. |
| 210 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 211 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 212 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 213 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 214 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 215 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 216 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 217 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 218 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 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 |
| 225 | SQL instance in the reverse chronological order of the start time. |
| 226 | |
| 227 | Args: |
| 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 |
| 231 | results 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 | |
| 238 | Returns: |
| 239 | An object of the form: |
| 240 | |
| 241 | { # Database instance list operations response. |
| 242 | "items": [ # List of operation resources. |
| 243 | { # An Operation resource.&nbsp;For successful operations that return an |
| 244 | # Operation resource, only the fields relevant to the operation are populated |
| 245 | # in the resource. |
| 246 | "user": "A String", # The email address of the user who initiated this operation. |
| 247 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 248 | "selfLink": "A String", # The URI of this resource. |
| 249 | "targetLink": "A String", |
| 250 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 251 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 252 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 253 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 254 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 255 | # <code>DELETE_DATABASE</code> . |
| 256 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 257 | # populated. |
| 258 | "errors": [ # The list of errors encountered while processing this operation. |
| 259 | { # Database instance operation error. |
| 260 | "code": "A String", # Identifies the specific error that occurred. |
| 261 | "message": "A String", # Additional information about the error encountered. |
| 262 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 263 | }, |
| 264 | ], |
| 265 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 266 | }, |
| 267 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 268 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 269 | "csvImportOptions": { # Options for importing data as CSV. |
| 270 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 271 | # of the database table are loaded with CSV data. |
| 272 | "A String", |
| 273 | ], |
| 274 | "table": "A String", # The table to which CSV data is imported. |
| 275 | }, |
| 276 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 277 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 278 | # <code>SQL</code>, 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 <code>fileType</code> is <code>CSV</code>, one database |
| 281 | # must be specified. |
| 282 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 283 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 284 | "encryptionOptions": { |
| 285 | "pvkPassword": "A String", # Password that encrypts the private key |
| 286 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 287 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 288 | # write permissions to the bucket and read access to the file. |
| 289 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 290 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 291 | # write permissions to the bucket and read access to the file. |
| 292 | }, |
| 293 | }, |
| 294 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 295 | # <code>gs: |
| 296 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 297 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 298 | # // write permissions to the bucket and read access to the file. |
| 299 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 300 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 301 | }, |
| 302 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 303 | # <code>RUNNING</code>, <code>DONE</code>, |
| 304 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 305 | "name": "A String", # 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 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 309 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 310 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 311 | # databases are exported, except for the <code>mysql</code> system database. |
| 312 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 313 | # either by using this property or by using the |
| 314 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 315 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 316 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 317 | # this database must match the one specified in the |
| 318 | # <code>csvExportOptions.selectQuery</code> property. |
| 319 | "A String", |
| 320 | ], |
| 321 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 322 | "tables": [ # 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 | "A String", |
| 326 | ], |
| 327 | "schemaOnly": True or False, # Export only schemas. |
| 328 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 329 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 330 | # If set to <code>1</code>, the dump file includes |
| 331 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 332 | # If set to <code>2</code>, 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 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 338 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 339 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 340 | # stored. The URI is in the form <code>gs: |
| 341 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 342 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 343 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 344 | # // compressed. |
| 345 | "csvExportOptions": { # Options for exporting data as CSV. |
| 346 | "selectQuery": "A String", # The select query used to extract the data. |
| 347 | }, |
| 348 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 349 | }, |
| 350 | "targetId": "A String", # Name of the database instance related to this operation. |
| 351 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 352 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 353 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 354 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 355 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 356 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 357 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 358 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 359 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 360 | }, |
| 361 | ], |
| 362 | "nextPageToken": "A String", # 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 | "kind": "A String", # This is always <code>sql#operationsList</code>. |
| 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 | |
| 372 | Args: |
| 373 | previous_request: The request for the previous page. (required) |
| 374 | previous_response: The response from the request for the previous page. (required) |
| 375 | |
| 376 | Returns: |
| 377 | A request object that you can call 'execute()' 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> |