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. |
| 115 | "user": "A String", # The email address of the user who initiated this operation. |
| 116 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 117 | "selfLink": "A String", # The URI of this resource. |
| 118 | "targetLink": "A String", |
| 119 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 120 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 121 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 122 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 123 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 124 | # <code>DELETE_DATABASE</code> . |
| 125 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 126 | # populated. |
| 127 | "errors": [ # The list of errors encountered while processing this operation. |
| 128 | { # Database instance operation error. |
| 129 | "code": "A String", # Identifies the specific error that occurred. |
| 130 | "message": "A String", # Additional information about the error encountered. |
| 131 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 132 | }, |
| 133 | ], |
| 134 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 135 | }, |
| 136 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 137 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 138 | "csvImportOptions": { # Options for importing data as CSV. |
| 139 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 140 | # of the database table are loaded with CSV data. |
| 141 | "A String", |
| 142 | ], |
| 143 | "table": "A String", # The table to which CSV data is imported. |
| 144 | }, |
| 145 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 146 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 147 | # <code>SQL</code>, this field is required only if the import file does not |
| 148 | # specify a database, and is overridden by any database specification in the |
| 149 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 150 | # must be specified. |
| 151 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 152 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 153 | "encryptionOptions": { |
| 154 | "pvkPassword": "A String", # Password that encrypts the private key |
| 155 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 156 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 157 | # write permissions to the bucket and read access to the file. |
| 158 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 159 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 160 | # write permissions to the bucket and read access to the file. |
| 161 | }, |
| 162 | }, |
| 163 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 164 | # <code>gs: |
| 165 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 166 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 167 | # // write permissions to the bucket and read access to the file. |
| 168 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 169 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 170 | }, |
| 171 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 172 | # <code>RUNNING</code>, <code>DONE</code>, |
| 173 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 174 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 175 | # identifier to retrieve the Operations resource that has information about |
| 176 | # the operation. |
| 177 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 178 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 179 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 180 | # databases are exported, except for the <code>mysql</code> system database. |
| 181 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 182 | # either by using this property or by using the |
| 183 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 184 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 185 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 186 | # this database must match the one specified in the |
| 187 | # <code>csvExportOptions.selectQuery</code> property. |
| 188 | "A String", |
| 189 | ], |
| 190 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 191 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 192 | # you specify tables, specify one and only one database. For PostgreSQL |
| 193 | # instances, you can specify only one table. |
| 194 | "A String", |
| 195 | ], |
| 196 | "schemaOnly": True or False, # Export only schemas. |
| 197 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 198 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 199 | # If set to <code>1</code>, the dump file includes |
| 200 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 201 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 202 | # a SQL comment, and has no effect. |
| 203 | # All other values are ignored. |
| 204 | }, |
| 205 | }, |
| 206 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 207 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 208 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 209 | # stored. The URI is in the form <code>gs: |
| 210 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 211 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 212 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 213 | # // compressed. |
| 214 | "csvExportOptions": { # Options for exporting data as CSV. |
| 215 | "selectQuery": "A String", # The select query used to extract the data. |
| 216 | }, |
| 217 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 218 | }, |
| 219 | "targetId": "A String", # Name of the database instance related to this operation. |
| 220 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 221 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 222 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 223 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 224 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 225 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 226 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 227 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 228 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 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. |
| 250 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 251 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 252 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 253 | }, |
| 254 | "charset": "A String", # The MySQL charset value. |
| 255 | "kind": "A String", # This is always <code>sql#database</code>. |
| 256 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 257 | # API. |
| 258 | "collation": "A String", # The MySQL collation value. |
| 259 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 260 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include |
| 261 | # the project ID or instance name. |
| 262 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google |
| 263 | # apps domain is prefixed if applicable. |
| 264 | "selfLink": "A String", # The URI of this resource. |
| 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. |
| 280 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 281 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 282 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 283 | }, |
| 284 | "charset": "A String", # The MySQL charset value. |
| 285 | "kind": "A String", # This is always <code>sql#database</code>. |
| 286 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 287 | # API. |
| 288 | "collation": "A String", # The MySQL collation value. |
| 289 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 290 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include |
| 291 | # the project ID or instance name. |
| 292 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google |
| 293 | # apps domain is prefixed if applicable. |
| 294 | "selfLink": "A String", # The URI of this resource. |
| 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. |
| 308 | "user": "A String", # The email address of the user who initiated this operation. |
| 309 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 310 | "selfLink": "A String", # The URI of this resource. |
| 311 | "targetLink": "A String", |
| 312 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 313 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 314 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 315 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 316 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 317 | # <code>DELETE_DATABASE</code> . |
| 318 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 319 | # populated. |
| 320 | "errors": [ # The list of errors encountered while processing this operation. |
| 321 | { # Database instance operation error. |
| 322 | "code": "A String", # Identifies the specific error that occurred. |
| 323 | "message": "A String", # Additional information about the error encountered. |
| 324 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 325 | }, |
| 326 | ], |
| 327 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 328 | }, |
| 329 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 330 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 331 | "csvImportOptions": { # Options for importing data as CSV. |
| 332 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 333 | # of the database table are loaded with CSV data. |
| 334 | "A String", |
| 335 | ], |
| 336 | "table": "A String", # The table to which CSV data is imported. |
| 337 | }, |
| 338 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 339 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 340 | # <code>SQL</code>, this field is required only if the import file does not |
| 341 | # specify a database, and is overridden by any database specification in the |
| 342 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 343 | # must be specified. |
| 344 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 345 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 346 | "encryptionOptions": { |
| 347 | "pvkPassword": "A String", # Password that encrypts the private key |
| 348 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 349 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 350 | # write permissions to the bucket and read access to the file. |
| 351 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 352 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 353 | # write permissions to the bucket and read access to the file. |
| 354 | }, |
| 355 | }, |
| 356 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 357 | # <code>gs: |
| 358 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 359 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 360 | # // write permissions to the bucket and read access to the file. |
| 361 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 362 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 363 | }, |
| 364 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 365 | # <code>RUNNING</code>, <code>DONE</code>, |
| 366 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 367 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 368 | # identifier to retrieve the Operations resource that has information about |
| 369 | # the operation. |
| 370 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 371 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 372 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 373 | # databases are exported, except for the <code>mysql</code> system database. |
| 374 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 375 | # either by using this property or by using the |
| 376 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 377 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 378 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 379 | # this database must match the one specified in the |
| 380 | # <code>csvExportOptions.selectQuery</code> property. |
| 381 | "A String", |
| 382 | ], |
| 383 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 384 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 385 | # you specify tables, specify one and only one database. For PostgreSQL |
| 386 | # instances, you can specify only one table. |
| 387 | "A String", |
| 388 | ], |
| 389 | "schemaOnly": True or False, # Export only schemas. |
| 390 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 391 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 392 | # If set to <code>1</code>, the dump file includes |
| 393 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 394 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 395 | # a SQL comment, and has no effect. |
| 396 | # All other values are ignored. |
| 397 | }, |
| 398 | }, |
| 399 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 400 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 401 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 402 | # stored. The URI is in the form <code>gs: |
| 403 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 404 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 405 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 406 | # // compressed. |
| 407 | "csvExportOptions": { # Options for exporting data as CSV. |
| 408 | "selectQuery": "A String", # The select query used to extract the data. |
| 409 | }, |
| 410 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 411 | }, |
| 412 | "targetId": "A String", # Name of the database instance related to this operation. |
| 413 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 414 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 415 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 416 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 417 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 418 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 419 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 420 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 421 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 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. |
| 444 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 445 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 446 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 447 | }, |
| 448 | "charset": "A String", # The MySQL charset value. |
| 449 | "kind": "A String", # This is always <code>sql#database</code>. |
| 450 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 451 | # API. |
| 452 | "collation": "A String", # The MySQL collation value. |
| 453 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 454 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include |
| 455 | # the project ID or instance name. |
| 456 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google |
| 457 | # apps domain is prefixed if applicable. |
| 458 | "selfLink": "A String", # The URI of this resource. |
| 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. |
| 477 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 478 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 479 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 480 | }, |
| 481 | "charset": "A String", # The MySQL charset value. |
| 482 | "kind": "A String", # This is always <code>sql#database</code>. |
| 483 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 484 | # API. |
| 485 | "collation": "A String", # The MySQL collation value. |
| 486 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 487 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include |
| 488 | # the project ID or instance name. |
| 489 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google |
| 490 | # apps domain is prefixed if applicable. |
| 491 | "selfLink": "A String", # The URI of this resource. |
| 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. |
| 505 | "user": "A String", # The email address of the user who initiated this operation. |
| 506 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 507 | "selfLink": "A String", # The URI of this resource. |
| 508 | "targetLink": "A String", |
| 509 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 510 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 511 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 512 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 513 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 514 | # <code>DELETE_DATABASE</code> . |
| 515 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 516 | # populated. |
| 517 | "errors": [ # The list of errors encountered while processing this operation. |
| 518 | { # Database instance operation error. |
| 519 | "code": "A String", # Identifies the specific error that occurred. |
| 520 | "message": "A String", # Additional information about the error encountered. |
| 521 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 522 | }, |
| 523 | ], |
| 524 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 525 | }, |
| 526 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 527 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 528 | "csvImportOptions": { # Options for importing data as CSV. |
| 529 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 530 | # of the database table are loaded with CSV data. |
| 531 | "A String", |
| 532 | ], |
| 533 | "table": "A String", # The table to which CSV data is imported. |
| 534 | }, |
| 535 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 536 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 537 | # <code>SQL</code>, this field is required only if the import file does not |
| 538 | # specify a database, and is overridden by any database specification in the |
| 539 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 540 | # must be specified. |
| 541 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 542 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 543 | "encryptionOptions": { |
| 544 | "pvkPassword": "A String", # Password that encrypts the private key |
| 545 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 546 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 547 | # write permissions to the bucket and read access to the file. |
| 548 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 549 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 550 | # write permissions to the bucket and read access to the file. |
| 551 | }, |
| 552 | }, |
| 553 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 554 | # <code>gs: |
| 555 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 556 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 557 | # // write permissions to the bucket and read access to the file. |
| 558 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 559 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 560 | }, |
| 561 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 562 | # <code>RUNNING</code>, <code>DONE</code>, |
| 563 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 564 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 565 | # identifier to retrieve the Operations resource that has information about |
| 566 | # the operation. |
| 567 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 568 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 569 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 570 | # databases are exported, except for the <code>mysql</code> system database. |
| 571 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 572 | # either by using this property or by using the |
| 573 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 574 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 575 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 576 | # this database must match the one specified in the |
| 577 | # <code>csvExportOptions.selectQuery</code> property. |
| 578 | "A String", |
| 579 | ], |
| 580 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 581 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 582 | # you specify tables, specify one and only one database. For PostgreSQL |
| 583 | # instances, you can specify only one table. |
| 584 | "A String", |
| 585 | ], |
| 586 | "schemaOnly": True or False, # Export only schemas. |
| 587 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 588 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 589 | # If set to <code>1</code>, the dump file includes |
| 590 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 591 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 592 | # a SQL comment, and has no effect. |
| 593 | # All other values are ignored. |
| 594 | }, |
| 595 | }, |
| 596 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 597 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 598 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 599 | # stored. The URI is in the form <code>gs: |
| 600 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 601 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 602 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 603 | # // compressed. |
| 604 | "csvExportOptions": { # Options for exporting data as CSV. |
| 605 | "selectQuery": "A String", # The select query used to extract the data. |
| 606 | }, |
| 607 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 608 | }, |
| 609 | "targetId": "A String", # Name of the database instance related to this operation. |
| 610 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 611 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 612 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 613 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 614 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 615 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 616 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 617 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 618 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 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. |
| 635 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 636 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 637 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 638 | }, |
| 639 | "charset": "A String", # The MySQL charset value. |
| 640 | "kind": "A String", # This is always <code>sql#database</code>. |
| 641 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 642 | # API. |
| 643 | "collation": "A String", # The MySQL collation value. |
| 644 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 645 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include |
| 646 | # the project ID or instance name. |
| 647 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google |
| 648 | # apps domain is prefixed if applicable. |
| 649 | "selfLink": "A String", # The URI of this resource. |
| 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. |
| 663 | "user": "A String", # The email address of the user who initiated this operation. |
| 664 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 665 | "selfLink": "A String", # The URI of this resource. |
| 666 | "targetLink": "A String", |
| 667 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 668 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 669 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 670 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 671 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 672 | # <code>DELETE_DATABASE</code> . |
| 673 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 674 | # populated. |
| 675 | "errors": [ # The list of errors encountered while processing this operation. |
| 676 | { # Database instance operation error. |
| 677 | "code": "A String", # Identifies the specific error that occurred. |
| 678 | "message": "A String", # Additional information about the error encountered. |
| 679 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 680 | }, |
| 681 | ], |
| 682 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 683 | }, |
| 684 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 685 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 686 | "csvImportOptions": { # Options for importing data as CSV. |
| 687 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 688 | # of the database table are loaded with CSV data. |
| 689 | "A String", |
| 690 | ], |
| 691 | "table": "A String", # The table to which CSV data is imported. |
| 692 | }, |
| 693 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 694 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 695 | # <code>SQL</code>, this field is required only if the import file does not |
| 696 | # specify a database, and is overridden by any database specification in the |
| 697 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 698 | # must be specified. |
| 699 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 700 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 701 | "encryptionOptions": { |
| 702 | "pvkPassword": "A String", # Password that encrypts the private key |
| 703 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 704 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 705 | # write permissions to the bucket and read access to the file. |
| 706 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 707 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 708 | # write permissions to the bucket and read access to the file. |
| 709 | }, |
| 710 | }, |
| 711 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 712 | # <code>gs: |
| 713 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 714 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 715 | # // write permissions to the bucket and read access to the file. |
| 716 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 717 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 718 | }, |
| 719 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 720 | # <code>RUNNING</code>, <code>DONE</code>, |
| 721 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 722 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 723 | # identifier to retrieve the Operations resource that has information about |
| 724 | # the operation. |
| 725 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 726 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 727 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 728 | # databases are exported, except for the <code>mysql</code> system database. |
| 729 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 730 | # either by using this property or by using the |
| 731 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 732 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 733 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 734 | # this database must match the one specified in the |
| 735 | # <code>csvExportOptions.selectQuery</code> property. |
| 736 | "A String", |
| 737 | ], |
| 738 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 739 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 740 | # you specify tables, specify one and only one database. For PostgreSQL |
| 741 | # instances, you can specify only one table. |
| 742 | "A String", |
| 743 | ], |
| 744 | "schemaOnly": True or False, # Export only schemas. |
| 745 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 746 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 747 | # If set to <code>1</code>, the dump file includes |
| 748 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 749 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 750 | # a SQL comment, and has no effect. |
| 751 | # All other values are ignored. |
| 752 | }, |
| 753 | }, |
| 754 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 755 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 756 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 757 | # stored. The URI is in the form <code>gs: |
| 758 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 759 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 760 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 761 | # // compressed. |
| 762 | "csvExportOptions": { # Options for exporting data as CSV. |
| 763 | "selectQuery": "A String", # The select query used to extract the data. |
| 764 | }, |
| 765 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 766 | }, |
| 767 | "targetId": "A String", # Name of the database instance related to this operation. |
| 768 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 769 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 770 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 771 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 772 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 773 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 774 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 775 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 776 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 777 | }</pre> |
| 778 | </div> |
| 779 | |
| 780 | </body></html> |