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.databases.html">databases</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#delete">delete(project, instance, database, x__xgafv=None)</a></code></p> |
| 79 | <p class="firstline">Deletes a database from a Cloud SQL instance.</p> |
| 80 | <p class="toc_element"> |
| 81 | <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> |
| 83 | <p class="toc_element"> |
| 84 | <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> |
| 86 | <p class="toc_element"> |
| 87 | <code><a href="#list">list(project, instance, x__xgafv=None)</a></code></p> |
| 88 | <p class="firstline">Lists databases in the specified Cloud SQL instance.</p> |
| 89 | <p class="toc_element"> |
| 90 | <code><a href="#patch">patch(project, instance, database, body=None, x__xgafv=None)</a></code></p> |
| 91 | <p class="firstline">Partially updates a resource containing information about a database inside</p> |
| 92 | <p class="toc_element"> |
| 93 | <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> |
| 95 | <h3>Method Details</h3> |
| 96 | <div class="method"> |
| 97 | <code class="details" id="delete">delete(project, instance, database, x__xgafv=None)</code> |
| 98 | <pre>Deletes a database from a Cloud SQL instance. |
| 99 | |
| 100 | Args: |
| 101 | project: string, Project ID of the project that contains the instance. (required) |
| 102 | instance: string, Database instance ID. This does not include the project ID. (required) |
| 103 | database: string, Name of the database to be deleted in the instance. (required) |
| 104 | x__xgafv: string, V1 error format. |
| 105 | Allowed values |
| 106 | 1 - v1 error format |
| 107 | 2 - v2 error format |
| 108 | |
| 109 | Returns: |
| 110 | An object of the form: |
| 111 | |
| 112 | { # An Operation resource.&nbsp;For successful operations that return an |
| 113 | # Operation resource, only the fields relevant to the operation are populated |
| 114 | # in the resource. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 115 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 116 | # identifier to retrieve the Operations resource that has information about |
| 117 | # the operation. |
| 118 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 119 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 120 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 121 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 122 | # databases are exported, except for the <code>mysql</code> system database. |
| 123 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 124 | # either by using this property or by using the |
| 125 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 126 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 127 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 128 | # this database must match the one specified in the |
| 129 | # <code>csvExportOptions.selectQuery</code> property. |
| 130 | "A String", |
| 131 | ], |
| 132 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 133 | "schemaOnly": True or False, # Export only schemas. |
| 134 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 135 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 136 | # If set to <code>1</code>, the dump file includes |
| 137 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 138 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 139 | # a SQL comment, and has no effect. |
| 140 | # All other values are ignored. |
| 141 | }, |
| 142 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 143 | # you specify tables, specify one and only one database. For PostgreSQL |
| 144 | # instances, you can specify only one table. |
| 145 | "A String", |
| 146 | ], |
| 147 | }, |
| 148 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 149 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 150 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 151 | # stored. The URI is in the form <code>gs: |
| 152 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 153 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 154 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 155 | # // compressed. |
| 156 | "csvExportOptions": { # Options for exporting data as CSV. |
| 157 | "selectQuery": "A String", # The select query used to extract the data. |
| 158 | }, |
| 159 | }, |
| 160 | "targetId": "A String", # Name of the database instance related to this operation. |
| 161 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 162 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 163 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 164 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 165 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 166 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 167 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 168 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 169 | # <code>2012-11-15T16:19:00.094Z</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 170 | "user": "A String", # The email address of the user who initiated this operation. |
| 171 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 172 | "selfLink": "A String", # The URI of this resource. |
| 173 | "targetLink": "A String", |
| 174 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 175 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 176 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 177 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 178 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 179 | # <code>DELETE_DATABASE</code> . |
| 180 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 181 | # populated. |
| 182 | "errors": [ # The list of errors encountered while processing this operation. |
| 183 | { # Database instance operation error. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 184 | "kind": "A String", # This is always <code>sql#operationError</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 185 | "code": "A String", # Identifies the specific error that occurred. |
| 186 | "message": "A String", # Additional information about the error encountered. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 187 | }, |
| 188 | ], |
| 189 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 190 | }, |
| 191 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 192 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 193 | "kind": "A String", # This is always <code>sql#importContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 194 | "csvImportOptions": { # Options for importing data as CSV. |
| 195 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 196 | # of the database table are loaded with CSV data. |
| 197 | "A String", |
| 198 | ], |
| 199 | "table": "A String", # The table to which CSV data is imported. |
| 200 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 201 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 202 | # <code>SQL</code>, this field is required only if the import file does not |
| 203 | # specify a database, and is overridden by any database specification in the |
| 204 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 205 | # must be specified. |
| 206 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 207 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 208 | "encryptionOptions": { |
| 209 | "pvkPassword": "A String", # Password that encrypts the private key |
| 210 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 211 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 212 | # write permissions to the bucket and read access to the file. |
| 213 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 214 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 215 | # write permissions to the bucket and read access to the file. |
| 216 | }, |
| 217 | }, |
| 218 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 219 | # <code>gs: |
| 220 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 221 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 222 | # // write permissions to the bucket and read access to the file. |
| 223 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 224 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 225 | }, |
| 226 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 227 | # <code>RUNNING</code>, <code>DONE</code>, |
| 228 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 229 | }</pre> |
| 230 | </div> |
| 231 | |
| 232 | <div class="method"> |
| 233 | <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 |
| 235 | SQL instance. |
| 236 | |
| 237 | Args: |
| 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) |
| 241 | x__xgafv: string, V1 error format. |
| 242 | Allowed values |
| 243 | 1 - v1 error format |
| 244 | 2 - v2 error format |
| 245 | |
| 246 | Returns: |
| 247 | An object of the form: |
| 248 | |
| 249 | { # Represents a SQL database on the Cloud SQL instance. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 250 | "collation": "A String", # The MySQL collation value. |
| 251 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include |
| 252 | # the project ID or instance name. |
| 253 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 254 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google |
| 255 | # apps domain is prefixed if applicable. |
| 256 | "selfLink": "A String", # The URI of this resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 257 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 258 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 259 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 260 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 261 | "kind": "A String", # This is always <code>sql#database</code>. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 262 | "charset": "A String", # The MySQL charset value. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 263 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 264 | # API. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 265 | }</pre> |
| 266 | </div> |
| 267 | |
| 268 | <div class="method"> |
| 269 | <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 |
| 271 | SQL instance. |
| 272 | |
| 273 | Args: |
| 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) |
| 276 | body: object, The request body. |
| 277 | The object takes the form of: |
| 278 | |
| 279 | { # Represents a SQL database on the Cloud SQL instance. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 280 | "collation": "A String", # The MySQL collation value. |
| 281 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include |
| 282 | # the project ID or instance name. |
| 283 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 284 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google |
| 285 | # apps domain is prefixed if applicable. |
| 286 | "selfLink": "A String", # The URI of this resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 287 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 288 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 289 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 290 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 291 | "kind": "A String", # This is always <code>sql#database</code>. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 292 | "charset": "A String", # The MySQL charset value. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 293 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 294 | # API. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 295 | } |
| 296 | |
| 297 | x__xgafv: string, V1 error format. |
| 298 | Allowed values |
| 299 | 1 - v1 error format |
| 300 | 2 - v2 error format |
| 301 | |
| 302 | Returns: |
| 303 | An object of the form: |
| 304 | |
| 305 | { # An Operation resource.&nbsp;For successful operations that return an |
| 306 | # Operation resource, only the fields relevant to the operation are populated |
| 307 | # in the resource. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 308 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 309 | # identifier to retrieve the Operations resource that has information about |
| 310 | # the operation. |
| 311 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 312 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 313 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 314 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 315 | # databases are exported, except for the <code>mysql</code> system database. |
| 316 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 317 | # either by using this property or by using the |
| 318 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 319 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 320 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 321 | # this database must match the one specified in the |
| 322 | # <code>csvExportOptions.selectQuery</code> property. |
| 323 | "A String", |
| 324 | ], |
| 325 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 326 | "schemaOnly": True or False, # Export only schemas. |
| 327 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 328 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 329 | # If set to <code>1</code>, the dump file includes |
| 330 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 331 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 332 | # a SQL comment, and has no effect. |
| 333 | # All other values are ignored. |
| 334 | }, |
| 335 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 336 | # you specify tables, specify one and only one database. For PostgreSQL |
| 337 | # instances, you can specify only one table. |
| 338 | "A String", |
| 339 | ], |
| 340 | }, |
| 341 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 342 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 343 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 344 | # stored. The URI is in the form <code>gs: |
| 345 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 346 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 347 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 348 | # // compressed. |
| 349 | "csvExportOptions": { # Options for exporting data as CSV. |
| 350 | "selectQuery": "A String", # The select query used to extract the data. |
| 351 | }, |
| 352 | }, |
| 353 | "targetId": "A String", # Name of the database instance related to this operation. |
| 354 | "endTime": "A String", # The time this operation finished 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 | "startTime": "A String", # The time this operation actually started 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 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 361 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 362 | # <code>2012-11-15T16:19:00.094Z</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 363 | "user": "A String", # The email address of the user who initiated this operation. |
| 364 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 365 | "selfLink": "A String", # The URI of this resource. |
| 366 | "targetLink": "A String", |
| 367 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 368 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 369 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 370 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 371 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 372 | # <code>DELETE_DATABASE</code> . |
| 373 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 374 | # populated. |
| 375 | "errors": [ # The list of errors encountered while processing this operation. |
| 376 | { # Database instance operation error. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 377 | "kind": "A String", # This is always <code>sql#operationError</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 378 | "code": "A String", # Identifies the specific error that occurred. |
| 379 | "message": "A String", # Additional information about the error encountered. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 380 | }, |
| 381 | ], |
| 382 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 383 | }, |
| 384 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 385 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 386 | "kind": "A String", # This is always <code>sql#importContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 387 | "csvImportOptions": { # Options for importing data as CSV. |
| 388 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 389 | # of the database table are loaded with CSV data. |
| 390 | "A String", |
| 391 | ], |
| 392 | "table": "A String", # The table to which CSV data is imported. |
| 393 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 394 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 395 | # <code>SQL</code>, this field is required only if the import file does not |
| 396 | # specify a database, and is overridden by any database specification in the |
| 397 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 398 | # must be specified. |
| 399 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 400 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 401 | "encryptionOptions": { |
| 402 | "pvkPassword": "A String", # Password that encrypts the private key |
| 403 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 404 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 405 | # write permissions to the bucket and read access to the file. |
| 406 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 407 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 408 | # write permissions to the bucket and read access to the file. |
| 409 | }, |
| 410 | }, |
| 411 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 412 | # <code>gs: |
| 413 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 414 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 415 | # // write permissions to the bucket and read access to the file. |
| 416 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 417 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 418 | }, |
| 419 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 420 | # <code>RUNNING</code>, <code>DONE</code>, |
| 421 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 422 | }</pre> |
| 423 | </div> |
| 424 | |
| 425 | <div class="method"> |
| 426 | <code class="details" id="list">list(project, instance, x__xgafv=None)</code> |
| 427 | <pre>Lists databases in the specified Cloud SQL instance. |
| 428 | |
| 429 | Args: |
| 430 | project: string, Project ID of the project that contains the instance. (required) |
| 431 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 432 | x__xgafv: string, V1 error format. |
| 433 | Allowed values |
| 434 | 1 - v1 error format |
| 435 | 2 - v2 error format |
| 436 | |
| 437 | Returns: |
| 438 | An object of the form: |
| 439 | |
| 440 | { # Database list response. |
| 441 | "kind": "A String", # This is always <code>sql#databasesList</code>. |
| 442 | "items": [ # List of database resources in the instance. |
| 443 | { # Represents a SQL database on the Cloud SQL instance. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 444 | "collation": "A String", # The MySQL collation value. |
| 445 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include |
| 446 | # the project ID or instance name. |
| 447 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 448 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google |
| 449 | # apps domain is prefixed if applicable. |
| 450 | "selfLink": "A String", # The URI of this resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 451 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 452 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 453 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 454 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 455 | "kind": "A String", # This is always <code>sql#database</code>. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 456 | "charset": "A String", # The MySQL charset value. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 457 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 458 | # API. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 459 | }, |
| 460 | ], |
| 461 | }</pre> |
| 462 | </div> |
| 463 | |
| 464 | <div class="method"> |
| 465 | <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 |
| 467 | a Cloud SQL instance. This method supports patch semantics. |
| 468 | |
| 469 | Args: |
| 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) |
| 473 | body: object, The request body. |
| 474 | The object takes the form of: |
| 475 | |
| 476 | { # Represents a SQL database on the Cloud SQL instance. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 477 | "collation": "A String", # The MySQL collation value. |
| 478 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include |
| 479 | # the project ID or instance name. |
| 480 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 481 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google |
| 482 | # apps domain is prefixed if applicable. |
| 483 | "selfLink": "A String", # The URI of this resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 484 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 485 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 486 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 487 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 488 | "kind": "A String", # This is always <code>sql#database</code>. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 489 | "charset": "A String", # The MySQL charset value. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 490 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 491 | # API. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 492 | } |
| 493 | |
| 494 | x__xgafv: string, V1 error format. |
| 495 | Allowed values |
| 496 | 1 - v1 error format |
| 497 | 2 - v2 error format |
| 498 | |
| 499 | Returns: |
| 500 | An object of the form: |
| 501 | |
| 502 | { # An Operation resource.&nbsp;For successful operations that return an |
| 503 | # Operation resource, only the fields relevant to the operation are populated |
| 504 | # in the resource. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 505 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 506 | # identifier to retrieve the Operations resource that has information about |
| 507 | # the operation. |
| 508 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 509 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 510 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 511 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 512 | # databases are exported, except for the <code>mysql</code> system database. |
| 513 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 514 | # either by using this property or by using the |
| 515 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 516 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 517 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 518 | # this database must match the one specified in the |
| 519 | # <code>csvExportOptions.selectQuery</code> property. |
| 520 | "A String", |
| 521 | ], |
| 522 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 523 | "schemaOnly": True or False, # Export only schemas. |
| 524 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 525 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 526 | # If set to <code>1</code>, the dump file includes |
| 527 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 528 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 529 | # a SQL comment, and has no effect. |
| 530 | # All other values are ignored. |
| 531 | }, |
| 532 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 533 | # you specify tables, specify one and only one database. For PostgreSQL |
| 534 | # instances, you can specify only one table. |
| 535 | "A String", |
| 536 | ], |
| 537 | }, |
| 538 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 539 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 540 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 541 | # stored. The URI is in the form <code>gs: |
| 542 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 543 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 544 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 545 | # // compressed. |
| 546 | "csvExportOptions": { # Options for exporting data as CSV. |
| 547 | "selectQuery": "A String", # The select query used to extract the data. |
| 548 | }, |
| 549 | }, |
| 550 | "targetId": "A String", # Name of the database instance related to this operation. |
| 551 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 552 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 553 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 554 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 555 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 556 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 557 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 558 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 559 | # <code>2012-11-15T16:19:00.094Z</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 560 | "user": "A String", # The email address of the user who initiated this operation. |
| 561 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 562 | "selfLink": "A String", # The URI of this resource. |
| 563 | "targetLink": "A String", |
| 564 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 565 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 566 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 567 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 568 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 569 | # <code>DELETE_DATABASE</code> . |
| 570 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 571 | # populated. |
| 572 | "errors": [ # The list of errors encountered while processing this operation. |
| 573 | { # Database instance operation error. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 574 | "kind": "A String", # This is always <code>sql#operationError</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 575 | "code": "A String", # Identifies the specific error that occurred. |
| 576 | "message": "A String", # Additional information about the error encountered. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 577 | }, |
| 578 | ], |
| 579 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 580 | }, |
| 581 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 582 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 583 | "kind": "A String", # This is always <code>sql#importContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 584 | "csvImportOptions": { # Options for importing data as CSV. |
| 585 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 586 | # of the database table are loaded with CSV data. |
| 587 | "A String", |
| 588 | ], |
| 589 | "table": "A String", # The table to which CSV data is imported. |
| 590 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 591 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 592 | # <code>SQL</code>, this field is required only if the import file does not |
| 593 | # specify a database, and is overridden by any database specification in the |
| 594 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 595 | # must be specified. |
| 596 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 597 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 598 | "encryptionOptions": { |
| 599 | "pvkPassword": "A String", # Password that encrypts the private key |
| 600 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 601 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 602 | # write permissions to the bucket and read access to the file. |
| 603 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 604 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 605 | # write permissions to the bucket and read access to the file. |
| 606 | }, |
| 607 | }, |
| 608 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 609 | # <code>gs: |
| 610 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 611 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 612 | # // write permissions to the bucket and read access to the file. |
| 613 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 614 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 615 | }, |
| 616 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 617 | # <code>RUNNING</code>, <code>DONE</code>, |
| 618 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 619 | }</pre> |
| 620 | </div> |
| 621 | |
| 622 | <div class="method"> |
| 623 | <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 |
| 625 | SQL instance. |
| 626 | |
| 627 | Args: |
| 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) |
| 631 | body: object, The request body. |
| 632 | The object takes the form of: |
| 633 | |
| 634 | { # Represents a SQL database on the Cloud SQL instance. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 635 | "collation": "A String", # The MySQL collation value. |
| 636 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include |
| 637 | # the project ID or instance name. |
| 638 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 639 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google |
| 640 | # apps domain is prefixed if applicable. |
| 641 | "selfLink": "A String", # The URI of this resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 642 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 643 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 644 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 645 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 646 | "kind": "A String", # This is always <code>sql#database</code>. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 647 | "charset": "A String", # The MySQL charset value. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 648 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 649 | # API. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 650 | } |
| 651 | |
| 652 | x__xgafv: string, V1 error format. |
| 653 | Allowed values |
| 654 | 1 - v1 error format |
| 655 | 2 - v2 error format |
| 656 | |
| 657 | Returns: |
| 658 | An object of the form: |
| 659 | |
| 660 | { # An Operation resource.&nbsp;For successful operations that return an |
| 661 | # Operation resource, only the fields relevant to the operation are populated |
| 662 | # in the resource. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 663 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 664 | # identifier to retrieve the Operations resource that has information about |
| 665 | # the operation. |
| 666 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 667 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 668 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 669 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 670 | # databases are exported, except for the <code>mysql</code> system database. |
| 671 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 672 | # either by using this property or by using the |
| 673 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 674 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 675 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 676 | # this database must match the one specified in the |
| 677 | # <code>csvExportOptions.selectQuery</code> property. |
| 678 | "A String", |
| 679 | ], |
| 680 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 681 | "schemaOnly": True or False, # Export only schemas. |
| 682 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 683 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 684 | # If set to <code>1</code>, the dump file includes |
| 685 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 686 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 687 | # a SQL comment, and has no effect. |
| 688 | # All other values are ignored. |
| 689 | }, |
| 690 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 691 | # you specify tables, specify one and only one database. For PostgreSQL |
| 692 | # instances, you can specify only one table. |
| 693 | "A String", |
| 694 | ], |
| 695 | }, |
| 696 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 697 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 698 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 699 | # stored. The URI is in the form <code>gs: |
| 700 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 701 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 702 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 703 | # // compressed. |
| 704 | "csvExportOptions": { # Options for exporting data as CSV. |
| 705 | "selectQuery": "A String", # The select query used to extract the data. |
| 706 | }, |
| 707 | }, |
| 708 | "targetId": "A String", # Name of the database instance related to this operation. |
| 709 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 710 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 711 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 712 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 713 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 714 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 715 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 716 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 717 | # <code>2012-11-15T16:19:00.094Z</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 718 | "user": "A String", # The email address of the user who initiated this operation. |
| 719 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 720 | "selfLink": "A String", # The URI of this resource. |
| 721 | "targetLink": "A String", |
| 722 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 723 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 724 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 725 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 726 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 727 | # <code>DELETE_DATABASE</code> . |
| 728 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 729 | # populated. |
| 730 | "errors": [ # The list of errors encountered while processing this operation. |
| 731 | { # Database instance operation error. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 732 | "kind": "A String", # This is always <code>sql#operationError</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 733 | "code": "A String", # Identifies the specific error that occurred. |
| 734 | "message": "A String", # Additional information about the error encountered. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 735 | }, |
| 736 | ], |
| 737 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 738 | }, |
| 739 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 740 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 741 | "kind": "A String", # This is always <code>sql#importContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 742 | "csvImportOptions": { # Options for importing data as CSV. |
| 743 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 744 | # of the database table are loaded with CSV data. |
| 745 | "A String", |
| 746 | ], |
| 747 | "table": "A String", # The table to which CSV data is imported. |
| 748 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 749 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 750 | # <code>SQL</code>, this field is required only if the import file does not |
| 751 | # specify a database, and is overridden by any database specification in the |
| 752 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 753 | # must be specified. |
| 754 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 755 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 756 | "encryptionOptions": { |
| 757 | "pvkPassword": "A String", # Password that encrypts the private key |
| 758 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 759 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 760 | # write permissions to the bucket and read access to the file. |
| 761 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 762 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 763 | # write permissions to the bucket and read access to the file. |
| 764 | }, |
| 765 | }, |
| 766 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 767 | # <code>gs: |
| 768 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 769 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 770 | # // write permissions to the bucket and read access to the file. |
| 771 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 772 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 773 | }, |
| 774 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 775 | # <code>RUNNING</code>, <code>DONE</code>, |
| 776 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 777 | }</pre> |
| 778 | </div> |
| 779 | |
| 780 | </body></html> |