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