Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [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 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 75 | <h1><a href="sqladmin_v1beta4.html">Cloud SQL Admin API</a> . <a href="sqladmin_v1beta4.databases.html">databases</a></h1> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 78 | <code><a href="#close">close()</a></code></p> |
| 79 | <p class="firstline">Close httplib2 connections.</p> |
| 80 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 81 | <code><a href="#delete">delete(project, instance, database, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 82 | <p class="firstline">Deletes a database from a Cloud SQL instance.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 83 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 84 | <code><a href="#get">get(project, instance, database, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 85 | <p class="firstline">Retrieves a resource containing information about a database inside a Cloud SQL instance.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 86 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 87 | <code><a href="#insert">insert(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 88 | <p class="firstline">Inserts a resource containing information about a database inside a Cloud SQL instance.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 89 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 90 | <code><a href="#list">list(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 91 | <p class="firstline">Lists databases in the specified Cloud SQL instance.</p> |
| 92 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 | <code><a href="#patch">patch(project, instance, database, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 94 | <p class="firstline">Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 95 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 96 | <code><a href="#update">update(project, instance, database, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 97 | <p class="firstline">Updates a resource containing information about a database inside a Cloud SQL instance.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 98 | <h3>Method Details</h3> |
| 99 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 100 | <code class="details" id="close">close()</code> |
| 101 | <pre>Close httplib2 connections.</pre> |
| 102 | </div> |
| 103 | |
| 104 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 105 | <code class="details" id="delete">delete(project, instance, database, x__xgafv=None)</code> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 106 | <pre>Deletes a database from a Cloud SQL instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 107 | |
| 108 | Args: |
| 109 | project: string, Project ID of the project that contains the instance. (required) |
| 110 | instance: string, Database instance ID. This does not include the project ID. (required) |
| 111 | database: string, Name of the database to be deleted in the instance. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 112 | x__xgafv: string, V1 error format. |
| 113 | Allowed values |
| 114 | 1 - v1 error format |
| 115 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 116 | |
| 117 | Returns: |
| 118 | An object of the form: |
| 119 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 120 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 121 | "kind": "A String", # This is always *sql#operation*. |
| 122 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 123 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 124 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 125 | "errors": [ # The list of errors encountered while processing this operation. |
| 126 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 127 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 128 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 129 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 130 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 131 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 132 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 133 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 134 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 135 | "selfLink": "A String", # The URI of this resource. |
| 136 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 137 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 138 | "csvExportOptions": { # Options for exporting data as CSV. |
| 139 | "selectQuery": "A String", # The select query used to extract the data. |
| 140 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 141 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 142 | "kind": "A String", # This is always *sql#exportContext*. |
| 143 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 144 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 145 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 146 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 147 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 148 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 149 | "schemaOnly": True or False, # Export only schemas. |
| 150 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 151 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 152 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 153 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 154 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 155 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 156 | }, |
| 157 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 158 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 159 | "targetId": "A String", # Name of the database instance related to this operation. |
| 160 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 161 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 162 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 163 | "targetLink": "A String", |
| 164 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 165 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 166 | "kind": "A String", # This is always *sql#importContext*. |
| 167 | "csvImportOptions": { # Options for importing data as CSV. |
| 168 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 169 | "A String", |
| 170 | ], |
| 171 | "table": "A String", # The table to which CSV data is imported. |
| 172 | }, |
| 173 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 174 | "encryptionOptions": { |
| 175 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 176 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 177 | "pvkPassword": "A String", # Password that encrypts the private key |
| 178 | }, |
| 179 | }, |
| 180 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 181 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 182 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 183 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 184 | }</pre> |
| 185 | </div> |
| 186 | |
| 187 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 188 | <code class="details" id="get">get(project, instance, database, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 189 | <pre>Retrieves a resource containing information about a database inside a Cloud SQL instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 190 | |
| 191 | Args: |
| 192 | project: string, Project ID of the project that contains the instance. (required) |
| 193 | instance: string, Database instance ID. This does not include the project ID. (required) |
| 194 | database: string, Name of the database in the instance. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 195 | x__xgafv: string, V1 error format. |
| 196 | Allowed values |
| 197 | 1 - v1 error format |
| 198 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 199 | |
| 200 | Returns: |
| 201 | An object of the form: |
| 202 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 203 | { # Represents a SQL database on the Cloud SQL instance. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 204 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 205 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 206 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 207 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 208 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 209 | "charset": "A String", # The Cloud SQL charset value. |
| 210 | "kind": "A String", # This is always *sql#database*. |
| 211 | "collation": "A String", # The Cloud SQL collation value. |
| 212 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| 213 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 214 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| 215 | "selfLink": "A String", # The URI of this resource. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 216 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 217 | </div> |
| 218 | |
| 219 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 220 | <code class="details" id="insert">insert(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 221 | <pre>Inserts a resource containing information about a database inside a Cloud SQL instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 222 | |
| 223 | Args: |
| 224 | project: string, Project ID of the project that contains the instance. (required) |
| 225 | instance: string, Database instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 226 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 227 | The object takes the form of: |
| 228 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 229 | { # Represents a SQL database on the Cloud SQL instance. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 230 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 231 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 232 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 233 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 234 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 235 | "charset": "A String", # The Cloud SQL charset value. |
| 236 | "kind": "A String", # This is always *sql#database*. |
| 237 | "collation": "A String", # The Cloud SQL collation value. |
| 238 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| 239 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 240 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| 241 | "selfLink": "A String", # The URI of this resource. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 242 | } |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 243 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 244 | x__xgafv: string, V1 error format. |
| 245 | Allowed values |
| 246 | 1 - v1 error format |
| 247 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 248 | |
| 249 | Returns: |
| 250 | An object of the form: |
| 251 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 252 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 253 | "kind": "A String", # This is always *sql#operation*. |
| 254 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 255 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 256 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 257 | "errors": [ # The list of errors encountered while processing this operation. |
| 258 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 259 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 260 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 261 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 262 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 263 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 264 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 265 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 266 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 267 | "selfLink": "A String", # The URI of this resource. |
| 268 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 269 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 270 | "csvExportOptions": { # Options for exporting data as CSV. |
| 271 | "selectQuery": "A String", # The select query used to extract the data. |
| 272 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 273 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 274 | "kind": "A String", # This is always *sql#exportContext*. |
| 275 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 276 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 277 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 278 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 279 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 280 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 281 | "schemaOnly": True or False, # Export only schemas. |
| 282 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 283 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 284 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 285 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 286 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 287 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 288 | }, |
| 289 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 290 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 291 | "targetId": "A String", # Name of the database instance related to this operation. |
| 292 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 293 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 294 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 295 | "targetLink": "A String", |
| 296 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 297 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 298 | "kind": "A String", # This is always *sql#importContext*. |
| 299 | "csvImportOptions": { # Options for importing data as CSV. |
| 300 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 301 | "A String", |
| 302 | ], |
| 303 | "table": "A String", # The table to which CSV data is imported. |
| 304 | }, |
| 305 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 306 | "encryptionOptions": { |
| 307 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 308 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 309 | "pvkPassword": "A String", # Password that encrypts the private key |
| 310 | }, |
| 311 | }, |
| 312 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 313 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 314 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 315 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 316 | }</pre> |
| 317 | </div> |
| 318 | |
| 319 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 320 | <code class="details" id="list">list(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 321 | <pre>Lists databases in the specified Cloud SQL instance. |
| 322 | |
| 323 | Args: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 324 | project: string, Project ID of the project that contains the instance. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 325 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 326 | x__xgafv: string, V1 error format. |
| 327 | Allowed values |
| 328 | 1 - v1 error format |
| 329 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 330 | |
| 331 | Returns: |
| 332 | An object of the form: |
| 333 | |
| 334 | { # Database list response. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 335 | "kind": "A String", # This is always *sql#databasesList*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 336 | "items": [ # List of database resources in the instance. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 337 | { # Represents a SQL database on the Cloud SQL instance. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 338 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 339 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 340 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 341 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 342 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 343 | "charset": "A String", # The Cloud SQL charset value. |
| 344 | "kind": "A String", # This is always *sql#database*. |
| 345 | "collation": "A String", # The Cloud SQL collation value. |
| 346 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| 347 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 348 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| 349 | "selfLink": "A String", # The URI of this resource. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 350 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 351 | ], |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 352 | }</pre> |
| 353 | </div> |
| 354 | |
| 355 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 356 | <code class="details" id="patch">patch(project, instance, database, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 357 | <pre>Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 358 | |
| 359 | Args: |
| 360 | project: string, Project ID of the project that contains the instance. (required) |
| 361 | instance: string, Database instance ID. This does not include the project ID. (required) |
| 362 | database: string, Name of the database to be updated in the instance. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 363 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 364 | The object takes the form of: |
| 365 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 366 | { # Represents a SQL database on the Cloud SQL instance. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 367 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 368 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 369 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 370 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 371 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 372 | "charset": "A String", # The Cloud SQL charset value. |
| 373 | "kind": "A String", # This is always *sql#database*. |
| 374 | "collation": "A String", # The Cloud SQL collation value. |
| 375 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| 376 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 377 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| 378 | "selfLink": "A String", # The URI of this resource. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 379 | } |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 380 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 381 | x__xgafv: string, V1 error format. |
| 382 | Allowed values |
| 383 | 1 - v1 error format |
| 384 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 385 | |
| 386 | Returns: |
| 387 | An object of the form: |
| 388 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 389 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 390 | "kind": "A String", # This is always *sql#operation*. |
| 391 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 392 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 393 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 394 | "errors": [ # The list of errors encountered while processing this operation. |
| 395 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 396 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 397 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 398 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 399 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 400 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 401 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 402 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 403 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 404 | "selfLink": "A String", # The URI of this resource. |
| 405 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 406 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 407 | "csvExportOptions": { # Options for exporting data as CSV. |
| 408 | "selectQuery": "A String", # The select query used to extract the data. |
| 409 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 410 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 411 | "kind": "A String", # This is always *sql#exportContext*. |
| 412 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 413 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 414 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 415 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 416 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 417 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 418 | "schemaOnly": True or False, # Export only schemas. |
| 419 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 420 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 421 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 422 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 423 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 424 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 425 | }, |
| 426 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 427 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 428 | "targetId": "A String", # Name of the database instance related to this operation. |
| 429 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 430 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 431 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 432 | "targetLink": "A String", |
| 433 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 434 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 435 | "kind": "A String", # This is always *sql#importContext*. |
| 436 | "csvImportOptions": { # Options for importing data as CSV. |
| 437 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 438 | "A String", |
| 439 | ], |
| 440 | "table": "A String", # The table to which CSV data is imported. |
| 441 | }, |
| 442 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 443 | "encryptionOptions": { |
| 444 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 445 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 446 | "pvkPassword": "A String", # Password that encrypts the private key |
| 447 | }, |
| 448 | }, |
| 449 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 450 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 451 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 452 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 453 | }</pre> |
| 454 | </div> |
| 455 | |
| 456 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 457 | <code class="details" id="update">update(project, instance, database, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 458 | <pre>Updates a resource containing information about a database inside a Cloud SQL instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 459 | |
| 460 | Args: |
| 461 | project: string, Project ID of the project that contains the instance. (required) |
| 462 | instance: string, Database instance ID. This does not include the project ID. (required) |
| 463 | database: string, Name of the database to be updated in the instance. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 464 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 465 | The object takes the form of: |
| 466 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 467 | { # Represents a SQL database on the Cloud SQL instance. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 468 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 469 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 470 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 471 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 472 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 473 | "charset": "A String", # The Cloud SQL charset value. |
| 474 | "kind": "A String", # This is always *sql#database*. |
| 475 | "collation": "A String", # The Cloud SQL collation value. |
| 476 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| 477 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 478 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| 479 | "selfLink": "A String", # The URI of this resource. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 480 | } |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 481 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 482 | x__xgafv: string, V1 error format. |
| 483 | Allowed values |
| 484 | 1 - v1 error format |
| 485 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 486 | |
| 487 | Returns: |
| 488 | An object of the form: |
| 489 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 490 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 491 | "kind": "A String", # This is always *sql#operation*. |
| 492 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 493 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 494 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 495 | "errors": [ # The list of errors encountered while processing this operation. |
| 496 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 497 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 498 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 499 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 500 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 501 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 502 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 503 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 504 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 505 | "selfLink": "A String", # The URI of this resource. |
| 506 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 507 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 508 | "csvExportOptions": { # Options for exporting data as CSV. |
| 509 | "selectQuery": "A String", # The select query used to extract the data. |
| 510 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 511 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 512 | "kind": "A String", # This is always *sql#exportContext*. |
| 513 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 514 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 515 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 516 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 517 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 518 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 519 | "schemaOnly": True or False, # Export only schemas. |
| 520 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 521 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 522 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 523 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 524 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 525 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 526 | }, |
| 527 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 528 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 529 | "targetId": "A String", # Name of the database instance related to this operation. |
| 530 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 531 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 532 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 533 | "targetLink": "A String", |
| 534 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 535 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 536 | "kind": "A String", # This is always *sql#importContext*. |
| 537 | "csvImportOptions": { # Options for importing data as CSV. |
| 538 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 539 | "A String", |
| 540 | ], |
| 541 | "table": "A String", # The table to which CSV data is imported. |
| 542 | }, |
| 543 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 544 | "encryptionOptions": { |
| 545 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 546 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 547 | "pvkPassword": "A String", # Password that encrypts the private key |
| 548 | }, |
| 549 | }, |
| 550 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 551 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 552 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 553 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 554 | }</pre> |
| 555 | </div> |
| 556 | |
| 557 | </body></html> |