Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="sql_v1beta4.html">Cloud SQL Admin API</a> . <a href="sql_v1beta4.instances.html">instances</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#addServerCa">addServerCa(project, instance, x__xgafv=None)</a></code></p> |
| 79 | <p class="firstline">Add a new trusted Certificate Authority (CA) version for the specified</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#clone">clone(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 82 | <p class="firstline">Creates a Cloud SQL instance as a clone of the source instance. Using this</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#delete">delete(project, instance, x__xgafv=None)</a></code></p> |
| 85 | <p class="firstline">Deletes a Cloud SQL instance.</p> |
| 86 | <p class="toc_element"> |
| 87 | <code><a href="#demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 88 | <p class="firstline">Demotes the stand-alone instance to be a Cloud SQL read replica for an</p> |
| 89 | <p class="toc_element"> |
| 90 | <code><a href="#export">export(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 91 | <p class="firstline">Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL</p> |
| 92 | <p class="toc_element"> |
| 93 | <code><a href="#failover">failover(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 94 | <p class="firstline">Failover the instance to its failover replica instance. Using this</p> |
| 95 | <p class="toc_element"> |
| 96 | <code><a href="#get">get(project, instance, x__xgafv=None)</a></code></p> |
| 97 | <p class="firstline">Retrieves a resource containing information about a Cloud SQL instance.</p> |
| 98 | <p class="toc_element"> |
| 99 | <code><a href="#import_">import_(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 100 | <p class="firstline">Imports data into a Cloud SQL instance from a SQL dump or CSV file in</p> |
| 101 | <p class="toc_element"> |
| 102 | <code><a href="#insert">insert(project, body=None, x__xgafv=None)</a></code></p> |
| 103 | <p class="firstline">Creates a new Cloud SQL instance.</p> |
| 104 | <p class="toc_element"> |
| 105 | <code><a href="#list">list(project, pageToken=None, maxResults=None, filter=None, x__xgafv=None)</a></code></p> |
| 106 | <p class="firstline">Lists instances under a given project.</p> |
| 107 | <p class="toc_element"> |
| 108 | <code><a href="#listServerCas">listServerCas(project, instance, x__xgafv=None)</a></code></p> |
| 109 | <p class="firstline">Lists all of the trusted Certificate Authorities (CAs) for the specified</p> |
| 110 | <p class="toc_element"> |
| 111 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 112 | <p class="firstline">Retrieves the next page of results.</p> |
| 113 | <p class="toc_element"> |
| 114 | <code><a href="#patch">patch(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 115 | <p class="firstline">Updates settings of a Cloud SQL instance.</p> |
| 116 | <p class="toc_element"> |
| 117 | <code><a href="#promoteReplica">promoteReplica(project, instance, x__xgafv=None)</a></code></p> |
| 118 | <p class="firstline">Promotes the read replica instance to be a stand-alone Cloud SQL instance.</p> |
| 119 | <p class="toc_element"> |
| 120 | <code><a href="#resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</a></code></p> |
| 121 | <p class="firstline">Deletes all client certificates and generates a new server SSL certificate</p> |
| 122 | <p class="toc_element"> |
| 123 | <code><a href="#restart">restart(project, instance, x__xgafv=None)</a></code></p> |
| 124 | <p class="firstline">Restarts a Cloud SQL instance.</p> |
| 125 | <p class="toc_element"> |
| 126 | <code><a href="#restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 127 | <p class="firstline">Restores a backup of a Cloud SQL instance. Using this operation might cause</p> |
| 128 | <p class="toc_element"> |
| 129 | <code><a href="#rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 130 | <p class="firstline">Rotates the server certificate to one signed by the Certificate Authority</p> |
| 131 | <p class="toc_element"> |
| 132 | <code><a href="#startReplica">startReplica(project, instance, x__xgafv=None)</a></code></p> |
| 133 | <p class="firstline">Starts the replication in the read replica instance.</p> |
| 134 | <p class="toc_element"> |
| 135 | <code><a href="#stopReplica">stopReplica(project, instance, x__xgafv=None)</a></code></p> |
| 136 | <p class="firstline">Stops the replication in the read replica instance.</p> |
| 137 | <p class="toc_element"> |
| 138 | <code><a href="#truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 139 | <p class="firstline">Truncate MySQL general and slow query log tables</p> |
| 140 | <p class="toc_element"> |
| 141 | <code><a href="#update">update(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 142 | <p class="firstline">Updates settings of a Cloud SQL instance. Using this operation might cause</p> |
| 143 | <h3>Method Details</h3> |
| 144 | <div class="method"> |
| 145 | <code class="details" id="addServerCa">addServerCa(project, instance, x__xgafv=None)</code> |
| 146 | <pre>Add a new trusted Certificate Authority (CA) version for the specified |
| 147 | instance. Required to prepare for a certificate rotation. If a CA version |
| 148 | was previously added but never used in a certificate rotation, this |
| 149 | operation replaces that version. There cannot be more than one CA version |
| 150 | waiting to be rotated in. |
| 151 | |
| 152 | Args: |
| 153 | project: string, Project ID of the project that contains the instance. (required) |
| 154 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 155 | x__xgafv: string, V1 error format. |
| 156 | Allowed values |
| 157 | 1 - v1 error format |
| 158 | 2 - v2 error format |
| 159 | |
| 160 | Returns: |
| 161 | An object of the form: |
| 162 | |
| 163 | { # An Operation resource.&nbsp;For successful operations that return an |
| 164 | # Operation resource, only the fields relevant to the operation are populated |
| 165 | # in the resource. |
| 166 | "user": "A String", # The email address of the user who initiated this operation. |
| 167 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 168 | "selfLink": "A String", # The URI of this resource. |
| 169 | "targetLink": "A String", |
| 170 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 171 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 172 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 173 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 174 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 175 | # <code>DELETE_DATABASE</code> . |
| 176 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 177 | # populated. |
| 178 | "errors": [ # The list of errors encountered while processing this operation. |
| 179 | { # Database instance operation error. |
| 180 | "code": "A String", # Identifies the specific error that occurred. |
| 181 | "message": "A String", # Additional information about the error encountered. |
| 182 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 183 | }, |
| 184 | ], |
| 185 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 186 | }, |
| 187 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 188 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 189 | "csvImportOptions": { # Options for importing data as CSV. |
| 190 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 191 | # of the database table are loaded with CSV data. |
| 192 | "A String", |
| 193 | ], |
| 194 | "table": "A String", # The table to which CSV data is imported. |
| 195 | }, |
| 196 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 197 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 198 | # <code>SQL</code>, this field is required only if the import file does not |
| 199 | # specify a database, and is overridden by any database specification in the |
| 200 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 201 | # must be specified. |
| 202 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 203 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 204 | "encryptionOptions": { |
| 205 | "pvkPassword": "A String", # Password that encrypts the private key |
| 206 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 207 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 208 | # write permissions to the bucket and read access to the file. |
| 209 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 210 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 211 | # write permissions to the bucket and read access to the file. |
| 212 | }, |
| 213 | }, |
| 214 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 215 | # <code>gs: |
| 216 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 217 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 218 | # // write permissions to the bucket and read access to the file. |
| 219 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 220 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 221 | }, |
| 222 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 223 | # <code>RUNNING</code>, <code>DONE</code>, |
| 224 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 225 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 226 | # identifier to retrieve the Operations resource that has information about |
| 227 | # the operation. |
| 228 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 229 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 230 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 231 | # databases are exported, except for the <code>mysql</code> system database. |
| 232 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 233 | # either by using this property or by using the |
| 234 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 235 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 236 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 237 | # this database must match the one specified in the |
| 238 | # <code>csvExportOptions.selectQuery</code> property. |
| 239 | "A String", |
| 240 | ], |
| 241 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 242 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 243 | # you specify tables, specify one and only one database. For PostgreSQL |
| 244 | # instances, you can specify only one table. |
| 245 | "A String", |
| 246 | ], |
| 247 | "schemaOnly": True or False, # Export only schemas. |
| 248 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 249 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 250 | # If set to <code>1</code>, the dump file includes |
| 251 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 252 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 253 | # a SQL comment, and has no effect. |
| 254 | # All other values are ignored. |
| 255 | }, |
| 256 | }, |
| 257 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 258 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 259 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 260 | # stored. The URI is in the form <code>gs: |
| 261 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 262 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 263 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 264 | # // compressed. |
| 265 | "csvExportOptions": { # Options for exporting data as CSV. |
| 266 | "selectQuery": "A String", # The select query used to extract the data. |
| 267 | }, |
| 268 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 269 | }, |
| 270 | "targetId": "A String", # Name of the database instance related to this operation. |
| 271 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 272 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 273 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 274 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 275 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 276 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 277 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 278 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 279 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 280 | }</pre> |
| 281 | </div> |
| 282 | |
| 283 | <div class="method"> |
| 284 | <code class="details" id="clone">clone(project, instance, body=None, x__xgafv=None)</code> |
| 285 | <pre>Creates a Cloud SQL instance as a clone of the source instance. Using this |
| 286 | operation might cause your instance to restart. |
| 287 | |
| 288 | Args: |
| 289 | project: string, Project ID of the source as well as the clone Cloud SQL instance. (required) |
| 290 | instance: string, The ID of the Cloud SQL instance to be cloned (source). This does not |
| 291 | include the project ID. (required) |
| 292 | body: object, The request body. |
| 293 | The object takes the form of: |
| 294 | |
| 295 | { # Database instance clone request. |
| 296 | "cloneContext": { # Database instance clone context. # Contains details about the clone operation. |
| 297 | "pitrTimestampMs": "A String", # Reserved for future use. |
| 298 | "binLogCoordinates": { # Binary log coordinates. # Binary log coordinates, if specified, identify the position up to which the |
| 299 | # source instance should be cloned. If not specified, the source instance is |
| 300 | # cloned up to the most recent binary log coordinates. |
| 301 | "binLogPosition": "A String", # Position (offset) within the binary log file. |
| 302 | "kind": "A String", # This is always <code>sql#binLogCoordinates</code>. |
| 303 | "binLogFileName": "A String", # Name of the binary log file for a Cloud SQL instance. |
| 304 | }, |
| 305 | "kind": "A String", # This is always <code>sql#cloneContext</code>. |
| 306 | "pointInTime": "A String", # Reserved for future use. |
| 307 | "destinationInstanceName": "A String", # Name of the Cloud SQL instance to be created as a clone. |
| 308 | }, |
| 309 | } |
| 310 | |
| 311 | x__xgafv: string, V1 error format. |
| 312 | Allowed values |
| 313 | 1 - v1 error format |
| 314 | 2 - v2 error format |
| 315 | |
| 316 | Returns: |
| 317 | An object of the form: |
| 318 | |
| 319 | { # An Operation resource.&nbsp;For successful operations that return an |
| 320 | # Operation resource, only the fields relevant to the operation are populated |
| 321 | # in the resource. |
| 322 | "user": "A String", # The email address of the user who initiated this operation. |
| 323 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 324 | "selfLink": "A String", # The URI of this resource. |
| 325 | "targetLink": "A String", |
| 326 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 327 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 328 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 329 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 330 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 331 | # <code>DELETE_DATABASE</code> . |
| 332 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 333 | # populated. |
| 334 | "errors": [ # The list of errors encountered while processing this operation. |
| 335 | { # Database instance operation error. |
| 336 | "code": "A String", # Identifies the specific error that occurred. |
| 337 | "message": "A String", # Additional information about the error encountered. |
| 338 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 339 | }, |
| 340 | ], |
| 341 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 342 | }, |
| 343 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 344 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 345 | "csvImportOptions": { # Options for importing data as CSV. |
| 346 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 347 | # of the database table are loaded with CSV data. |
| 348 | "A String", |
| 349 | ], |
| 350 | "table": "A String", # The table to which CSV data is imported. |
| 351 | }, |
| 352 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 353 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 354 | # <code>SQL</code>, this field is required only if the import file does not |
| 355 | # specify a database, and is overridden by any database specification in the |
| 356 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 357 | # must be specified. |
| 358 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 359 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 360 | "encryptionOptions": { |
| 361 | "pvkPassword": "A String", # Password that encrypts the private key |
| 362 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 363 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 364 | # write permissions to the bucket and read access to the file. |
| 365 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 366 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 367 | # write permissions to the bucket and read access to the file. |
| 368 | }, |
| 369 | }, |
| 370 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 371 | # <code>gs: |
| 372 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 373 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 374 | # // write permissions to the bucket and read access to the file. |
| 375 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 376 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 377 | }, |
| 378 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 379 | # <code>RUNNING</code>, <code>DONE</code>, |
| 380 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 381 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 382 | # identifier to retrieve the Operations resource that has information about |
| 383 | # the operation. |
| 384 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 385 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 386 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 387 | # databases are exported, except for the <code>mysql</code> system database. |
| 388 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 389 | # either by using this property or by using the |
| 390 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 391 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 392 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 393 | # this database must match the one specified in the |
| 394 | # <code>csvExportOptions.selectQuery</code> property. |
| 395 | "A String", |
| 396 | ], |
| 397 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 398 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 399 | # you specify tables, specify one and only one database. For PostgreSQL |
| 400 | # instances, you can specify only one table. |
| 401 | "A String", |
| 402 | ], |
| 403 | "schemaOnly": True or False, # Export only schemas. |
| 404 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 405 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 406 | # If set to <code>1</code>, the dump file includes |
| 407 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 408 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 409 | # a SQL comment, and has no effect. |
| 410 | # All other values are ignored. |
| 411 | }, |
| 412 | }, |
| 413 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 414 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 415 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 416 | # stored. The URI is in the form <code>gs: |
| 417 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 418 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 419 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 420 | # // compressed. |
| 421 | "csvExportOptions": { # Options for exporting data as CSV. |
| 422 | "selectQuery": "A String", # The select query used to extract the data. |
| 423 | }, |
| 424 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 425 | }, |
| 426 | "targetId": "A String", # Name of the database instance related to this operation. |
| 427 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 428 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 429 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 430 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 431 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 432 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 433 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 434 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 435 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 436 | }</pre> |
| 437 | </div> |
| 438 | |
| 439 | <div class="method"> |
| 440 | <code class="details" id="delete">delete(project, instance, x__xgafv=None)</code> |
| 441 | <pre>Deletes a Cloud SQL instance. |
| 442 | |
| 443 | Args: |
| 444 | project: string, Project ID of the project that contains the instance to be deleted. (required) |
| 445 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 446 | x__xgafv: string, V1 error format. |
| 447 | Allowed values |
| 448 | 1 - v1 error format |
| 449 | 2 - v2 error format |
| 450 | |
| 451 | Returns: |
| 452 | An object of the form: |
| 453 | |
| 454 | { # An Operation resource.&nbsp;For successful operations that return an |
| 455 | # Operation resource, only the fields relevant to the operation are populated |
| 456 | # in the resource. |
| 457 | "user": "A String", # The email address of the user who initiated this operation. |
| 458 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 459 | "selfLink": "A String", # The URI of this resource. |
| 460 | "targetLink": "A String", |
| 461 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 462 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 463 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 464 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 465 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 466 | # <code>DELETE_DATABASE</code> . |
| 467 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 468 | # populated. |
| 469 | "errors": [ # The list of errors encountered while processing this operation. |
| 470 | { # Database instance operation error. |
| 471 | "code": "A String", # Identifies the specific error that occurred. |
| 472 | "message": "A String", # Additional information about the error encountered. |
| 473 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 474 | }, |
| 475 | ], |
| 476 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 477 | }, |
| 478 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 479 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 480 | "csvImportOptions": { # Options for importing data as CSV. |
| 481 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 482 | # of the database table are loaded with CSV data. |
| 483 | "A String", |
| 484 | ], |
| 485 | "table": "A String", # The table to which CSV data is imported. |
| 486 | }, |
| 487 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 488 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 489 | # <code>SQL</code>, this field is required only if the import file does not |
| 490 | # specify a database, and is overridden by any database specification in the |
| 491 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 492 | # must be specified. |
| 493 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 494 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 495 | "encryptionOptions": { |
| 496 | "pvkPassword": "A String", # Password that encrypts the private key |
| 497 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 498 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 499 | # write permissions to the bucket and read access to the file. |
| 500 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 501 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 502 | # write permissions to the bucket and read access to the file. |
| 503 | }, |
| 504 | }, |
| 505 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 506 | # <code>gs: |
| 507 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 508 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 509 | # // write permissions to the bucket and read access to the file. |
| 510 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 511 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 512 | }, |
| 513 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 514 | # <code>RUNNING</code>, <code>DONE</code>, |
| 515 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 516 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 517 | # identifier to retrieve the Operations resource that has information about |
| 518 | # the operation. |
| 519 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 520 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 521 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 522 | # databases are exported, except for the <code>mysql</code> system database. |
| 523 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 524 | # either by using this property or by using the |
| 525 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 526 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 527 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 528 | # this database must match the one specified in the |
| 529 | # <code>csvExportOptions.selectQuery</code> property. |
| 530 | "A String", |
| 531 | ], |
| 532 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 533 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 534 | # you specify tables, specify one and only one database. For PostgreSQL |
| 535 | # instances, you can specify only one table. |
| 536 | "A String", |
| 537 | ], |
| 538 | "schemaOnly": True or False, # Export only schemas. |
| 539 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 540 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 541 | # If set to <code>1</code>, the dump file includes |
| 542 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 543 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 544 | # a SQL comment, and has no effect. |
| 545 | # All other values are ignored. |
| 546 | }, |
| 547 | }, |
| 548 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 549 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 550 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 551 | # stored. The URI is in the form <code>gs: |
| 552 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 553 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 554 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 555 | # // compressed. |
| 556 | "csvExportOptions": { # Options for exporting data as CSV. |
| 557 | "selectQuery": "A String", # The select query used to extract the data. |
| 558 | }, |
| 559 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 560 | }, |
| 561 | "targetId": "A String", # Name of the database instance related to this operation. |
| 562 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 563 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 564 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 565 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 566 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 567 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 568 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 569 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 570 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 571 | }</pre> |
| 572 | </div> |
| 573 | |
| 574 | <div class="method"> |
| 575 | <code class="details" id="demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</code> |
| 576 | <pre>Demotes the stand-alone instance to be a Cloud SQL read replica for an |
| 577 | external database server. |
| 578 | |
| 579 | Args: |
| 580 | project: string, ID of the project that contains the instance. (required) |
| 581 | instance: string, Cloud SQL instance name. (required) |
| 582 | body: object, The request body. |
| 583 | The object takes the form of: |
| 584 | |
| 585 | { # Database demote master request. |
| 586 | "demoteMasterContext": { # Database instance demote master context. # Contains details about the demoteMaster operation. |
| 587 | "replicaConfiguration": { # Read-replica configuration for connecting to the on-premises master. # Configuration specific to read-replicas replicating from the on-premises |
| 588 | # master. |
| 589 | "kind": "A String", # This is always <code>sql#demoteMasterConfiguration</code>. |
| 590 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises |
| 591 | # master. Replication configuration information such as the username, |
| 592 | # password, certificates, and keys are not stored in the instance metadata. |
| 593 | # The configuration information is used only to set up the replication |
| 594 | # connection and is stored by MySQL in a file named <code>master.info</code> |
| 595 | # in the data directory. |
| 596 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 597 | "username": "A String", # The username for the replication connection. |
| 598 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 599 | "kind": "A String", # This is always <code>sql#demoteMasterMysqlReplicaConfiguration</code>. |
| 600 | "password": "A String", # The password for the replication connection. |
| 601 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 602 | # is encoded in the client's certificate. The format of the slave's private |
| 603 | # key can be either PKCS #1 or PKCS #8. |
| 604 | }, |
| 605 | }, |
| 606 | "kind": "A String", # This is always <code>sql#demoteMasterContext</code>. |
| 607 | "masterInstanceName": "A String", # The name of the instance which will act as on-premises master in the |
| 608 | # replication setup. |
| 609 | "verifyGtidConsistency": True or False, # Verify GTID consistency for demote operation. Default value: |
| 610 | # <code>True</code>. Second Generation instances only. Setting this flag to |
| 611 | # false enables you to bypass GTID consistency check between on-premises |
| 612 | # master and Cloud SQL instance during the demotion operation but also |
| 613 | # exposes you to the risk of future replication failures. Change the value |
| 614 | # only if you know the reason for the GTID divergence and are confident that |
| 615 | # doing so will not cause any replication issues. |
| 616 | }, |
| 617 | } |
| 618 | |
| 619 | x__xgafv: string, V1 error format. |
| 620 | Allowed values |
| 621 | 1 - v1 error format |
| 622 | 2 - v2 error format |
| 623 | |
| 624 | Returns: |
| 625 | An object of the form: |
| 626 | |
| 627 | { # An Operation resource.&nbsp;For successful operations that return an |
| 628 | # Operation resource, only the fields relevant to the operation are populated |
| 629 | # in the resource. |
| 630 | "user": "A String", # The email address of the user who initiated this operation. |
| 631 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 632 | "selfLink": "A String", # The URI of this resource. |
| 633 | "targetLink": "A String", |
| 634 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 635 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 636 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 637 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 638 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 639 | # <code>DELETE_DATABASE</code> . |
| 640 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 641 | # populated. |
| 642 | "errors": [ # The list of errors encountered while processing this operation. |
| 643 | { # Database instance operation error. |
| 644 | "code": "A String", # Identifies the specific error that occurred. |
| 645 | "message": "A String", # Additional information about the error encountered. |
| 646 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 647 | }, |
| 648 | ], |
| 649 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 650 | }, |
| 651 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 652 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 653 | "csvImportOptions": { # Options for importing data as CSV. |
| 654 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 655 | # of the database table are loaded with CSV data. |
| 656 | "A String", |
| 657 | ], |
| 658 | "table": "A String", # The table to which CSV data is imported. |
| 659 | }, |
| 660 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 661 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 662 | # <code>SQL</code>, this field is required only if the import file does not |
| 663 | # specify a database, and is overridden by any database specification in the |
| 664 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 665 | # must be specified. |
| 666 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 667 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 668 | "encryptionOptions": { |
| 669 | "pvkPassword": "A String", # Password that encrypts the private key |
| 670 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 671 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 672 | # write permissions to the bucket and read access to the file. |
| 673 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 674 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 675 | # write permissions to the bucket and read access to the file. |
| 676 | }, |
| 677 | }, |
| 678 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 679 | # <code>gs: |
| 680 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 681 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 682 | # // write permissions to the bucket and read access to the file. |
| 683 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 684 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 685 | }, |
| 686 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 687 | # <code>RUNNING</code>, <code>DONE</code>, |
| 688 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 689 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 690 | # identifier to retrieve the Operations resource that has information about |
| 691 | # the operation. |
| 692 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 693 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 694 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 695 | # databases are exported, except for the <code>mysql</code> system database. |
| 696 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 697 | # either by using this property or by using the |
| 698 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 699 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 700 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 701 | # this database must match the one specified in the |
| 702 | # <code>csvExportOptions.selectQuery</code> property. |
| 703 | "A String", |
| 704 | ], |
| 705 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 706 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 707 | # you specify tables, specify one and only one database. For PostgreSQL |
| 708 | # instances, you can specify only one table. |
| 709 | "A String", |
| 710 | ], |
| 711 | "schemaOnly": True or False, # Export only schemas. |
| 712 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 713 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 714 | # If set to <code>1</code>, the dump file includes |
| 715 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 716 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 717 | # a SQL comment, and has no effect. |
| 718 | # All other values are ignored. |
| 719 | }, |
| 720 | }, |
| 721 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 722 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 723 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 724 | # stored. The URI is in the form <code>gs: |
| 725 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 726 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 727 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 728 | # // compressed. |
| 729 | "csvExportOptions": { # Options for exporting data as CSV. |
| 730 | "selectQuery": "A String", # The select query used to extract the data. |
| 731 | }, |
| 732 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 733 | }, |
| 734 | "targetId": "A String", # Name of the database instance related to this operation. |
| 735 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 736 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 737 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 738 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 739 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 740 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 741 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 742 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 743 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 744 | }</pre> |
| 745 | </div> |
| 746 | |
| 747 | <div class="method"> |
| 748 | <code class="details" id="export">export(project, instance, body=None, x__xgafv=None)</code> |
| 749 | <pre>Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL |
| 750 | dump or CSV file. |
| 751 | |
| 752 | Args: |
| 753 | project: string, Project ID of the project that contains the instance to be exported. (required) |
| 754 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 755 | body: object, The request body. |
| 756 | The object takes the form of: |
| 757 | |
| 758 | { # Database instance export request. |
| 759 | "exportContext": { # Database instance export context. # Contains details about the export operation. |
| 760 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 761 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 762 | # databases are exported, except for the <code>mysql</code> system database. |
| 763 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 764 | # either by using this property or by using the |
| 765 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 766 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 767 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 768 | # this database must match the one specified in the |
| 769 | # <code>csvExportOptions.selectQuery</code> property. |
| 770 | "A String", |
| 771 | ], |
| 772 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 773 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 774 | # you specify tables, specify one and only one database. For PostgreSQL |
| 775 | # instances, you can specify only one table. |
| 776 | "A String", |
| 777 | ], |
| 778 | "schemaOnly": True or False, # Export only schemas. |
| 779 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 780 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 781 | # If set to <code>1</code>, the dump file includes |
| 782 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 783 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 784 | # a SQL comment, and has no effect. |
| 785 | # All other values are ignored. |
| 786 | }, |
| 787 | }, |
| 788 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 789 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 790 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 791 | # stored. The URI is in the form <code>gs: |
| 792 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 793 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 794 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 795 | # // compressed. |
| 796 | "csvExportOptions": { # Options for exporting data as CSV. |
| 797 | "selectQuery": "A String", # The select query used to extract the data. |
| 798 | }, |
| 799 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 800 | }, |
| 801 | } |
| 802 | |
| 803 | x__xgafv: string, V1 error format. |
| 804 | Allowed values |
| 805 | 1 - v1 error format |
| 806 | 2 - v2 error format |
| 807 | |
| 808 | Returns: |
| 809 | An object of the form: |
| 810 | |
| 811 | { # An Operation resource.&nbsp;For successful operations that return an |
| 812 | # Operation resource, only the fields relevant to the operation are populated |
| 813 | # in the resource. |
| 814 | "user": "A String", # The email address of the user who initiated this operation. |
| 815 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 816 | "selfLink": "A String", # The URI of this resource. |
| 817 | "targetLink": "A String", |
| 818 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 819 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 820 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 821 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 822 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 823 | # <code>DELETE_DATABASE</code> . |
| 824 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 825 | # populated. |
| 826 | "errors": [ # The list of errors encountered while processing this operation. |
| 827 | { # Database instance operation error. |
| 828 | "code": "A String", # Identifies the specific error that occurred. |
| 829 | "message": "A String", # Additional information about the error encountered. |
| 830 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 831 | }, |
| 832 | ], |
| 833 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 834 | }, |
| 835 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 836 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 837 | "csvImportOptions": { # Options for importing data as CSV. |
| 838 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 839 | # of the database table are loaded with CSV data. |
| 840 | "A String", |
| 841 | ], |
| 842 | "table": "A String", # The table to which CSV data is imported. |
| 843 | }, |
| 844 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 845 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 846 | # <code>SQL</code>, this field is required only if the import file does not |
| 847 | # specify a database, and is overridden by any database specification in the |
| 848 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 849 | # must be specified. |
| 850 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 851 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 852 | "encryptionOptions": { |
| 853 | "pvkPassword": "A String", # Password that encrypts the private key |
| 854 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 855 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 856 | # write permissions to the bucket and read access to the file. |
| 857 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 858 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 859 | # write permissions to the bucket and read access to the file. |
| 860 | }, |
| 861 | }, |
| 862 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 863 | # <code>gs: |
| 864 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 865 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 866 | # // write permissions to the bucket and read access to the file. |
| 867 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 868 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 869 | }, |
| 870 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 871 | # <code>RUNNING</code>, <code>DONE</code>, |
| 872 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 873 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 874 | # identifier to retrieve the Operations resource that has information about |
| 875 | # the operation. |
| 876 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 877 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 878 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 879 | # databases are exported, except for the <code>mysql</code> system database. |
| 880 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 881 | # either by using this property or by using the |
| 882 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 883 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 884 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 885 | # this database must match the one specified in the |
| 886 | # <code>csvExportOptions.selectQuery</code> property. |
| 887 | "A String", |
| 888 | ], |
| 889 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 890 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 891 | # you specify tables, specify one and only one database. For PostgreSQL |
| 892 | # instances, you can specify only one table. |
| 893 | "A String", |
| 894 | ], |
| 895 | "schemaOnly": True or False, # Export only schemas. |
| 896 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 897 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 898 | # If set to <code>1</code>, the dump file includes |
| 899 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 900 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 901 | # a SQL comment, and has no effect. |
| 902 | # All other values are ignored. |
| 903 | }, |
| 904 | }, |
| 905 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 906 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 907 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 908 | # stored. The URI is in the form <code>gs: |
| 909 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 910 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 911 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 912 | # // compressed. |
| 913 | "csvExportOptions": { # Options for exporting data as CSV. |
| 914 | "selectQuery": "A String", # The select query used to extract the data. |
| 915 | }, |
| 916 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 917 | }, |
| 918 | "targetId": "A String", # Name of the database instance related to this operation. |
| 919 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 920 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 921 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 922 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 923 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 924 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 925 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 926 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 927 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 928 | }</pre> |
| 929 | </div> |
| 930 | |
| 931 | <div class="method"> |
| 932 | <code class="details" id="failover">failover(project, instance, body=None, x__xgafv=None)</code> |
| 933 | <pre>Failover the instance to its failover replica instance. Using this |
| 934 | operation might cause your instance to restart. |
| 935 | |
| 936 | Args: |
| 937 | project: string, ID of the project that contains the read replica. (required) |
| 938 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 939 | body: object, The request body. |
| 940 | The object takes the form of: |
| 941 | |
| 942 | { # Instance failover request. |
| 943 | "failoverContext": { # Database instance failover context. # Failover Context. |
| 944 | "settingsVersion": "A String", # The current settings version of this instance. Request will be rejected if |
| 945 | # this version doesn't match the current settings version. |
| 946 | "kind": "A String", # This is always <code>sql#failoverContext</code>. |
| 947 | }, |
| 948 | } |
| 949 | |
| 950 | x__xgafv: string, V1 error format. |
| 951 | Allowed values |
| 952 | 1 - v1 error format |
| 953 | 2 - v2 error format |
| 954 | |
| 955 | Returns: |
| 956 | An object of the form: |
| 957 | |
| 958 | { # An Operation resource.&nbsp;For successful operations that return an |
| 959 | # Operation resource, only the fields relevant to the operation are populated |
| 960 | # in the resource. |
| 961 | "user": "A String", # The email address of the user who initiated this operation. |
| 962 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 963 | "selfLink": "A String", # The URI of this resource. |
| 964 | "targetLink": "A String", |
| 965 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 966 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 967 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 968 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 969 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 970 | # <code>DELETE_DATABASE</code> . |
| 971 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 972 | # populated. |
| 973 | "errors": [ # The list of errors encountered while processing this operation. |
| 974 | { # Database instance operation error. |
| 975 | "code": "A String", # Identifies the specific error that occurred. |
| 976 | "message": "A String", # Additional information about the error encountered. |
| 977 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 978 | }, |
| 979 | ], |
| 980 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 981 | }, |
| 982 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 983 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 984 | "csvImportOptions": { # Options for importing data as CSV. |
| 985 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 986 | # of the database table are loaded with CSV data. |
| 987 | "A String", |
| 988 | ], |
| 989 | "table": "A String", # The table to which CSV data is imported. |
| 990 | }, |
| 991 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 992 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 993 | # <code>SQL</code>, this field is required only if the import file does not |
| 994 | # specify a database, and is overridden by any database specification in the |
| 995 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 996 | # must be specified. |
| 997 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 998 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 999 | "encryptionOptions": { |
| 1000 | "pvkPassword": "A String", # Password that encrypts the private key |
| 1001 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 1002 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 1003 | # write permissions to the bucket and read access to the file. |
| 1004 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 1005 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 1006 | # write permissions to the bucket and read access to the file. |
| 1007 | }, |
| 1008 | }, |
| 1009 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 1010 | # <code>gs: |
| 1011 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 1012 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 1013 | # // write permissions to the bucket and read access to the file. |
| 1014 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1015 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 1016 | }, |
| 1017 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 1018 | # <code>RUNNING</code>, <code>DONE</code>, |
| 1019 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 1020 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 1021 | # identifier to retrieve the Operations resource that has information about |
| 1022 | # the operation. |
| 1023 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 1024 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 1025 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 1026 | # databases are exported, except for the <code>mysql</code> system database. |
| 1027 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 1028 | # either by using this property or by using the |
| 1029 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 1030 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 1031 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 1032 | # this database must match the one specified in the |
| 1033 | # <code>csvExportOptions.selectQuery</code> property. |
| 1034 | "A String", |
| 1035 | ], |
| 1036 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 1037 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 1038 | # you specify tables, specify one and only one database. For PostgreSQL |
| 1039 | # instances, you can specify only one table. |
| 1040 | "A String", |
| 1041 | ], |
| 1042 | "schemaOnly": True or False, # Export only schemas. |
| 1043 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 1044 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 1045 | # If set to <code>1</code>, the dump file includes |
| 1046 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 1047 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 1048 | # a SQL comment, and has no effect. |
| 1049 | # All other values are ignored. |
| 1050 | }, |
| 1051 | }, |
| 1052 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1053 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 1054 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 1055 | # stored. The URI is in the form <code>gs: |
| 1056 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 1057 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 1058 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 1059 | # // compressed. |
| 1060 | "csvExportOptions": { # Options for exporting data as CSV. |
| 1061 | "selectQuery": "A String", # The select query used to extract the data. |
| 1062 | }, |
| 1063 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 1064 | }, |
| 1065 | "targetId": "A String", # Name of the database instance related to this operation. |
| 1066 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 1067 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1068 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1069 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 1070 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1071 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1072 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 1073 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1074 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1075 | }</pre> |
| 1076 | </div> |
| 1077 | |
| 1078 | <div class="method"> |
| 1079 | <code class="details" id="get">get(project, instance, x__xgafv=None)</code> |
| 1080 | <pre>Retrieves a resource containing information about a Cloud SQL instance. |
| 1081 | |
| 1082 | Args: |
| 1083 | project: string, Project ID of the project that contains the instance. (required) |
| 1084 | instance: string, Database instance ID. This does not include the project ID. (required) |
| 1085 | x__xgafv: string, V1 error format. |
| 1086 | Allowed values |
| 1087 | 1 - v1 error format |
| 1088 | 2 - v2 error format |
| 1089 | |
| 1090 | Returns: |
| 1091 | An object of the form: |
| 1092 | |
| 1093 | { # A Cloud SQL instance resource. |
| 1094 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only |
| 1095 | # to First Generation instances. |
| 1096 | "selfLink": "A String", # The URI of this resource. |
| 1097 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. |
| 1098 | # Applies only to Second Generation instances. |
| 1099 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 1100 | "kind": "A String", # This is always <code>sql#diskEncryptionStatus</code>. |
| 1101 | }, |
| 1102 | "kind": "A String", # This is always <code>sql#instance</code>. |
| 1103 | "region": "A String", # The geographical region. Can be <code>us-central</code> |
| 1104 | # (<code>FIRST_GEN</code> instances only), <code>us-central1</code> |
| 1105 | # (<code>SECOND_GEN</code> instances only), <code>asia-east1</code> or |
| 1106 | # <code>europe-west1</code>. Defaults to <code>us-central</code> or |
| 1107 | # <code>us-central1</code> depending on the instance type (First Generation |
| 1108 | # or Second Generation). The region can not be changed after instance |
| 1109 | # creation. |
| 1110 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the |
| 1111 | # following. <br><code>RUNNABLE</code>: The instance is running, or is ready |
| 1112 | # to run when accessed. <br><code>SUSPENDED</code>: The instance is not |
| 1113 | # available, for example due to problems with billing. |
| 1114 | # <br><code>PENDING_CREATE</code>: The instance is being created. |
| 1115 | # <br><code>MAINTENANCE</code>: The instance is down for maintenance. |
| 1116 | # <br><code>FAILED</code>: The instance creation failed. |
| 1117 | # <br><code>UNKNOWN_STATE</code>: The state of the instance is unknown. |
| 1118 | "backendType": "A String", # <code>FIRST_GEN</code>: First Generation instance. MySQL only. <br |
| 1119 | # /><code>SECOND_GEN</code>: Second Generation instance or PostgreSQL |
| 1120 | # instance. <br /><code>EXTERNAL</code>: A database server that is not |
| 1121 | # managed by Google. <br>This property is read-only; use the |
| 1122 | # <code>tier</code> property in the <code>settings</code> object to determine |
| 1123 | # the database type and Second or First Generation. |
| 1124 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 1125 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 1126 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 1127 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 1128 | "username": "A String", # The username for connecting to on-premises instance. |
| 1129 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1130 | "kind": "A String", # This is always <code>sql#onPremisesConfiguration</code>. |
| 1131 | "password": "A String", # The password for connecting to on-premises instance. |
| 1132 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 1133 | # is encoded in the client's certificate. |
| 1134 | }, |
| 1135 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google |
| 1136 | # apps domain is prefixed if applicable. |
| 1137 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property |
| 1138 | # is applicable only to Second Generation instances. |
| 1139 | "databaseVersion": "A String", # The database engine type and version. The <code>databaseVersion</code> |
| 1140 | # field can not be changed after instance creation. MySQL Second Generation |
| 1141 | # instances: <code>MYSQL_5_7</code> (default) or <code>MYSQL_5_6</code>. |
| 1142 | # PostgreSQL instances: <code>POSTGRES_9_6</code> (default) or |
| 1143 | # <code>POSTGRES_11 Beta</code> MySQL First Generation |
| 1144 | # instances: <code>MYSQL_5_6</code> (default) or <code>MYSQL_5_5</code> |
| 1145 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 1146 | "A String", |
| 1147 | ], |
| 1148 | "settings": { # Database instance settings. # The user settings. |
| 1149 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the |
| 1150 | # instance IP and manage which external networks can connect to the instance. |
| 1151 | # The IPv4 address cannot be disabled for Second Generation instances. |
| 1152 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is |
| 1153 | # accessible for private IP. For example, |
| 1154 | # <code>/projects/myProject/global/networks/default</code>. This setting can |
| 1155 | # be updated, but it cannot be removed after it is set. |
| 1156 | "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not. |
| 1157 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance |
| 1158 | # using the IP. In <a |
| 1159 | # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation">CIDR |
| 1160 | # notation</a>, also known as 'slash' notation (e.g. |
| 1161 | # <code>192.168.100.0/24</code>). |
| 1162 | { # An entry for an Access Control list. |
| 1163 | "value": "A String", # The whitelisted value for the access control list. |
| 1164 | "expirationTime": "A String", # The time when this access control entry expires in <a |
| 1165 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1166 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1167 | "name": "A String", # Optional. A label to identify this entry. |
| 1168 | "kind": "A String", # This is always <code>sql#aclEntry</code>. |
| 1169 | }, |
| 1170 | ], |
| 1171 | "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not. |
| 1172 | }, |
| 1173 | "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values: |
| 1174 | # <br><code>ZONAL</code>: The instance serves data from only one zone. |
| 1175 | # Outages in that zone affect data accessibility. <br><code>REGIONAL</code>: |
| 1176 | # The instance can serve data from more than one zone in a region (it is |
| 1177 | # highly available). <br>For more information, see <a |
| 1178 | # href="https://cloud.google.com/sql/docs/postgres/high-availability">Overview |
| 1179 | # of the High Availability Configuration</a>. |
| 1180 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update |
| 1181 | # method to make sure concurrent updates are handled properly. During update, |
| 1182 | # use the most recent settingsVersion value for this instance and do not try |
| 1183 | # to update this value. |
| 1184 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 1185 | { # Database flags for Cloud SQL instances. |
| 1186 | "value": "A String", # The value of the flag. Booleans should be set to <code>on</code> for true |
| 1187 | # and <code>off</code> for false. This field must be omitted if the flag |
| 1188 | # doesn't take a value. |
| 1189 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so |
| 1190 | # include both server options and system variables for MySQL. Flags should be |
| 1191 | # specified with underscores, not hyphens. For more information, see <a |
| 1192 | # href="/sql/docs/mysql/flags">Configuring Database Flags</a> in the Cloud |
| 1193 | # SQL documentation. |
| 1194 | }, |
| 1195 | ], |
| 1196 | "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance |
| 1197 | # can be restarted for maintenance purposes. Not used for First Generation |
| 1198 | # instances. |
| 1199 | # preferably be restarted for system maintenance purposes. |
| 1200 | "updateTrack": "A String", # Maintenance timing setting: <code>canary</code> (Earlier) or |
| 1201 | # <code>stable</code> (Later). <br /><a |
| 1202 | # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"> |
| 1203 | # Learn more</a>. |
| 1204 | "hour": 42, # hour of day - 0 to 23. |
| 1205 | "day": 42, # day of week (1-7), starting on Monday. |
| 1206 | "kind": "A String", # This is always <code>sql#maintenanceWindow</code>. |
| 1207 | }, |
| 1208 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either <code>PER_USE</code> |
| 1209 | # or <code>PACKAGE</code>. Only <code>PER_USE</code> is supported for Second |
| 1210 | # Generation instances. |
| 1211 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is |
| 1212 | # true. Not used for First Generation instances. |
| 1213 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. |
| 1214 | # The default value is 0, which specifies that there is no limit. Not used |
| 1215 | # for First Generation instances. |
| 1216 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation |
| 1217 | # instances only. |
| 1218 | "A String", |
| 1219 | ], |
| 1220 | "tier": "A String", # The tier (or machine type) for this instance, for example |
| 1221 | # <code>db-n1-standard-1</code> (MySQL instances) or |
| 1222 | # <code>db-custom-1-3840</code> (PostgreSQL instances). For MySQL instances, |
| 1223 | # this property determines whether the instance is First or Second |
| 1224 | # Generation. For more information, see <a |
| 1225 | # href="/sql/docs/db_path/instance-settings">Instance Settings</a>. |
| 1226 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used |
| 1227 | # for First Generation instances. |
| 1228 | "dataDiskType": "A String", # The type of data disk: <code>PD_SSD</code> (default) or |
| 1229 | # <code>PD_HDD</code>. Not used for First Generation instances. |
| 1230 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 1231 | # replication is enabled or not. |
| 1232 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 1233 | # database flags for crash-safe replication are enabled. This property is |
| 1234 | # only applicable to First Generation instances. |
| 1235 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 1236 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 1237 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 |
| 1238 | # hour format - <code>HH:MM</code>. |
| 1239 | "kind": "A String", # This is always <code>sql#backupConfiguration</code>. |
| 1240 | "enabled": True or False, # Whether this configuration is enabled. |
| 1241 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is |
| 1242 | # disabled, binarylog must be disabled as well. |
| 1243 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 1244 | "location": "A String", # Location of the backup |
| 1245 | }, |
| 1246 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a |
| 1247 | # single key value pair. |
| 1248 | "a_key": "A String", |
| 1249 | }, |
| 1250 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as |
| 1251 | # near as possible to either an App Engine app or Compute Engine zone for |
| 1252 | # better performance. App Engine co-location is only applicable to First |
| 1253 | # Generation instances. |
| 1254 | # preferably be located, either in a specific Compute Engine zone, or |
| 1255 | # co-located with an App Engine application. Note that if the preferred |
| 1256 | # location is not available, the instance will be located as close as possible |
| 1257 | # within the region. Only one location may be specified. |
| 1258 | "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the |
| 1259 | # Cloud SQL instance. |
| 1260 | "kind": "A String", # This is always <code>sql#locationPreference</code>. |
| 1261 | "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b, |
| 1262 | # etc.). |
| 1263 | }, |
| 1264 | "kind": "A String", # This is always <code>sql#settings</code>. |
| 1265 | "replicationType": "A String", # The type of replication this instance uses. This can be either |
| 1266 | # <code>ASYNCHRONOUS</code> or <code>SYNCHRONOUS</code>. This property is |
| 1267 | # only applicable to First Generation instances. |
| 1268 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is |
| 1269 | # applicable only when the instance state is <code>RUNNABLE</code>. Valid |
| 1270 | # values: <br><code>ALWAYS</code>: The instance is on, and remains so even in |
| 1271 | # the absence of connection requests. <br><code>NEVER</code>: The instance is |
| 1272 | # off; it is not activated, even if a connection request arrives. |
| 1273 | # <br><code>ON_DEMAND</code>: First Generation instances only. The instance |
| 1274 | # responds to incoming requests, and turns itself off when not in use. |
| 1275 | # Instances with <code>PER_USE</code> pricing turn off after 15 minutes of |
| 1276 | # inactivity. Instances with <code>PER_PACKAGE</code> pricing turn off after |
| 1277 | # 12 hours of inactivity. |
| 1278 | }, |
| 1279 | "replicaNames": [ # The replicas of the instance. |
| 1280 | "A String", |
| 1281 | ], |
| 1282 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. |
| 1283 | # Applies only to Second Generation instances. |
| 1284 | "kind": "A String", # This is always <code>sql#diskEncryptionConfiguration</code>. |
| 1285 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 1286 | }, |
| 1287 | "rootPassword": "A String", # Initial root password. Use only on creation. |
| 1288 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 1289 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 1290 | "canDefer": True or False, |
| 1291 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 1292 | }, |
| 1293 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 1294 | # API. Use the <code>settings.settingsVersion</code> field instead. |
| 1295 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 1296 | "selfLink": "A String", # The URI of this resource. |
| 1297 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 1298 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1299 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1300 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 1301 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 1302 | "cert": "A String", # PEM representation. |
| 1303 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 1304 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 1305 | "createTime": "A String", # The time when the certificate was created in <a |
| 1306 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1307 | # <code>2012-11-15T16:19:00.094Z</code> |
| 1308 | "instance": "A String", # Name of the database instance. |
| 1309 | }, |
| 1310 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 1311 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 1312 | "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup. |
| 1313 | "instanceType": "A String", # The instance type. This can be one of the following. |
| 1314 | # <br><code>CLOUD_SQL_INSTANCE</code>: A Cloud SQL instance that is not |
| 1315 | # replicating from a master. <br><code>ON_PREMISES_INSTANCE</code>: An |
| 1316 | # instance running on the |
| 1317 | # customer's premises. <br><code>READ_REPLICA_INSTANCE</code>: A Cloud SQL |
| 1318 | # instance configured as a read-replica. |
| 1319 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This |
| 1320 | # value could be different from the zone that was specified when the instance |
| 1321 | # was created if the instance has failed over to its secondary zone. |
| 1322 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been |
| 1323 | # deprecated. Users should use the |
| 1324 | # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud |
| 1325 | # Monitoring API instead. Please see <a |
| 1326 | # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ">this |
| 1327 | # announcement</a> for details. |
| 1328 | "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas. |
| 1329 | "kind": "A String", # This is always <code>sql#replicaConfiguration</code>. |
| 1330 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises |
| 1331 | # master. Replication configuration information such as the username, |
| 1332 | # password, certificates, and keys are not stored in the instance metadata. |
| 1333 | # The configuration information is used only to set up the replication |
| 1334 | # connection and is stored by MySQL in a file named <code>master.info</code> |
| 1335 | # in the data directory. |
| 1336 | "kind": "A String", # This is always <code>sql#mysqlReplicaConfiguration</code>. |
| 1337 | "password": "A String", # The password for the replication connection. |
| 1338 | "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate |
| 1339 | # that it sends during the SSL handshake. |
| 1340 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 1341 | # is encoded in the client's certificate. |
| 1342 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 1343 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 1344 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 1345 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave |
| 1346 | # instance is to be created. The URI is in the form gs: |
| 1347 | # //bucketName/fileName. Compressed gzip files (.gz) are also supported. |
| 1348 | # // Dumps should have the binlog co-ordinates from which replication should |
| 1349 | # // begin. This can be accomplished by setting --master-data to 1 when using |
| 1350 | # // mysqldump. |
| 1351 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 1352 | "username": "A String", # The username for the replication connection. |
| 1353 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1354 | }, |
| 1355 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to |
| 1356 | # <code>true</code> the replica will be designated as a failover replica. In |
| 1357 | # case the master instance fails, the replica instance will be promoted as |
| 1358 | # the new master instance. <p>Only one replica can be specified as failover |
| 1359 | # target, and the replica has to be in different zone with the master |
| 1360 | # instance. |
| 1361 | }, |
| 1362 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 1363 | "failoverReplica": { # The name and status of the failover replica. This property is applicable |
| 1364 | # only to Second Generation instances. |
| 1365 | "available": True or False, # The availability status of the failover replica. A false status indicates |
| 1366 | # that the failover replica is out of sync. The master can only failover to |
| 1367 | # the failover replica when the status is true. |
| 1368 | "name": "A String", # The name of the failover replica. If specified at instance creation, a |
| 1369 | # failover replica is created for the instance. The name |
| 1370 | # doesn't include the project ID. This property is applicable only to |
| 1371 | # Second Generation instances. |
| 1372 | }, |
| 1373 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 1374 | { # Database instance IP Mapping. |
| 1375 | "timeToRetire": "A String", # The due time for this IP to be retired in <a |
| 1376 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1377 | # <code>2012-11-15T16:19:00.094Z</code>. This field is only available when |
| 1378 | # the IP is scheduled to be retired. |
| 1379 | "type": "A String", # The type of this IP address. A <code>PRIMARY</code> address is a public |
| 1380 | # address that can accept incoming connections. A <code>PRIVATE</code> |
| 1381 | # address is a private address that can accept incoming connections. An |
| 1382 | # <code>OUTGOING</code> address is the source address of connections |
| 1383 | # originating from the instance, if supported. |
| 1384 | "ipAddress": "A String", # The IP address assigned. |
| 1385 | }, |
| 1386 | ], |
| 1387 | }</pre> |
| 1388 | </div> |
| 1389 | |
| 1390 | <div class="method"> |
| 1391 | <code class="details" id="import_">import_(project, instance, body=None, x__xgafv=None)</code> |
| 1392 | <pre>Imports data into a Cloud SQL instance from a SQL dump or CSV file in |
| 1393 | Cloud Storage. |
| 1394 | |
| 1395 | Args: |
| 1396 | project: string, Project ID of the project that contains the instance. (required) |
| 1397 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 1398 | body: object, The request body. |
| 1399 | The object takes the form of: |
| 1400 | |
| 1401 | { # Database instance import request. |
| 1402 | "importContext": { # Database instance import context. # Contains details about the import operation. |
| 1403 | "csvImportOptions": { # Options for importing data as CSV. |
| 1404 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 1405 | # of the database table are loaded with CSV data. |
| 1406 | "A String", |
| 1407 | ], |
| 1408 | "table": "A String", # The table to which CSV data is imported. |
| 1409 | }, |
| 1410 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 1411 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 1412 | # <code>SQL</code>, this field is required only if the import file does not |
| 1413 | # specify a database, and is overridden by any database specification in the |
| 1414 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 1415 | # must be specified. |
| 1416 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1417 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1418 | "encryptionOptions": { |
| 1419 | "pvkPassword": "A String", # Password that encrypts the private key |
| 1420 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 1421 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 1422 | # write permissions to the bucket and read access to the file. |
| 1423 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 1424 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 1425 | # write permissions to the bucket and read access to the file. |
| 1426 | }, |
| 1427 | }, |
| 1428 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 1429 | # <code>gs: |
| 1430 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 1431 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 1432 | # // write permissions to the bucket and read access to the file. |
| 1433 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1434 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 1435 | }, |
| 1436 | } |
| 1437 | |
| 1438 | x__xgafv: string, V1 error format. |
| 1439 | Allowed values |
| 1440 | 1 - v1 error format |
| 1441 | 2 - v2 error format |
| 1442 | |
| 1443 | Returns: |
| 1444 | An object of the form: |
| 1445 | |
| 1446 | { # An Operation resource.&nbsp;For successful operations that return an |
| 1447 | # Operation resource, only the fields relevant to the operation are populated |
| 1448 | # in the resource. |
| 1449 | "user": "A String", # The email address of the user who initiated this operation. |
| 1450 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 1451 | "selfLink": "A String", # The URI of this resource. |
| 1452 | "targetLink": "A String", |
| 1453 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 1454 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 1455 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 1456 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 1457 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 1458 | # <code>DELETE_DATABASE</code> . |
| 1459 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 1460 | # populated. |
| 1461 | "errors": [ # The list of errors encountered while processing this operation. |
| 1462 | { # Database instance operation error. |
| 1463 | "code": "A String", # Identifies the specific error that occurred. |
| 1464 | "message": "A String", # Additional information about the error encountered. |
| 1465 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 1466 | }, |
| 1467 | ], |
| 1468 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 1469 | }, |
| 1470 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 1471 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 1472 | "csvImportOptions": { # Options for importing data as CSV. |
| 1473 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 1474 | # of the database table are loaded with CSV data. |
| 1475 | "A String", |
| 1476 | ], |
| 1477 | "table": "A String", # The table to which CSV data is imported. |
| 1478 | }, |
| 1479 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 1480 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 1481 | # <code>SQL</code>, this field is required only if the import file does not |
| 1482 | # specify a database, and is overridden by any database specification in the |
| 1483 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 1484 | # must be specified. |
| 1485 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1486 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1487 | "encryptionOptions": { |
| 1488 | "pvkPassword": "A String", # Password that encrypts the private key |
| 1489 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 1490 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 1491 | # write permissions to the bucket and read access to the file. |
| 1492 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 1493 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 1494 | # write permissions to the bucket and read access to the file. |
| 1495 | }, |
| 1496 | }, |
| 1497 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 1498 | # <code>gs: |
| 1499 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 1500 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 1501 | # // write permissions to the bucket and read access to the file. |
| 1502 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1503 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 1504 | }, |
| 1505 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 1506 | # <code>RUNNING</code>, <code>DONE</code>, |
| 1507 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 1508 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 1509 | # identifier to retrieve the Operations resource that has information about |
| 1510 | # the operation. |
| 1511 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 1512 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 1513 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 1514 | # databases are exported, except for the <code>mysql</code> system database. |
| 1515 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 1516 | # either by using this property or by using the |
| 1517 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 1518 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 1519 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 1520 | # this database must match the one specified in the |
| 1521 | # <code>csvExportOptions.selectQuery</code> property. |
| 1522 | "A String", |
| 1523 | ], |
| 1524 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 1525 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 1526 | # you specify tables, specify one and only one database. For PostgreSQL |
| 1527 | # instances, you can specify only one table. |
| 1528 | "A String", |
| 1529 | ], |
| 1530 | "schemaOnly": True or False, # Export only schemas. |
| 1531 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 1532 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 1533 | # If set to <code>1</code>, the dump file includes |
| 1534 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 1535 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 1536 | # a SQL comment, and has no effect. |
| 1537 | # All other values are ignored. |
| 1538 | }, |
| 1539 | }, |
| 1540 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1541 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 1542 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 1543 | # stored. The URI is in the form <code>gs: |
| 1544 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 1545 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 1546 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 1547 | # // compressed. |
| 1548 | "csvExportOptions": { # Options for exporting data as CSV. |
| 1549 | "selectQuery": "A String", # The select query used to extract the data. |
| 1550 | }, |
| 1551 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 1552 | }, |
| 1553 | "targetId": "A String", # Name of the database instance related to this operation. |
| 1554 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 1555 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1556 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1557 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 1558 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1559 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1560 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 1561 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1562 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1563 | }</pre> |
| 1564 | </div> |
| 1565 | |
| 1566 | <div class="method"> |
| 1567 | <code class="details" id="insert">insert(project, body=None, x__xgafv=None)</code> |
| 1568 | <pre>Creates a new Cloud SQL instance. |
| 1569 | |
| 1570 | Args: |
| 1571 | project: string, Project ID of the project to which the newly created Cloud SQL instances |
| 1572 | should belong. (required) |
| 1573 | body: object, The request body. |
| 1574 | The object takes the form of: |
| 1575 | |
| 1576 | { # A Cloud SQL instance resource. |
| 1577 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only |
| 1578 | # to First Generation instances. |
| 1579 | "selfLink": "A String", # The URI of this resource. |
| 1580 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. |
| 1581 | # Applies only to Second Generation instances. |
| 1582 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 1583 | "kind": "A String", # This is always <code>sql#diskEncryptionStatus</code>. |
| 1584 | }, |
| 1585 | "kind": "A String", # This is always <code>sql#instance</code>. |
| 1586 | "region": "A String", # The geographical region. Can be <code>us-central</code> |
| 1587 | # (<code>FIRST_GEN</code> instances only), <code>us-central1</code> |
| 1588 | # (<code>SECOND_GEN</code> instances only), <code>asia-east1</code> or |
| 1589 | # <code>europe-west1</code>. Defaults to <code>us-central</code> or |
| 1590 | # <code>us-central1</code> depending on the instance type (First Generation |
| 1591 | # or Second Generation). The region can not be changed after instance |
| 1592 | # creation. |
| 1593 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the |
| 1594 | # following. <br><code>RUNNABLE</code>: The instance is running, or is ready |
| 1595 | # to run when accessed. <br><code>SUSPENDED</code>: The instance is not |
| 1596 | # available, for example due to problems with billing. |
| 1597 | # <br><code>PENDING_CREATE</code>: The instance is being created. |
| 1598 | # <br><code>MAINTENANCE</code>: The instance is down for maintenance. |
| 1599 | # <br><code>FAILED</code>: The instance creation failed. |
| 1600 | # <br><code>UNKNOWN_STATE</code>: The state of the instance is unknown. |
| 1601 | "backendType": "A String", # <code>FIRST_GEN</code>: First Generation instance. MySQL only. <br |
| 1602 | # /><code>SECOND_GEN</code>: Second Generation instance or PostgreSQL |
| 1603 | # instance. <br /><code>EXTERNAL</code>: A database server that is not |
| 1604 | # managed by Google. <br>This property is read-only; use the |
| 1605 | # <code>tier</code> property in the <code>settings</code> object to determine |
| 1606 | # the database type and Second or First Generation. |
| 1607 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 1608 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 1609 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 1610 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 1611 | "username": "A String", # The username for connecting to on-premises instance. |
| 1612 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1613 | "kind": "A String", # This is always <code>sql#onPremisesConfiguration</code>. |
| 1614 | "password": "A String", # The password for connecting to on-premises instance. |
| 1615 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 1616 | # is encoded in the client's certificate. |
| 1617 | }, |
| 1618 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google |
| 1619 | # apps domain is prefixed if applicable. |
| 1620 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property |
| 1621 | # is applicable only to Second Generation instances. |
| 1622 | "databaseVersion": "A String", # The database engine type and version. The <code>databaseVersion</code> |
| 1623 | # field can not be changed after instance creation. MySQL Second Generation |
| 1624 | # instances: <code>MYSQL_5_7</code> (default) or <code>MYSQL_5_6</code>. |
| 1625 | # PostgreSQL instances: <code>POSTGRES_9_6</code> (default) or |
| 1626 | # <code>POSTGRES_11 Beta</code> MySQL First Generation |
| 1627 | # instances: <code>MYSQL_5_6</code> (default) or <code>MYSQL_5_5</code> |
| 1628 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 1629 | "A String", |
| 1630 | ], |
| 1631 | "settings": { # Database instance settings. # The user settings. |
| 1632 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the |
| 1633 | # instance IP and manage which external networks can connect to the instance. |
| 1634 | # The IPv4 address cannot be disabled for Second Generation instances. |
| 1635 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is |
| 1636 | # accessible for private IP. For example, |
| 1637 | # <code>/projects/myProject/global/networks/default</code>. This setting can |
| 1638 | # be updated, but it cannot be removed after it is set. |
| 1639 | "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not. |
| 1640 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance |
| 1641 | # using the IP. In <a |
| 1642 | # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation">CIDR |
| 1643 | # notation</a>, also known as 'slash' notation (e.g. |
| 1644 | # <code>192.168.100.0/24</code>). |
| 1645 | { # An entry for an Access Control list. |
| 1646 | "value": "A String", # The whitelisted value for the access control list. |
| 1647 | "expirationTime": "A String", # The time when this access control entry expires in <a |
| 1648 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1649 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1650 | "name": "A String", # Optional. A label to identify this entry. |
| 1651 | "kind": "A String", # This is always <code>sql#aclEntry</code>. |
| 1652 | }, |
| 1653 | ], |
| 1654 | "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not. |
| 1655 | }, |
| 1656 | "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values: |
| 1657 | # <br><code>ZONAL</code>: The instance serves data from only one zone. |
| 1658 | # Outages in that zone affect data accessibility. <br><code>REGIONAL</code>: |
| 1659 | # The instance can serve data from more than one zone in a region (it is |
| 1660 | # highly available). <br>For more information, see <a |
| 1661 | # href="https://cloud.google.com/sql/docs/postgres/high-availability">Overview |
| 1662 | # of the High Availability Configuration</a>. |
| 1663 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update |
| 1664 | # method to make sure concurrent updates are handled properly. During update, |
| 1665 | # use the most recent settingsVersion value for this instance and do not try |
| 1666 | # to update this value. |
| 1667 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 1668 | { # Database flags for Cloud SQL instances. |
| 1669 | "value": "A String", # The value of the flag. Booleans should be set to <code>on</code> for true |
| 1670 | # and <code>off</code> for false. This field must be omitted if the flag |
| 1671 | # doesn't take a value. |
| 1672 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so |
| 1673 | # include both server options and system variables for MySQL. Flags should be |
| 1674 | # specified with underscores, not hyphens. For more information, see <a |
| 1675 | # href="/sql/docs/mysql/flags">Configuring Database Flags</a> in the Cloud |
| 1676 | # SQL documentation. |
| 1677 | }, |
| 1678 | ], |
| 1679 | "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance |
| 1680 | # can be restarted for maintenance purposes. Not used for First Generation |
| 1681 | # instances. |
| 1682 | # preferably be restarted for system maintenance purposes. |
| 1683 | "updateTrack": "A String", # Maintenance timing setting: <code>canary</code> (Earlier) or |
| 1684 | # <code>stable</code> (Later). <br /><a |
| 1685 | # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"> |
| 1686 | # Learn more</a>. |
| 1687 | "hour": 42, # hour of day - 0 to 23. |
| 1688 | "day": 42, # day of week (1-7), starting on Monday. |
| 1689 | "kind": "A String", # This is always <code>sql#maintenanceWindow</code>. |
| 1690 | }, |
| 1691 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either <code>PER_USE</code> |
| 1692 | # or <code>PACKAGE</code>. Only <code>PER_USE</code> is supported for Second |
| 1693 | # Generation instances. |
| 1694 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is |
| 1695 | # true. Not used for First Generation instances. |
| 1696 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. |
| 1697 | # The default value is 0, which specifies that there is no limit. Not used |
| 1698 | # for First Generation instances. |
| 1699 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation |
| 1700 | # instances only. |
| 1701 | "A String", |
| 1702 | ], |
| 1703 | "tier": "A String", # The tier (or machine type) for this instance, for example |
| 1704 | # <code>db-n1-standard-1</code> (MySQL instances) or |
| 1705 | # <code>db-custom-1-3840</code> (PostgreSQL instances). For MySQL instances, |
| 1706 | # this property determines whether the instance is First or Second |
| 1707 | # Generation. For more information, see <a |
| 1708 | # href="/sql/docs/db_path/instance-settings">Instance Settings</a>. |
| 1709 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used |
| 1710 | # for First Generation instances. |
| 1711 | "dataDiskType": "A String", # The type of data disk: <code>PD_SSD</code> (default) or |
| 1712 | # <code>PD_HDD</code>. Not used for First Generation instances. |
| 1713 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 1714 | # replication is enabled or not. |
| 1715 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 1716 | # database flags for crash-safe replication are enabled. This property is |
| 1717 | # only applicable to First Generation instances. |
| 1718 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 1719 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 1720 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 |
| 1721 | # hour format - <code>HH:MM</code>. |
| 1722 | "kind": "A String", # This is always <code>sql#backupConfiguration</code>. |
| 1723 | "enabled": True or False, # Whether this configuration is enabled. |
| 1724 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is |
| 1725 | # disabled, binarylog must be disabled as well. |
| 1726 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 1727 | "location": "A String", # Location of the backup |
| 1728 | }, |
| 1729 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a |
| 1730 | # single key value pair. |
| 1731 | "a_key": "A String", |
| 1732 | }, |
| 1733 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as |
| 1734 | # near as possible to either an App Engine app or Compute Engine zone for |
| 1735 | # better performance. App Engine co-location is only applicable to First |
| 1736 | # Generation instances. |
| 1737 | # preferably be located, either in a specific Compute Engine zone, or |
| 1738 | # co-located with an App Engine application. Note that if the preferred |
| 1739 | # location is not available, the instance will be located as close as possible |
| 1740 | # within the region. Only one location may be specified. |
| 1741 | "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the |
| 1742 | # Cloud SQL instance. |
| 1743 | "kind": "A String", # This is always <code>sql#locationPreference</code>. |
| 1744 | "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b, |
| 1745 | # etc.). |
| 1746 | }, |
| 1747 | "kind": "A String", # This is always <code>sql#settings</code>. |
| 1748 | "replicationType": "A String", # The type of replication this instance uses. This can be either |
| 1749 | # <code>ASYNCHRONOUS</code> or <code>SYNCHRONOUS</code>. This property is |
| 1750 | # only applicable to First Generation instances. |
| 1751 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is |
| 1752 | # applicable only when the instance state is <code>RUNNABLE</code>. Valid |
| 1753 | # values: <br><code>ALWAYS</code>: The instance is on, and remains so even in |
| 1754 | # the absence of connection requests. <br><code>NEVER</code>: The instance is |
| 1755 | # off; it is not activated, even if a connection request arrives. |
| 1756 | # <br><code>ON_DEMAND</code>: First Generation instances only. The instance |
| 1757 | # responds to incoming requests, and turns itself off when not in use. |
| 1758 | # Instances with <code>PER_USE</code> pricing turn off after 15 minutes of |
| 1759 | # inactivity. Instances with <code>PER_PACKAGE</code> pricing turn off after |
| 1760 | # 12 hours of inactivity. |
| 1761 | }, |
| 1762 | "replicaNames": [ # The replicas of the instance. |
| 1763 | "A String", |
| 1764 | ], |
| 1765 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. |
| 1766 | # Applies only to Second Generation instances. |
| 1767 | "kind": "A String", # This is always <code>sql#diskEncryptionConfiguration</code>. |
| 1768 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 1769 | }, |
| 1770 | "rootPassword": "A String", # Initial root password. Use only on creation. |
| 1771 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 1772 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 1773 | "canDefer": True or False, |
| 1774 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 1775 | }, |
| 1776 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 1777 | # API. Use the <code>settings.settingsVersion</code> field instead. |
| 1778 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 1779 | "selfLink": "A String", # The URI of this resource. |
| 1780 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 1781 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1782 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1783 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 1784 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 1785 | "cert": "A String", # PEM representation. |
| 1786 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 1787 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 1788 | "createTime": "A String", # The time when the certificate was created in <a |
| 1789 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1790 | # <code>2012-11-15T16:19:00.094Z</code> |
| 1791 | "instance": "A String", # Name of the database instance. |
| 1792 | }, |
| 1793 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 1794 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 1795 | "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup. |
| 1796 | "instanceType": "A String", # The instance type. This can be one of the following. |
| 1797 | # <br><code>CLOUD_SQL_INSTANCE</code>: A Cloud SQL instance that is not |
| 1798 | # replicating from a master. <br><code>ON_PREMISES_INSTANCE</code>: An |
| 1799 | # instance running on the |
| 1800 | # customer's premises. <br><code>READ_REPLICA_INSTANCE</code>: A Cloud SQL |
| 1801 | # instance configured as a read-replica. |
| 1802 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This |
| 1803 | # value could be different from the zone that was specified when the instance |
| 1804 | # was created if the instance has failed over to its secondary zone. |
| 1805 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been |
| 1806 | # deprecated. Users should use the |
| 1807 | # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud |
| 1808 | # Monitoring API instead. Please see <a |
| 1809 | # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ">this |
| 1810 | # announcement</a> for details. |
| 1811 | "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas. |
| 1812 | "kind": "A String", # This is always <code>sql#replicaConfiguration</code>. |
| 1813 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises |
| 1814 | # master. Replication configuration information such as the username, |
| 1815 | # password, certificates, and keys are not stored in the instance metadata. |
| 1816 | # The configuration information is used only to set up the replication |
| 1817 | # connection and is stored by MySQL in a file named <code>master.info</code> |
| 1818 | # in the data directory. |
| 1819 | "kind": "A String", # This is always <code>sql#mysqlReplicaConfiguration</code>. |
| 1820 | "password": "A String", # The password for the replication connection. |
| 1821 | "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate |
| 1822 | # that it sends during the SSL handshake. |
| 1823 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 1824 | # is encoded in the client's certificate. |
| 1825 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 1826 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 1827 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 1828 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave |
| 1829 | # instance is to be created. The URI is in the form gs: |
| 1830 | # //bucketName/fileName. Compressed gzip files (.gz) are also supported. |
| 1831 | # // Dumps should have the binlog co-ordinates from which replication should |
| 1832 | # // begin. This can be accomplished by setting --master-data to 1 when using |
| 1833 | # // mysqldump. |
| 1834 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 1835 | "username": "A String", # The username for the replication connection. |
| 1836 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1837 | }, |
| 1838 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to |
| 1839 | # <code>true</code> the replica will be designated as a failover replica. In |
| 1840 | # case the master instance fails, the replica instance will be promoted as |
| 1841 | # the new master instance. <p>Only one replica can be specified as failover |
| 1842 | # target, and the replica has to be in different zone with the master |
| 1843 | # instance. |
| 1844 | }, |
| 1845 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 1846 | "failoverReplica": { # The name and status of the failover replica. This property is applicable |
| 1847 | # only to Second Generation instances. |
| 1848 | "available": True or False, # The availability status of the failover replica. A false status indicates |
| 1849 | # that the failover replica is out of sync. The master can only failover to |
| 1850 | # the failover replica when the status is true. |
| 1851 | "name": "A String", # The name of the failover replica. If specified at instance creation, a |
| 1852 | # failover replica is created for the instance. The name |
| 1853 | # doesn't include the project ID. This property is applicable only to |
| 1854 | # Second Generation instances. |
| 1855 | }, |
| 1856 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 1857 | { # Database instance IP Mapping. |
| 1858 | "timeToRetire": "A String", # The due time for this IP to be retired in <a |
| 1859 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1860 | # <code>2012-11-15T16:19:00.094Z</code>. This field is only available when |
| 1861 | # the IP is scheduled to be retired. |
| 1862 | "type": "A String", # The type of this IP address. A <code>PRIMARY</code> address is a public |
| 1863 | # address that can accept incoming connections. A <code>PRIVATE</code> |
| 1864 | # address is a private address that can accept incoming connections. An |
| 1865 | # <code>OUTGOING</code> address is the source address of connections |
| 1866 | # originating from the instance, if supported. |
| 1867 | "ipAddress": "A String", # The IP address assigned. |
| 1868 | }, |
| 1869 | ], |
| 1870 | } |
| 1871 | |
| 1872 | x__xgafv: string, V1 error format. |
| 1873 | Allowed values |
| 1874 | 1 - v1 error format |
| 1875 | 2 - v2 error format |
| 1876 | |
| 1877 | Returns: |
| 1878 | An object of the form: |
| 1879 | |
| 1880 | { # An Operation resource.&nbsp;For successful operations that return an |
| 1881 | # Operation resource, only the fields relevant to the operation are populated |
| 1882 | # in the resource. |
| 1883 | "user": "A String", # The email address of the user who initiated this operation. |
| 1884 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 1885 | "selfLink": "A String", # The URI of this resource. |
| 1886 | "targetLink": "A String", |
| 1887 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 1888 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 1889 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 1890 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 1891 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 1892 | # <code>DELETE_DATABASE</code> . |
| 1893 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 1894 | # populated. |
| 1895 | "errors": [ # The list of errors encountered while processing this operation. |
| 1896 | { # Database instance operation error. |
| 1897 | "code": "A String", # Identifies the specific error that occurred. |
| 1898 | "message": "A String", # Additional information about the error encountered. |
| 1899 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 1900 | }, |
| 1901 | ], |
| 1902 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 1903 | }, |
| 1904 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 1905 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 1906 | "csvImportOptions": { # Options for importing data as CSV. |
| 1907 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 1908 | # of the database table are loaded with CSV data. |
| 1909 | "A String", |
| 1910 | ], |
| 1911 | "table": "A String", # The table to which CSV data is imported. |
| 1912 | }, |
| 1913 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 1914 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 1915 | # <code>SQL</code>, this field is required only if the import file does not |
| 1916 | # specify a database, and is overridden by any database specification in the |
| 1917 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 1918 | # must be specified. |
| 1919 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1920 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1921 | "encryptionOptions": { |
| 1922 | "pvkPassword": "A String", # Password that encrypts the private key |
| 1923 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 1924 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 1925 | # write permissions to the bucket and read access to the file. |
| 1926 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 1927 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 1928 | # write permissions to the bucket and read access to the file. |
| 1929 | }, |
| 1930 | }, |
| 1931 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 1932 | # <code>gs: |
| 1933 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 1934 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 1935 | # // write permissions to the bucket and read access to the file. |
| 1936 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1937 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 1938 | }, |
| 1939 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 1940 | # <code>RUNNING</code>, <code>DONE</code>, |
| 1941 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 1942 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 1943 | # identifier to retrieve the Operations resource that has information about |
| 1944 | # the operation. |
| 1945 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 1946 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 1947 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 1948 | # databases are exported, except for the <code>mysql</code> system database. |
| 1949 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 1950 | # either by using this property or by using the |
| 1951 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 1952 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 1953 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 1954 | # this database must match the one specified in the |
| 1955 | # <code>csvExportOptions.selectQuery</code> property. |
| 1956 | "A String", |
| 1957 | ], |
| 1958 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 1959 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 1960 | # you specify tables, specify one and only one database. For PostgreSQL |
| 1961 | # instances, you can specify only one table. |
| 1962 | "A String", |
| 1963 | ], |
| 1964 | "schemaOnly": True or False, # Export only schemas. |
| 1965 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 1966 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 1967 | # If set to <code>1</code>, the dump file includes |
| 1968 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 1969 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 1970 | # a SQL comment, and has no effect. |
| 1971 | # All other values are ignored. |
| 1972 | }, |
| 1973 | }, |
| 1974 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1975 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 1976 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 1977 | # stored. The URI is in the form <code>gs: |
| 1978 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 1979 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 1980 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 1981 | # // compressed. |
| 1982 | "csvExportOptions": { # Options for exporting data as CSV. |
| 1983 | "selectQuery": "A String", # The select query used to extract the data. |
| 1984 | }, |
| 1985 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 1986 | }, |
| 1987 | "targetId": "A String", # Name of the database instance related to this operation. |
| 1988 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 1989 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1990 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1991 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 1992 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1993 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1994 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 1995 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1996 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1997 | }</pre> |
| 1998 | </div> |
| 1999 | |
| 2000 | <div class="method"> |
| 2001 | <code class="details" id="list">list(project, pageToken=None, maxResults=None, filter=None, x__xgafv=None)</code> |
| 2002 | <pre>Lists instances under a given project. |
| 2003 | |
| 2004 | Args: |
| 2005 | project: string, Project ID of the project for which to list Cloud SQL instances. (required) |
| 2006 | pageToken: string, A previously-returned page token representing part of the larger set of |
| 2007 | results to view. |
| 2008 | maxResults: integer, The maximum number of results to return per response. |
| 2009 | filter: string, A filter expression that filters resources listed in the response. |
| 2010 | The expression is in the form of field:value. For example, |
| 2011 | 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per |
| 2012 | their JSON representation, such as 'settings.userLabels.auto_start:true'. |
| 2013 | |
| 2014 | Multiple filter queries are space-separated. For example. |
| 2015 | 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each |
| 2016 | expression is an AND expression. However, you can include AND and OR |
| 2017 | expressions explicitly. |
| 2018 | x__xgafv: string, V1 error format. |
| 2019 | Allowed values |
| 2020 | 1 - v1 error format |
| 2021 | 2 - v2 error format |
| 2022 | |
| 2023 | Returns: |
| 2024 | An object of the form: |
| 2025 | |
| 2026 | { # Database instances list response. |
| 2027 | "kind": "A String", # This is always <code>sql#instancesList</code>. |
| 2028 | "items": [ # List of database instance resources. |
| 2029 | { # A Cloud SQL instance resource. |
| 2030 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only |
| 2031 | # to First Generation instances. |
| 2032 | "selfLink": "A String", # The URI of this resource. |
| 2033 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. |
| 2034 | # Applies only to Second Generation instances. |
| 2035 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 2036 | "kind": "A String", # This is always <code>sql#diskEncryptionStatus</code>. |
| 2037 | }, |
| 2038 | "kind": "A String", # This is always <code>sql#instance</code>. |
| 2039 | "region": "A String", # The geographical region. Can be <code>us-central</code> |
| 2040 | # (<code>FIRST_GEN</code> instances only), <code>us-central1</code> |
| 2041 | # (<code>SECOND_GEN</code> instances only), <code>asia-east1</code> or |
| 2042 | # <code>europe-west1</code>. Defaults to <code>us-central</code> or |
| 2043 | # <code>us-central1</code> depending on the instance type (First Generation |
| 2044 | # or Second Generation). The region can not be changed after instance |
| 2045 | # creation. |
| 2046 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the |
| 2047 | # following. <br><code>RUNNABLE</code>: The instance is running, or is ready |
| 2048 | # to run when accessed. <br><code>SUSPENDED</code>: The instance is not |
| 2049 | # available, for example due to problems with billing. |
| 2050 | # <br><code>PENDING_CREATE</code>: The instance is being created. |
| 2051 | # <br><code>MAINTENANCE</code>: The instance is down for maintenance. |
| 2052 | # <br><code>FAILED</code>: The instance creation failed. |
| 2053 | # <br><code>UNKNOWN_STATE</code>: The state of the instance is unknown. |
| 2054 | "backendType": "A String", # <code>FIRST_GEN</code>: First Generation instance. MySQL only. <br |
| 2055 | # /><code>SECOND_GEN</code>: Second Generation instance or PostgreSQL |
| 2056 | # instance. <br /><code>EXTERNAL</code>: A database server that is not |
| 2057 | # managed by Google. <br>This property is read-only; use the |
| 2058 | # <code>tier</code> property in the <code>settings</code> object to determine |
| 2059 | # the database type and Second or First Generation. |
| 2060 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 2061 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 2062 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 2063 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 2064 | "username": "A String", # The username for connecting to on-premises instance. |
| 2065 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 2066 | "kind": "A String", # This is always <code>sql#onPremisesConfiguration</code>. |
| 2067 | "password": "A String", # The password for connecting to on-premises instance. |
| 2068 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 2069 | # is encoded in the client's certificate. |
| 2070 | }, |
| 2071 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google |
| 2072 | # apps domain is prefixed if applicable. |
| 2073 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property |
| 2074 | # is applicable only to Second Generation instances. |
| 2075 | "databaseVersion": "A String", # The database engine type and version. The <code>databaseVersion</code> |
| 2076 | # field can not be changed after instance creation. MySQL Second Generation |
| 2077 | # instances: <code>MYSQL_5_7</code> (default) or <code>MYSQL_5_6</code>. |
| 2078 | # PostgreSQL instances: <code>POSTGRES_9_6</code> (default) or |
| 2079 | # <code>POSTGRES_11 Beta</code> MySQL First Generation |
| 2080 | # instances: <code>MYSQL_5_6</code> (default) or <code>MYSQL_5_5</code> |
| 2081 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 2082 | "A String", |
| 2083 | ], |
| 2084 | "settings": { # Database instance settings. # The user settings. |
| 2085 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the |
| 2086 | # instance IP and manage which external networks can connect to the instance. |
| 2087 | # The IPv4 address cannot be disabled for Second Generation instances. |
| 2088 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is |
| 2089 | # accessible for private IP. For example, |
| 2090 | # <code>/projects/myProject/global/networks/default</code>. This setting can |
| 2091 | # be updated, but it cannot be removed after it is set. |
| 2092 | "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not. |
| 2093 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance |
| 2094 | # using the IP. In <a |
| 2095 | # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation">CIDR |
| 2096 | # notation</a>, also known as 'slash' notation (e.g. |
| 2097 | # <code>192.168.100.0/24</code>). |
| 2098 | { # An entry for an Access Control list. |
| 2099 | "value": "A String", # The whitelisted value for the access control list. |
| 2100 | "expirationTime": "A String", # The time when this access control entry expires in <a |
| 2101 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2102 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2103 | "name": "A String", # Optional. A label to identify this entry. |
| 2104 | "kind": "A String", # This is always <code>sql#aclEntry</code>. |
| 2105 | }, |
| 2106 | ], |
| 2107 | "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not. |
| 2108 | }, |
| 2109 | "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values: |
| 2110 | # <br><code>ZONAL</code>: The instance serves data from only one zone. |
| 2111 | # Outages in that zone affect data accessibility. <br><code>REGIONAL</code>: |
| 2112 | # The instance can serve data from more than one zone in a region (it is |
| 2113 | # highly available). <br>For more information, see <a |
| 2114 | # href="https://cloud.google.com/sql/docs/postgres/high-availability">Overview |
| 2115 | # of the High Availability Configuration</a>. |
| 2116 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update |
| 2117 | # method to make sure concurrent updates are handled properly. During update, |
| 2118 | # use the most recent settingsVersion value for this instance and do not try |
| 2119 | # to update this value. |
| 2120 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 2121 | { # Database flags for Cloud SQL instances. |
| 2122 | "value": "A String", # The value of the flag. Booleans should be set to <code>on</code> for true |
| 2123 | # and <code>off</code> for false. This field must be omitted if the flag |
| 2124 | # doesn't take a value. |
| 2125 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so |
| 2126 | # include both server options and system variables for MySQL. Flags should be |
| 2127 | # specified with underscores, not hyphens. For more information, see <a |
| 2128 | # href="/sql/docs/mysql/flags">Configuring Database Flags</a> in the Cloud |
| 2129 | # SQL documentation. |
| 2130 | }, |
| 2131 | ], |
| 2132 | "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance |
| 2133 | # can be restarted for maintenance purposes. Not used for First Generation |
| 2134 | # instances. |
| 2135 | # preferably be restarted for system maintenance purposes. |
| 2136 | "updateTrack": "A String", # Maintenance timing setting: <code>canary</code> (Earlier) or |
| 2137 | # <code>stable</code> (Later). <br /><a |
| 2138 | # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"> |
| 2139 | # Learn more</a>. |
| 2140 | "hour": 42, # hour of day - 0 to 23. |
| 2141 | "day": 42, # day of week (1-7), starting on Monday. |
| 2142 | "kind": "A String", # This is always <code>sql#maintenanceWindow</code>. |
| 2143 | }, |
| 2144 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either <code>PER_USE</code> |
| 2145 | # or <code>PACKAGE</code>. Only <code>PER_USE</code> is supported for Second |
| 2146 | # Generation instances. |
| 2147 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is |
| 2148 | # true. Not used for First Generation instances. |
| 2149 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. |
| 2150 | # The default value is 0, which specifies that there is no limit. Not used |
| 2151 | # for First Generation instances. |
| 2152 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation |
| 2153 | # instances only. |
| 2154 | "A String", |
| 2155 | ], |
| 2156 | "tier": "A String", # The tier (or machine type) for this instance, for example |
| 2157 | # <code>db-n1-standard-1</code> (MySQL instances) or |
| 2158 | # <code>db-custom-1-3840</code> (PostgreSQL instances). For MySQL instances, |
| 2159 | # this property determines whether the instance is First or Second |
| 2160 | # Generation. For more information, see <a |
| 2161 | # href="/sql/docs/db_path/instance-settings">Instance Settings</a>. |
| 2162 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used |
| 2163 | # for First Generation instances. |
| 2164 | "dataDiskType": "A String", # The type of data disk: <code>PD_SSD</code> (default) or |
| 2165 | # <code>PD_HDD</code>. Not used for First Generation instances. |
| 2166 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 2167 | # replication is enabled or not. |
| 2168 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 2169 | # database flags for crash-safe replication are enabled. This property is |
| 2170 | # only applicable to First Generation instances. |
| 2171 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 2172 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 2173 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 |
| 2174 | # hour format - <code>HH:MM</code>. |
| 2175 | "kind": "A String", # This is always <code>sql#backupConfiguration</code>. |
| 2176 | "enabled": True or False, # Whether this configuration is enabled. |
| 2177 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is |
| 2178 | # disabled, binarylog must be disabled as well. |
| 2179 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 2180 | "location": "A String", # Location of the backup |
| 2181 | }, |
| 2182 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a |
| 2183 | # single key value pair. |
| 2184 | "a_key": "A String", |
| 2185 | }, |
| 2186 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as |
| 2187 | # near as possible to either an App Engine app or Compute Engine zone for |
| 2188 | # better performance. App Engine co-location is only applicable to First |
| 2189 | # Generation instances. |
| 2190 | # preferably be located, either in a specific Compute Engine zone, or |
| 2191 | # co-located with an App Engine application. Note that if the preferred |
| 2192 | # location is not available, the instance will be located as close as possible |
| 2193 | # within the region. Only one location may be specified. |
| 2194 | "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the |
| 2195 | # Cloud SQL instance. |
| 2196 | "kind": "A String", # This is always <code>sql#locationPreference</code>. |
| 2197 | "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b, |
| 2198 | # etc.). |
| 2199 | }, |
| 2200 | "kind": "A String", # This is always <code>sql#settings</code>. |
| 2201 | "replicationType": "A String", # The type of replication this instance uses. This can be either |
| 2202 | # <code>ASYNCHRONOUS</code> or <code>SYNCHRONOUS</code>. This property is |
| 2203 | # only applicable to First Generation instances. |
| 2204 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is |
| 2205 | # applicable only when the instance state is <code>RUNNABLE</code>. Valid |
| 2206 | # values: <br><code>ALWAYS</code>: The instance is on, and remains so even in |
| 2207 | # the absence of connection requests. <br><code>NEVER</code>: The instance is |
| 2208 | # off; it is not activated, even if a connection request arrives. |
| 2209 | # <br><code>ON_DEMAND</code>: First Generation instances only. The instance |
| 2210 | # responds to incoming requests, and turns itself off when not in use. |
| 2211 | # Instances with <code>PER_USE</code> pricing turn off after 15 minutes of |
| 2212 | # inactivity. Instances with <code>PER_PACKAGE</code> pricing turn off after |
| 2213 | # 12 hours of inactivity. |
| 2214 | }, |
| 2215 | "replicaNames": [ # The replicas of the instance. |
| 2216 | "A String", |
| 2217 | ], |
| 2218 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. |
| 2219 | # Applies only to Second Generation instances. |
| 2220 | "kind": "A String", # This is always <code>sql#diskEncryptionConfiguration</code>. |
| 2221 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 2222 | }, |
| 2223 | "rootPassword": "A String", # Initial root password. Use only on creation. |
| 2224 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 2225 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 2226 | "canDefer": True or False, |
| 2227 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 2228 | }, |
| 2229 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 2230 | # API. Use the <code>settings.settingsVersion</code> field instead. |
| 2231 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 2232 | "selfLink": "A String", # The URI of this resource. |
| 2233 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 2234 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2235 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2236 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 2237 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 2238 | "cert": "A String", # PEM representation. |
| 2239 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 2240 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 2241 | "createTime": "A String", # The time when the certificate was created in <a |
| 2242 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2243 | # <code>2012-11-15T16:19:00.094Z</code> |
| 2244 | "instance": "A String", # Name of the database instance. |
| 2245 | }, |
| 2246 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 2247 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 2248 | "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup. |
| 2249 | "instanceType": "A String", # The instance type. This can be one of the following. |
| 2250 | # <br><code>CLOUD_SQL_INSTANCE</code>: A Cloud SQL instance that is not |
| 2251 | # replicating from a master. <br><code>ON_PREMISES_INSTANCE</code>: An |
| 2252 | # instance running on the |
| 2253 | # customer's premises. <br><code>READ_REPLICA_INSTANCE</code>: A Cloud SQL |
| 2254 | # instance configured as a read-replica. |
| 2255 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This |
| 2256 | # value could be different from the zone that was specified when the instance |
| 2257 | # was created if the instance has failed over to its secondary zone. |
| 2258 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been |
| 2259 | # deprecated. Users should use the |
| 2260 | # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud |
| 2261 | # Monitoring API instead. Please see <a |
| 2262 | # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ">this |
| 2263 | # announcement</a> for details. |
| 2264 | "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas. |
| 2265 | "kind": "A String", # This is always <code>sql#replicaConfiguration</code>. |
| 2266 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises |
| 2267 | # master. Replication configuration information such as the username, |
| 2268 | # password, certificates, and keys are not stored in the instance metadata. |
| 2269 | # The configuration information is used only to set up the replication |
| 2270 | # connection and is stored by MySQL in a file named <code>master.info</code> |
| 2271 | # in the data directory. |
| 2272 | "kind": "A String", # This is always <code>sql#mysqlReplicaConfiguration</code>. |
| 2273 | "password": "A String", # The password for the replication connection. |
| 2274 | "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate |
| 2275 | # that it sends during the SSL handshake. |
| 2276 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 2277 | # is encoded in the client's certificate. |
| 2278 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 2279 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 2280 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 2281 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave |
| 2282 | # instance is to be created. The URI is in the form gs: |
| 2283 | # //bucketName/fileName. Compressed gzip files (.gz) are also supported. |
| 2284 | # // Dumps should have the binlog co-ordinates from which replication should |
| 2285 | # // begin. This can be accomplished by setting --master-data to 1 when using |
| 2286 | # // mysqldump. |
| 2287 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 2288 | "username": "A String", # The username for the replication connection. |
| 2289 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 2290 | }, |
| 2291 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to |
| 2292 | # <code>true</code> the replica will be designated as a failover replica. In |
| 2293 | # case the master instance fails, the replica instance will be promoted as |
| 2294 | # the new master instance. <p>Only one replica can be specified as failover |
| 2295 | # target, and the replica has to be in different zone with the master |
| 2296 | # instance. |
| 2297 | }, |
| 2298 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 2299 | "failoverReplica": { # The name and status of the failover replica. This property is applicable |
| 2300 | # only to Second Generation instances. |
| 2301 | "available": True or False, # The availability status of the failover replica. A false status indicates |
| 2302 | # that the failover replica is out of sync. The master can only failover to |
| 2303 | # the failover replica when the status is true. |
| 2304 | "name": "A String", # The name of the failover replica. If specified at instance creation, a |
| 2305 | # failover replica is created for the instance. The name |
| 2306 | # doesn't include the project ID. This property is applicable only to |
| 2307 | # Second Generation instances. |
| 2308 | }, |
| 2309 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 2310 | { # Database instance IP Mapping. |
| 2311 | "timeToRetire": "A String", # The due time for this IP to be retired in <a |
| 2312 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2313 | # <code>2012-11-15T16:19:00.094Z</code>. This field is only available when |
| 2314 | # the IP is scheduled to be retired. |
| 2315 | "type": "A String", # The type of this IP address. A <code>PRIMARY</code> address is a public |
| 2316 | # address that can accept incoming connections. A <code>PRIVATE</code> |
| 2317 | # address is a private address that can accept incoming connections. An |
| 2318 | # <code>OUTGOING</code> address is the source address of connections |
| 2319 | # originating from the instance, if supported. |
| 2320 | "ipAddress": "A String", # The IP address assigned. |
| 2321 | }, |
| 2322 | ], |
| 2323 | }, |
| 2324 | ], |
| 2325 | "warnings": [ # List of warnings that occurred while handling the request. |
| 2326 | { # An Admin API warning message. |
| 2327 | "code": "A String", # Code to uniquely identify the warning type. |
| 2328 | "message": "A String", # The warning message. |
| 2329 | }, |
| 2330 | ], |
| 2331 | "nextPageToken": "A String", # The continuation token, used to page through large result sets. Provide |
| 2332 | # this value in a subsequent request to return the next page of results. |
| 2333 | }</pre> |
| 2334 | </div> |
| 2335 | |
| 2336 | <div class="method"> |
| 2337 | <code class="details" id="listServerCas">listServerCas(project, instance, x__xgafv=None)</code> |
| 2338 | <pre>Lists all of the trusted Certificate Authorities (CAs) for the specified |
| 2339 | instance. There can be up to three CAs listed: the CA that was used to sign |
| 2340 | the certificate that is currently in use, a CA that has been added but not |
| 2341 | yet used to sign a certificate, and a CA used to sign a certificate that |
| 2342 | has previously rotated out. |
| 2343 | |
| 2344 | Args: |
| 2345 | project: string, Project ID of the project that contains the instance. (required) |
| 2346 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 2347 | x__xgafv: string, V1 error format. |
| 2348 | Allowed values |
| 2349 | 1 - v1 error format |
| 2350 | 2 - v2 error format |
| 2351 | |
| 2352 | Returns: |
| 2353 | An object of the form: |
| 2354 | |
| 2355 | { # Instances ListServerCas response. |
| 2356 | "activeVersion": "A String", |
| 2357 | "kind": "A String", # This is always <code>sql#instancesListServerCas</code>. |
| 2358 | "certs": [ # List of server CA certificates for the instance. |
| 2359 | { # SslCerts Resource |
| 2360 | "selfLink": "A String", # The URI of this resource. |
| 2361 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 2362 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2363 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2364 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 2365 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 2366 | "cert": "A String", # PEM representation. |
| 2367 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 2368 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 2369 | "createTime": "A String", # The time when the certificate was created in <a |
| 2370 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2371 | # <code>2012-11-15T16:19:00.094Z</code> |
| 2372 | "instance": "A String", # Name of the database instance. |
| 2373 | }, |
| 2374 | ], |
| 2375 | }</pre> |
| 2376 | </div> |
| 2377 | |
| 2378 | <div class="method"> |
| 2379 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 2380 | <pre>Retrieves the next page of results. |
| 2381 | |
| 2382 | Args: |
| 2383 | previous_request: The request for the previous page. (required) |
| 2384 | previous_response: The response from the request for the previous page. (required) |
| 2385 | |
| 2386 | Returns: |
| 2387 | A request object that you can call 'execute()' on to request the next |
| 2388 | page. Returns None if there are no more items in the collection. |
| 2389 | </pre> |
| 2390 | </div> |
| 2391 | |
| 2392 | <div class="method"> |
| 2393 | <code class="details" id="patch">patch(project, instance, body=None, x__xgafv=None)</code> |
| 2394 | <pre>Updates settings of a Cloud SQL instance. |
| 2395 | This method supports patch semantics. |
| 2396 | |
| 2397 | Args: |
| 2398 | project: string, Project ID of the project that contains the instance. (required) |
| 2399 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 2400 | body: object, The request body. |
| 2401 | The object takes the form of: |
| 2402 | |
| 2403 | { # A Cloud SQL instance resource. |
| 2404 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only |
| 2405 | # to First Generation instances. |
| 2406 | "selfLink": "A String", # The URI of this resource. |
| 2407 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. |
| 2408 | # Applies only to Second Generation instances. |
| 2409 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 2410 | "kind": "A String", # This is always <code>sql#diskEncryptionStatus</code>. |
| 2411 | }, |
| 2412 | "kind": "A String", # This is always <code>sql#instance</code>. |
| 2413 | "region": "A String", # The geographical region. Can be <code>us-central</code> |
| 2414 | # (<code>FIRST_GEN</code> instances only), <code>us-central1</code> |
| 2415 | # (<code>SECOND_GEN</code> instances only), <code>asia-east1</code> or |
| 2416 | # <code>europe-west1</code>. Defaults to <code>us-central</code> or |
| 2417 | # <code>us-central1</code> depending on the instance type (First Generation |
| 2418 | # or Second Generation). The region can not be changed after instance |
| 2419 | # creation. |
| 2420 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the |
| 2421 | # following. <br><code>RUNNABLE</code>: The instance is running, or is ready |
| 2422 | # to run when accessed. <br><code>SUSPENDED</code>: The instance is not |
| 2423 | # available, for example due to problems with billing. |
| 2424 | # <br><code>PENDING_CREATE</code>: The instance is being created. |
| 2425 | # <br><code>MAINTENANCE</code>: The instance is down for maintenance. |
| 2426 | # <br><code>FAILED</code>: The instance creation failed. |
| 2427 | # <br><code>UNKNOWN_STATE</code>: The state of the instance is unknown. |
| 2428 | "backendType": "A String", # <code>FIRST_GEN</code>: First Generation instance. MySQL only. <br |
| 2429 | # /><code>SECOND_GEN</code>: Second Generation instance or PostgreSQL |
| 2430 | # instance. <br /><code>EXTERNAL</code>: A database server that is not |
| 2431 | # managed by Google. <br>This property is read-only; use the |
| 2432 | # <code>tier</code> property in the <code>settings</code> object to determine |
| 2433 | # the database type and Second or First Generation. |
| 2434 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 2435 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 2436 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 2437 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 2438 | "username": "A String", # The username for connecting to on-premises instance. |
| 2439 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 2440 | "kind": "A String", # This is always <code>sql#onPremisesConfiguration</code>. |
| 2441 | "password": "A String", # The password for connecting to on-premises instance. |
| 2442 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 2443 | # is encoded in the client's certificate. |
| 2444 | }, |
| 2445 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google |
| 2446 | # apps domain is prefixed if applicable. |
| 2447 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property |
| 2448 | # is applicable only to Second Generation instances. |
| 2449 | "databaseVersion": "A String", # The database engine type and version. The <code>databaseVersion</code> |
| 2450 | # field can not be changed after instance creation. MySQL Second Generation |
| 2451 | # instances: <code>MYSQL_5_7</code> (default) or <code>MYSQL_5_6</code>. |
| 2452 | # PostgreSQL instances: <code>POSTGRES_9_6</code> (default) or |
| 2453 | # <code>POSTGRES_11 Beta</code> MySQL First Generation |
| 2454 | # instances: <code>MYSQL_5_6</code> (default) or <code>MYSQL_5_5</code> |
| 2455 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 2456 | "A String", |
| 2457 | ], |
| 2458 | "settings": { # Database instance settings. # The user settings. |
| 2459 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the |
| 2460 | # instance IP and manage which external networks can connect to the instance. |
| 2461 | # The IPv4 address cannot be disabled for Second Generation instances. |
| 2462 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is |
| 2463 | # accessible for private IP. For example, |
| 2464 | # <code>/projects/myProject/global/networks/default</code>. This setting can |
| 2465 | # be updated, but it cannot be removed after it is set. |
| 2466 | "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not. |
| 2467 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance |
| 2468 | # using the IP. In <a |
| 2469 | # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation">CIDR |
| 2470 | # notation</a>, also known as 'slash' notation (e.g. |
| 2471 | # <code>192.168.100.0/24</code>). |
| 2472 | { # An entry for an Access Control list. |
| 2473 | "value": "A String", # The whitelisted value for the access control list. |
| 2474 | "expirationTime": "A String", # The time when this access control entry expires in <a |
| 2475 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2476 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2477 | "name": "A String", # Optional. A label to identify this entry. |
| 2478 | "kind": "A String", # This is always <code>sql#aclEntry</code>. |
| 2479 | }, |
| 2480 | ], |
| 2481 | "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not. |
| 2482 | }, |
| 2483 | "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values: |
| 2484 | # <br><code>ZONAL</code>: The instance serves data from only one zone. |
| 2485 | # Outages in that zone affect data accessibility. <br><code>REGIONAL</code>: |
| 2486 | # The instance can serve data from more than one zone in a region (it is |
| 2487 | # highly available). <br>For more information, see <a |
| 2488 | # href="https://cloud.google.com/sql/docs/postgres/high-availability">Overview |
| 2489 | # of the High Availability Configuration</a>. |
| 2490 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update |
| 2491 | # method to make sure concurrent updates are handled properly. During update, |
| 2492 | # use the most recent settingsVersion value for this instance and do not try |
| 2493 | # to update this value. |
| 2494 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 2495 | { # Database flags for Cloud SQL instances. |
| 2496 | "value": "A String", # The value of the flag. Booleans should be set to <code>on</code> for true |
| 2497 | # and <code>off</code> for false. This field must be omitted if the flag |
| 2498 | # doesn't take a value. |
| 2499 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so |
| 2500 | # include both server options and system variables for MySQL. Flags should be |
| 2501 | # specified with underscores, not hyphens. For more information, see <a |
| 2502 | # href="/sql/docs/mysql/flags">Configuring Database Flags</a> in the Cloud |
| 2503 | # SQL documentation. |
| 2504 | }, |
| 2505 | ], |
| 2506 | "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance |
| 2507 | # can be restarted for maintenance purposes. Not used for First Generation |
| 2508 | # instances. |
| 2509 | # preferably be restarted for system maintenance purposes. |
| 2510 | "updateTrack": "A String", # Maintenance timing setting: <code>canary</code> (Earlier) or |
| 2511 | # <code>stable</code> (Later). <br /><a |
| 2512 | # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"> |
| 2513 | # Learn more</a>. |
| 2514 | "hour": 42, # hour of day - 0 to 23. |
| 2515 | "day": 42, # day of week (1-7), starting on Monday. |
| 2516 | "kind": "A String", # This is always <code>sql#maintenanceWindow</code>. |
| 2517 | }, |
| 2518 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either <code>PER_USE</code> |
| 2519 | # or <code>PACKAGE</code>. Only <code>PER_USE</code> is supported for Second |
| 2520 | # Generation instances. |
| 2521 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is |
| 2522 | # true. Not used for First Generation instances. |
| 2523 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. |
| 2524 | # The default value is 0, which specifies that there is no limit. Not used |
| 2525 | # for First Generation instances. |
| 2526 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation |
| 2527 | # instances only. |
| 2528 | "A String", |
| 2529 | ], |
| 2530 | "tier": "A String", # The tier (or machine type) for this instance, for example |
| 2531 | # <code>db-n1-standard-1</code> (MySQL instances) or |
| 2532 | # <code>db-custom-1-3840</code> (PostgreSQL instances). For MySQL instances, |
| 2533 | # this property determines whether the instance is First or Second |
| 2534 | # Generation. For more information, see <a |
| 2535 | # href="/sql/docs/db_path/instance-settings">Instance Settings</a>. |
| 2536 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used |
| 2537 | # for First Generation instances. |
| 2538 | "dataDiskType": "A String", # The type of data disk: <code>PD_SSD</code> (default) or |
| 2539 | # <code>PD_HDD</code>. Not used for First Generation instances. |
| 2540 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 2541 | # replication is enabled or not. |
| 2542 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 2543 | # database flags for crash-safe replication are enabled. This property is |
| 2544 | # only applicable to First Generation instances. |
| 2545 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 2546 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 2547 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 |
| 2548 | # hour format - <code>HH:MM</code>. |
| 2549 | "kind": "A String", # This is always <code>sql#backupConfiguration</code>. |
| 2550 | "enabled": True or False, # Whether this configuration is enabled. |
| 2551 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is |
| 2552 | # disabled, binarylog must be disabled as well. |
| 2553 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 2554 | "location": "A String", # Location of the backup |
| 2555 | }, |
| 2556 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a |
| 2557 | # single key value pair. |
| 2558 | "a_key": "A String", |
| 2559 | }, |
| 2560 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as |
| 2561 | # near as possible to either an App Engine app or Compute Engine zone for |
| 2562 | # better performance. App Engine co-location is only applicable to First |
| 2563 | # Generation instances. |
| 2564 | # preferably be located, either in a specific Compute Engine zone, or |
| 2565 | # co-located with an App Engine application. Note that if the preferred |
| 2566 | # location is not available, the instance will be located as close as possible |
| 2567 | # within the region. Only one location may be specified. |
| 2568 | "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the |
| 2569 | # Cloud SQL instance. |
| 2570 | "kind": "A String", # This is always <code>sql#locationPreference</code>. |
| 2571 | "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b, |
| 2572 | # etc.). |
| 2573 | }, |
| 2574 | "kind": "A String", # This is always <code>sql#settings</code>. |
| 2575 | "replicationType": "A String", # The type of replication this instance uses. This can be either |
| 2576 | # <code>ASYNCHRONOUS</code> or <code>SYNCHRONOUS</code>. This property is |
| 2577 | # only applicable to First Generation instances. |
| 2578 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is |
| 2579 | # applicable only when the instance state is <code>RUNNABLE</code>. Valid |
| 2580 | # values: <br><code>ALWAYS</code>: The instance is on, and remains so even in |
| 2581 | # the absence of connection requests. <br><code>NEVER</code>: The instance is |
| 2582 | # off; it is not activated, even if a connection request arrives. |
| 2583 | # <br><code>ON_DEMAND</code>: First Generation instances only. The instance |
| 2584 | # responds to incoming requests, and turns itself off when not in use. |
| 2585 | # Instances with <code>PER_USE</code> pricing turn off after 15 minutes of |
| 2586 | # inactivity. Instances with <code>PER_PACKAGE</code> pricing turn off after |
| 2587 | # 12 hours of inactivity. |
| 2588 | }, |
| 2589 | "replicaNames": [ # The replicas of the instance. |
| 2590 | "A String", |
| 2591 | ], |
| 2592 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. |
| 2593 | # Applies only to Second Generation instances. |
| 2594 | "kind": "A String", # This is always <code>sql#diskEncryptionConfiguration</code>. |
| 2595 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 2596 | }, |
| 2597 | "rootPassword": "A String", # Initial root password. Use only on creation. |
| 2598 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 2599 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 2600 | "canDefer": True or False, |
| 2601 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 2602 | }, |
| 2603 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 2604 | # API. Use the <code>settings.settingsVersion</code> field instead. |
| 2605 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 2606 | "selfLink": "A String", # The URI of this resource. |
| 2607 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 2608 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2609 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2610 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 2611 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 2612 | "cert": "A String", # PEM representation. |
| 2613 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 2614 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 2615 | "createTime": "A String", # The time when the certificate was created in <a |
| 2616 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2617 | # <code>2012-11-15T16:19:00.094Z</code> |
| 2618 | "instance": "A String", # Name of the database instance. |
| 2619 | }, |
| 2620 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 2621 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 2622 | "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup. |
| 2623 | "instanceType": "A String", # The instance type. This can be one of the following. |
| 2624 | # <br><code>CLOUD_SQL_INSTANCE</code>: A Cloud SQL instance that is not |
| 2625 | # replicating from a master. <br><code>ON_PREMISES_INSTANCE</code>: An |
| 2626 | # instance running on the |
| 2627 | # customer's premises. <br><code>READ_REPLICA_INSTANCE</code>: A Cloud SQL |
| 2628 | # instance configured as a read-replica. |
| 2629 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This |
| 2630 | # value could be different from the zone that was specified when the instance |
| 2631 | # was created if the instance has failed over to its secondary zone. |
| 2632 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been |
| 2633 | # deprecated. Users should use the |
| 2634 | # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud |
| 2635 | # Monitoring API instead. Please see <a |
| 2636 | # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ">this |
| 2637 | # announcement</a> for details. |
| 2638 | "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas. |
| 2639 | "kind": "A String", # This is always <code>sql#replicaConfiguration</code>. |
| 2640 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises |
| 2641 | # master. Replication configuration information such as the username, |
| 2642 | # password, certificates, and keys are not stored in the instance metadata. |
| 2643 | # The configuration information is used only to set up the replication |
| 2644 | # connection and is stored by MySQL in a file named <code>master.info</code> |
| 2645 | # in the data directory. |
| 2646 | "kind": "A String", # This is always <code>sql#mysqlReplicaConfiguration</code>. |
| 2647 | "password": "A String", # The password for the replication connection. |
| 2648 | "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate |
| 2649 | # that it sends during the SSL handshake. |
| 2650 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 2651 | # is encoded in the client's certificate. |
| 2652 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 2653 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 2654 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 2655 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave |
| 2656 | # instance is to be created. The URI is in the form gs: |
| 2657 | # //bucketName/fileName. Compressed gzip files (.gz) are also supported. |
| 2658 | # // Dumps should have the binlog co-ordinates from which replication should |
| 2659 | # // begin. This can be accomplished by setting --master-data to 1 when using |
| 2660 | # // mysqldump. |
| 2661 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 2662 | "username": "A String", # The username for the replication connection. |
| 2663 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 2664 | }, |
| 2665 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to |
| 2666 | # <code>true</code> the replica will be designated as a failover replica. In |
| 2667 | # case the master instance fails, the replica instance will be promoted as |
| 2668 | # the new master instance. <p>Only one replica can be specified as failover |
| 2669 | # target, and the replica has to be in different zone with the master |
| 2670 | # instance. |
| 2671 | }, |
| 2672 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 2673 | "failoverReplica": { # The name and status of the failover replica. This property is applicable |
| 2674 | # only to Second Generation instances. |
| 2675 | "available": True or False, # The availability status of the failover replica. A false status indicates |
| 2676 | # that the failover replica is out of sync. The master can only failover to |
| 2677 | # the failover replica when the status is true. |
| 2678 | "name": "A String", # The name of the failover replica. If specified at instance creation, a |
| 2679 | # failover replica is created for the instance. The name |
| 2680 | # doesn't include the project ID. This property is applicable only to |
| 2681 | # Second Generation instances. |
| 2682 | }, |
| 2683 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 2684 | { # Database instance IP Mapping. |
| 2685 | "timeToRetire": "A String", # The due time for this IP to be retired in <a |
| 2686 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2687 | # <code>2012-11-15T16:19:00.094Z</code>. This field is only available when |
| 2688 | # the IP is scheduled to be retired. |
| 2689 | "type": "A String", # The type of this IP address. A <code>PRIMARY</code> address is a public |
| 2690 | # address that can accept incoming connections. A <code>PRIVATE</code> |
| 2691 | # address is a private address that can accept incoming connections. An |
| 2692 | # <code>OUTGOING</code> address is the source address of connections |
| 2693 | # originating from the instance, if supported. |
| 2694 | "ipAddress": "A String", # The IP address assigned. |
| 2695 | }, |
| 2696 | ], |
| 2697 | } |
| 2698 | |
| 2699 | x__xgafv: string, V1 error format. |
| 2700 | Allowed values |
| 2701 | 1 - v1 error format |
| 2702 | 2 - v2 error format |
| 2703 | |
| 2704 | Returns: |
| 2705 | An object of the form: |
| 2706 | |
| 2707 | { # An Operation resource.&nbsp;For successful operations that return an |
| 2708 | # Operation resource, only the fields relevant to the operation are populated |
| 2709 | # in the resource. |
| 2710 | "user": "A String", # The email address of the user who initiated this operation. |
| 2711 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 2712 | "selfLink": "A String", # The URI of this resource. |
| 2713 | "targetLink": "A String", |
| 2714 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 2715 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 2716 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 2717 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 2718 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 2719 | # <code>DELETE_DATABASE</code> . |
| 2720 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 2721 | # populated. |
| 2722 | "errors": [ # The list of errors encountered while processing this operation. |
| 2723 | { # Database instance operation error. |
| 2724 | "code": "A String", # Identifies the specific error that occurred. |
| 2725 | "message": "A String", # Additional information about the error encountered. |
| 2726 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 2727 | }, |
| 2728 | ], |
| 2729 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 2730 | }, |
| 2731 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 2732 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 2733 | "csvImportOptions": { # Options for importing data as CSV. |
| 2734 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 2735 | # of the database table are loaded with CSV data. |
| 2736 | "A String", |
| 2737 | ], |
| 2738 | "table": "A String", # The table to which CSV data is imported. |
| 2739 | }, |
| 2740 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 2741 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 2742 | # <code>SQL</code>, this field is required only if the import file does not |
| 2743 | # specify a database, and is overridden by any database specification in the |
| 2744 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 2745 | # must be specified. |
| 2746 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 2747 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 2748 | "encryptionOptions": { |
| 2749 | "pvkPassword": "A String", # Password that encrypts the private key |
| 2750 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 2751 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 2752 | # write permissions to the bucket and read access to the file. |
| 2753 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 2754 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 2755 | # write permissions to the bucket and read access to the file. |
| 2756 | }, |
| 2757 | }, |
| 2758 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 2759 | # <code>gs: |
| 2760 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 2761 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 2762 | # // write permissions to the bucket and read access to the file. |
| 2763 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 2764 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 2765 | }, |
| 2766 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 2767 | # <code>RUNNING</code>, <code>DONE</code>, |
| 2768 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 2769 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 2770 | # identifier to retrieve the Operations resource that has information about |
| 2771 | # the operation. |
| 2772 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 2773 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 2774 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 2775 | # databases are exported, except for the <code>mysql</code> system database. |
| 2776 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 2777 | # either by using this property or by using the |
| 2778 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 2779 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 2780 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 2781 | # this database must match the one specified in the |
| 2782 | # <code>csvExportOptions.selectQuery</code> property. |
| 2783 | "A String", |
| 2784 | ], |
| 2785 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 2786 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 2787 | # you specify tables, specify one and only one database. For PostgreSQL |
| 2788 | # instances, you can specify only one table. |
| 2789 | "A String", |
| 2790 | ], |
| 2791 | "schemaOnly": True or False, # Export only schemas. |
| 2792 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 2793 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 2794 | # If set to <code>1</code>, the dump file includes |
| 2795 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 2796 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 2797 | # a SQL comment, and has no effect. |
| 2798 | # All other values are ignored. |
| 2799 | }, |
| 2800 | }, |
| 2801 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 2802 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 2803 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 2804 | # stored. The URI is in the form <code>gs: |
| 2805 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 2806 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 2807 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 2808 | # // compressed. |
| 2809 | "csvExportOptions": { # Options for exporting data as CSV. |
| 2810 | "selectQuery": "A String", # The select query used to extract the data. |
| 2811 | }, |
| 2812 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 2813 | }, |
| 2814 | "targetId": "A String", # Name of the database instance related to this operation. |
| 2815 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 2816 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2817 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2818 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 2819 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2820 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2821 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 2822 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2823 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2824 | }</pre> |
| 2825 | </div> |
| 2826 | |
| 2827 | <div class="method"> |
| 2828 | <code class="details" id="promoteReplica">promoteReplica(project, instance, x__xgafv=None)</code> |
| 2829 | <pre>Promotes the read replica instance to be a stand-alone Cloud SQL instance. |
| 2830 | Using this operation might cause your instance to restart. |
| 2831 | |
| 2832 | Args: |
| 2833 | project: string, ID of the project that contains the read replica. (required) |
| 2834 | instance: string, Cloud SQL read replica instance name. (required) |
| 2835 | x__xgafv: string, V1 error format. |
| 2836 | Allowed values |
| 2837 | 1 - v1 error format |
| 2838 | 2 - v2 error format |
| 2839 | |
| 2840 | Returns: |
| 2841 | An object of the form: |
| 2842 | |
| 2843 | { # An Operation resource.&nbsp;For successful operations that return an |
| 2844 | # Operation resource, only the fields relevant to the operation are populated |
| 2845 | # in the resource. |
| 2846 | "user": "A String", # The email address of the user who initiated this operation. |
| 2847 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 2848 | "selfLink": "A String", # The URI of this resource. |
| 2849 | "targetLink": "A String", |
| 2850 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 2851 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 2852 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 2853 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 2854 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 2855 | # <code>DELETE_DATABASE</code> . |
| 2856 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 2857 | # populated. |
| 2858 | "errors": [ # The list of errors encountered while processing this operation. |
| 2859 | { # Database instance operation error. |
| 2860 | "code": "A String", # Identifies the specific error that occurred. |
| 2861 | "message": "A String", # Additional information about the error encountered. |
| 2862 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 2863 | }, |
| 2864 | ], |
| 2865 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 2866 | }, |
| 2867 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 2868 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 2869 | "csvImportOptions": { # Options for importing data as CSV. |
| 2870 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 2871 | # of the database table are loaded with CSV data. |
| 2872 | "A String", |
| 2873 | ], |
| 2874 | "table": "A String", # The table to which CSV data is imported. |
| 2875 | }, |
| 2876 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 2877 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 2878 | # <code>SQL</code>, this field is required only if the import file does not |
| 2879 | # specify a database, and is overridden by any database specification in the |
| 2880 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 2881 | # must be specified. |
| 2882 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 2883 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 2884 | "encryptionOptions": { |
| 2885 | "pvkPassword": "A String", # Password that encrypts the private key |
| 2886 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 2887 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 2888 | # write permissions to the bucket and read access to the file. |
| 2889 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 2890 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 2891 | # write permissions to the bucket and read access to the file. |
| 2892 | }, |
| 2893 | }, |
| 2894 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 2895 | # <code>gs: |
| 2896 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 2897 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 2898 | # // write permissions to the bucket and read access to the file. |
| 2899 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 2900 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 2901 | }, |
| 2902 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 2903 | # <code>RUNNING</code>, <code>DONE</code>, |
| 2904 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 2905 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 2906 | # identifier to retrieve the Operations resource that has information about |
| 2907 | # the operation. |
| 2908 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 2909 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 2910 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 2911 | # databases are exported, except for the <code>mysql</code> system database. |
| 2912 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 2913 | # either by using this property or by using the |
| 2914 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 2915 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 2916 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 2917 | # this database must match the one specified in the |
| 2918 | # <code>csvExportOptions.selectQuery</code> property. |
| 2919 | "A String", |
| 2920 | ], |
| 2921 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 2922 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 2923 | # you specify tables, specify one and only one database. For PostgreSQL |
| 2924 | # instances, you can specify only one table. |
| 2925 | "A String", |
| 2926 | ], |
| 2927 | "schemaOnly": True or False, # Export only schemas. |
| 2928 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 2929 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 2930 | # If set to <code>1</code>, the dump file includes |
| 2931 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 2932 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 2933 | # a SQL comment, and has no effect. |
| 2934 | # All other values are ignored. |
| 2935 | }, |
| 2936 | }, |
| 2937 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 2938 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 2939 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 2940 | # stored. The URI is in the form <code>gs: |
| 2941 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 2942 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 2943 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 2944 | # // compressed. |
| 2945 | "csvExportOptions": { # Options for exporting data as CSV. |
| 2946 | "selectQuery": "A String", # The select query used to extract the data. |
| 2947 | }, |
| 2948 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 2949 | }, |
| 2950 | "targetId": "A String", # Name of the database instance related to this operation. |
| 2951 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 2952 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2953 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2954 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 2955 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2956 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2957 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 2958 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2959 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2960 | }</pre> |
| 2961 | </div> |
| 2962 | |
| 2963 | <div class="method"> |
| 2964 | <code class="details" id="resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</code> |
| 2965 | <pre>Deletes all client certificates and generates a new server SSL certificate |
| 2966 | for the instance. |
| 2967 | |
| 2968 | Args: |
| 2969 | project: string, Project ID of the project that contains the instance. (required) |
| 2970 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 2971 | x__xgafv: string, V1 error format. |
| 2972 | Allowed values |
| 2973 | 1 - v1 error format |
| 2974 | 2 - v2 error format |
| 2975 | |
| 2976 | Returns: |
| 2977 | An object of the form: |
| 2978 | |
| 2979 | { # An Operation resource.&nbsp;For successful operations that return an |
| 2980 | # Operation resource, only the fields relevant to the operation are populated |
| 2981 | # in the resource. |
| 2982 | "user": "A String", # The email address of the user who initiated this operation. |
| 2983 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 2984 | "selfLink": "A String", # The URI of this resource. |
| 2985 | "targetLink": "A String", |
| 2986 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 2987 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 2988 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 2989 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 2990 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 2991 | # <code>DELETE_DATABASE</code> . |
| 2992 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 2993 | # populated. |
| 2994 | "errors": [ # The list of errors encountered while processing this operation. |
| 2995 | { # Database instance operation error. |
| 2996 | "code": "A String", # Identifies the specific error that occurred. |
| 2997 | "message": "A String", # Additional information about the error encountered. |
| 2998 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 2999 | }, |
| 3000 | ], |
| 3001 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3002 | }, |
| 3003 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3004 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 3005 | "csvImportOptions": { # Options for importing data as CSV. |
| 3006 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3007 | # of the database table are loaded with CSV data. |
| 3008 | "A String", |
| 3009 | ], |
| 3010 | "table": "A String", # The table to which CSV data is imported. |
| 3011 | }, |
| 3012 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3013 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 3014 | # <code>SQL</code>, this field is required only if the import file does not |
| 3015 | # specify a database, and is overridden by any database specification in the |
| 3016 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3017 | # must be specified. |
| 3018 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3019 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3020 | "encryptionOptions": { |
| 3021 | "pvkPassword": "A String", # Password that encrypts the private key |
| 3022 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3023 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3024 | # write permissions to the bucket and read access to the file. |
| 3025 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3026 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3027 | # write permissions to the bucket and read access to the file. |
| 3028 | }, |
| 3029 | }, |
| 3030 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 3031 | # <code>gs: |
| 3032 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3033 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3034 | # // write permissions to the bucket and read access to the file. |
| 3035 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3036 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3037 | }, |
| 3038 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3039 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3040 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3041 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 3042 | # identifier to retrieve the Operations resource that has information about |
| 3043 | # the operation. |
| 3044 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 3045 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 3046 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 3047 | # databases are exported, except for the <code>mysql</code> system database. |
| 3048 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 3049 | # either by using this property or by using the |
| 3050 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 3051 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 3052 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 3053 | # this database must match the one specified in the |
| 3054 | # <code>csvExportOptions.selectQuery</code> property. |
| 3055 | "A String", |
| 3056 | ], |
| 3057 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 3058 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 3059 | # you specify tables, specify one and only one database. For PostgreSQL |
| 3060 | # instances, you can specify only one table. |
| 3061 | "A String", |
| 3062 | ], |
| 3063 | "schemaOnly": True or False, # Export only schemas. |
| 3064 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 3065 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 3066 | # If set to <code>1</code>, the dump file includes |
| 3067 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 3068 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 3069 | # a SQL comment, and has no effect. |
| 3070 | # All other values are ignored. |
| 3071 | }, |
| 3072 | }, |
| 3073 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3074 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3075 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3076 | # stored. The URI is in the form <code>gs: |
| 3077 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3078 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3079 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3080 | # // compressed. |
| 3081 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3082 | "selectQuery": "A String", # The select query used to extract the data. |
| 3083 | }, |
| 3084 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 3085 | }, |
| 3086 | "targetId": "A String", # Name of the database instance related to this operation. |
| 3087 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3088 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3089 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3090 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3091 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3092 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3093 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3094 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3095 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3096 | }</pre> |
| 3097 | </div> |
| 3098 | |
| 3099 | <div class="method"> |
| 3100 | <code class="details" id="restart">restart(project, instance, x__xgafv=None)</code> |
| 3101 | <pre>Restarts a Cloud SQL instance. |
| 3102 | |
| 3103 | Args: |
| 3104 | project: string, Project ID of the project that contains the instance to be restarted. (required) |
| 3105 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 3106 | x__xgafv: string, V1 error format. |
| 3107 | Allowed values |
| 3108 | 1 - v1 error format |
| 3109 | 2 - v2 error format |
| 3110 | |
| 3111 | Returns: |
| 3112 | An object of the form: |
| 3113 | |
| 3114 | { # An Operation resource.&nbsp;For successful operations that return an |
| 3115 | # Operation resource, only the fields relevant to the operation are populated |
| 3116 | # in the resource. |
| 3117 | "user": "A String", # The email address of the user who initiated this operation. |
| 3118 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 3119 | "selfLink": "A String", # The URI of this resource. |
| 3120 | "targetLink": "A String", |
| 3121 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 3122 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 3123 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 3124 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 3125 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 3126 | # <code>DELETE_DATABASE</code> . |
| 3127 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 3128 | # populated. |
| 3129 | "errors": [ # The list of errors encountered while processing this operation. |
| 3130 | { # Database instance operation error. |
| 3131 | "code": "A String", # Identifies the specific error that occurred. |
| 3132 | "message": "A String", # Additional information about the error encountered. |
| 3133 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 3134 | }, |
| 3135 | ], |
| 3136 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3137 | }, |
| 3138 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3139 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 3140 | "csvImportOptions": { # Options for importing data as CSV. |
| 3141 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3142 | # of the database table are loaded with CSV data. |
| 3143 | "A String", |
| 3144 | ], |
| 3145 | "table": "A String", # The table to which CSV data is imported. |
| 3146 | }, |
| 3147 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3148 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 3149 | # <code>SQL</code>, this field is required only if the import file does not |
| 3150 | # specify a database, and is overridden by any database specification in the |
| 3151 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3152 | # must be specified. |
| 3153 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3154 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3155 | "encryptionOptions": { |
| 3156 | "pvkPassword": "A String", # Password that encrypts the private key |
| 3157 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3158 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3159 | # write permissions to the bucket and read access to the file. |
| 3160 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3161 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3162 | # write permissions to the bucket and read access to the file. |
| 3163 | }, |
| 3164 | }, |
| 3165 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 3166 | # <code>gs: |
| 3167 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3168 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3169 | # // write permissions to the bucket and read access to the file. |
| 3170 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3171 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3172 | }, |
| 3173 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3174 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3175 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3176 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 3177 | # identifier to retrieve the Operations resource that has information about |
| 3178 | # the operation. |
| 3179 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 3180 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 3181 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 3182 | # databases are exported, except for the <code>mysql</code> system database. |
| 3183 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 3184 | # either by using this property or by using the |
| 3185 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 3186 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 3187 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 3188 | # this database must match the one specified in the |
| 3189 | # <code>csvExportOptions.selectQuery</code> property. |
| 3190 | "A String", |
| 3191 | ], |
| 3192 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 3193 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 3194 | # you specify tables, specify one and only one database. For PostgreSQL |
| 3195 | # instances, you can specify only one table. |
| 3196 | "A String", |
| 3197 | ], |
| 3198 | "schemaOnly": True or False, # Export only schemas. |
| 3199 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 3200 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 3201 | # If set to <code>1</code>, the dump file includes |
| 3202 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 3203 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 3204 | # a SQL comment, and has no effect. |
| 3205 | # All other values are ignored. |
| 3206 | }, |
| 3207 | }, |
| 3208 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3209 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3210 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3211 | # stored. The URI is in the form <code>gs: |
| 3212 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3213 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3214 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3215 | # // compressed. |
| 3216 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3217 | "selectQuery": "A String", # The select query used to extract the data. |
| 3218 | }, |
| 3219 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 3220 | }, |
| 3221 | "targetId": "A String", # Name of the database instance related to this operation. |
| 3222 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3223 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3224 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3225 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3226 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3227 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3228 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3229 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3230 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3231 | }</pre> |
| 3232 | </div> |
| 3233 | |
| 3234 | <div class="method"> |
| 3235 | <code class="details" id="restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</code> |
| 3236 | <pre>Restores a backup of a Cloud SQL instance. Using this operation might cause |
| 3237 | your instance to restart. |
| 3238 | |
| 3239 | Args: |
| 3240 | project: string, Project ID of the project that contains the instance. (required) |
| 3241 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 3242 | body: object, The request body. |
| 3243 | The object takes the form of: |
| 3244 | |
| 3245 | { # Database instance restore backup request. |
| 3246 | "restoreBackupContext": { # Database instance restore from backup context. # Parameters required to perform the restore backup operation. |
| 3247 | # Backup context contains source instance id and project id. |
| 3248 | "instanceId": "A String", # The ID of the instance that the backup was taken from. |
| 3249 | "kind": "A String", # This is always <code>sql#restoreBackupContext</code>. |
| 3250 | "project": "A String", # The full project ID of the source instance. |
| 3251 | "backupRunId": "A String", # The ID of the backup run to restore from. |
| 3252 | }, |
| 3253 | } |
| 3254 | |
| 3255 | x__xgafv: string, V1 error format. |
| 3256 | Allowed values |
| 3257 | 1 - v1 error format |
| 3258 | 2 - v2 error format |
| 3259 | |
| 3260 | Returns: |
| 3261 | An object of the form: |
| 3262 | |
| 3263 | { # An Operation resource.&nbsp;For successful operations that return an |
| 3264 | # Operation resource, only the fields relevant to the operation are populated |
| 3265 | # in the resource. |
| 3266 | "user": "A String", # The email address of the user who initiated this operation. |
| 3267 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 3268 | "selfLink": "A String", # The URI of this resource. |
| 3269 | "targetLink": "A String", |
| 3270 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 3271 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 3272 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 3273 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 3274 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 3275 | # <code>DELETE_DATABASE</code> . |
| 3276 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 3277 | # populated. |
| 3278 | "errors": [ # The list of errors encountered while processing this operation. |
| 3279 | { # Database instance operation error. |
| 3280 | "code": "A String", # Identifies the specific error that occurred. |
| 3281 | "message": "A String", # Additional information about the error encountered. |
| 3282 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 3283 | }, |
| 3284 | ], |
| 3285 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3286 | }, |
| 3287 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3288 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 3289 | "csvImportOptions": { # Options for importing data as CSV. |
| 3290 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3291 | # of the database table are loaded with CSV data. |
| 3292 | "A String", |
| 3293 | ], |
| 3294 | "table": "A String", # The table to which CSV data is imported. |
| 3295 | }, |
| 3296 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3297 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 3298 | # <code>SQL</code>, this field is required only if the import file does not |
| 3299 | # specify a database, and is overridden by any database specification in the |
| 3300 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3301 | # must be specified. |
| 3302 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3303 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3304 | "encryptionOptions": { |
| 3305 | "pvkPassword": "A String", # Password that encrypts the private key |
| 3306 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3307 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3308 | # write permissions to the bucket and read access to the file. |
| 3309 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3310 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3311 | # write permissions to the bucket and read access to the file. |
| 3312 | }, |
| 3313 | }, |
| 3314 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 3315 | # <code>gs: |
| 3316 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3317 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3318 | # // write permissions to the bucket and read access to the file. |
| 3319 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3320 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3321 | }, |
| 3322 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3323 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3324 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3325 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 3326 | # identifier to retrieve the Operations resource that has information about |
| 3327 | # the operation. |
| 3328 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 3329 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 3330 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 3331 | # databases are exported, except for the <code>mysql</code> system database. |
| 3332 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 3333 | # either by using this property or by using the |
| 3334 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 3335 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 3336 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 3337 | # this database must match the one specified in the |
| 3338 | # <code>csvExportOptions.selectQuery</code> property. |
| 3339 | "A String", |
| 3340 | ], |
| 3341 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 3342 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 3343 | # you specify tables, specify one and only one database. For PostgreSQL |
| 3344 | # instances, you can specify only one table. |
| 3345 | "A String", |
| 3346 | ], |
| 3347 | "schemaOnly": True or False, # Export only schemas. |
| 3348 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 3349 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 3350 | # If set to <code>1</code>, the dump file includes |
| 3351 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 3352 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 3353 | # a SQL comment, and has no effect. |
| 3354 | # All other values are ignored. |
| 3355 | }, |
| 3356 | }, |
| 3357 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3358 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3359 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3360 | # stored. The URI is in the form <code>gs: |
| 3361 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3362 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3363 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3364 | # // compressed. |
| 3365 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3366 | "selectQuery": "A String", # The select query used to extract the data. |
| 3367 | }, |
| 3368 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 3369 | }, |
| 3370 | "targetId": "A String", # Name of the database instance related to this operation. |
| 3371 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3372 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3373 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3374 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3375 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3376 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3377 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3378 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3379 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3380 | }</pre> |
| 3381 | </div> |
| 3382 | |
| 3383 | <div class="method"> |
| 3384 | <code class="details" id="rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</code> |
| 3385 | <pre>Rotates the server certificate to one signed by the Certificate Authority |
| 3386 | (CA) version previously added with the addServerCA method. |
| 3387 | |
| 3388 | Args: |
| 3389 | project: string, Project ID of the project that contains the instance. (required) |
| 3390 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 3391 | body: object, The request body. |
| 3392 | The object takes the form of: |
| 3393 | |
| 3394 | { # Rotate Server CA request. |
| 3395 | "rotateServerCaContext": { # Instance rotate server CA context. # Contains details about the rotate server CA operation. |
| 3396 | "kind": "A String", # This is always <code>sql#rotateServerCaContext</code>. |
| 3397 | "nextVersion": "A String", # The fingerprint of the next version to be rotated to. If left unspecified, |
| 3398 | # will be rotated to the most recently added server CA version. |
| 3399 | }, |
| 3400 | } |
| 3401 | |
| 3402 | x__xgafv: string, V1 error format. |
| 3403 | Allowed values |
| 3404 | 1 - v1 error format |
| 3405 | 2 - v2 error format |
| 3406 | |
| 3407 | Returns: |
| 3408 | An object of the form: |
| 3409 | |
| 3410 | { # An Operation resource.&nbsp;For successful operations that return an |
| 3411 | # Operation resource, only the fields relevant to the operation are populated |
| 3412 | # in the resource. |
| 3413 | "user": "A String", # The email address of the user who initiated this operation. |
| 3414 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 3415 | "selfLink": "A String", # The URI of this resource. |
| 3416 | "targetLink": "A String", |
| 3417 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 3418 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 3419 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 3420 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 3421 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 3422 | # <code>DELETE_DATABASE</code> . |
| 3423 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 3424 | # populated. |
| 3425 | "errors": [ # The list of errors encountered while processing this operation. |
| 3426 | { # Database instance operation error. |
| 3427 | "code": "A String", # Identifies the specific error that occurred. |
| 3428 | "message": "A String", # Additional information about the error encountered. |
| 3429 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 3430 | }, |
| 3431 | ], |
| 3432 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3433 | }, |
| 3434 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3435 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 3436 | "csvImportOptions": { # Options for importing data as CSV. |
| 3437 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3438 | # of the database table are loaded with CSV data. |
| 3439 | "A String", |
| 3440 | ], |
| 3441 | "table": "A String", # The table to which CSV data is imported. |
| 3442 | }, |
| 3443 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3444 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 3445 | # <code>SQL</code>, this field is required only if the import file does not |
| 3446 | # specify a database, and is overridden by any database specification in the |
| 3447 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3448 | # must be specified. |
| 3449 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3450 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3451 | "encryptionOptions": { |
| 3452 | "pvkPassword": "A String", # Password that encrypts the private key |
| 3453 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3454 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3455 | # write permissions to the bucket and read access to the file. |
| 3456 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3457 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3458 | # write permissions to the bucket and read access to the file. |
| 3459 | }, |
| 3460 | }, |
| 3461 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 3462 | # <code>gs: |
| 3463 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3464 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3465 | # // write permissions to the bucket and read access to the file. |
| 3466 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3467 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3468 | }, |
| 3469 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3470 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3471 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3472 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 3473 | # identifier to retrieve the Operations resource that has information about |
| 3474 | # the operation. |
| 3475 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 3476 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 3477 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 3478 | # databases are exported, except for the <code>mysql</code> system database. |
| 3479 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 3480 | # either by using this property or by using the |
| 3481 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 3482 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 3483 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 3484 | # this database must match the one specified in the |
| 3485 | # <code>csvExportOptions.selectQuery</code> property. |
| 3486 | "A String", |
| 3487 | ], |
| 3488 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 3489 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 3490 | # you specify tables, specify one and only one database. For PostgreSQL |
| 3491 | # instances, you can specify only one table. |
| 3492 | "A String", |
| 3493 | ], |
| 3494 | "schemaOnly": True or False, # Export only schemas. |
| 3495 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 3496 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 3497 | # If set to <code>1</code>, the dump file includes |
| 3498 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 3499 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 3500 | # a SQL comment, and has no effect. |
| 3501 | # All other values are ignored. |
| 3502 | }, |
| 3503 | }, |
| 3504 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3505 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3506 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3507 | # stored. The URI is in the form <code>gs: |
| 3508 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3509 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3510 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3511 | # // compressed. |
| 3512 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3513 | "selectQuery": "A String", # The select query used to extract the data. |
| 3514 | }, |
| 3515 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 3516 | }, |
| 3517 | "targetId": "A String", # Name of the database instance related to this operation. |
| 3518 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3519 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3520 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3521 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3522 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3523 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3524 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3525 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3526 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3527 | }</pre> |
| 3528 | </div> |
| 3529 | |
| 3530 | <div class="method"> |
| 3531 | <code class="details" id="startReplica">startReplica(project, instance, x__xgafv=None)</code> |
| 3532 | <pre>Starts the replication in the read replica instance. |
| 3533 | |
| 3534 | Args: |
| 3535 | project: string, ID of the project that contains the read replica. (required) |
| 3536 | instance: string, Cloud SQL read replica instance name. (required) |
| 3537 | x__xgafv: string, V1 error format. |
| 3538 | Allowed values |
| 3539 | 1 - v1 error format |
| 3540 | 2 - v2 error format |
| 3541 | |
| 3542 | Returns: |
| 3543 | An object of the form: |
| 3544 | |
| 3545 | { # An Operation resource.&nbsp;For successful operations that return an |
| 3546 | # Operation resource, only the fields relevant to the operation are populated |
| 3547 | # in the resource. |
| 3548 | "user": "A String", # The email address of the user who initiated this operation. |
| 3549 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 3550 | "selfLink": "A String", # The URI of this resource. |
| 3551 | "targetLink": "A String", |
| 3552 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 3553 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 3554 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 3555 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 3556 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 3557 | # <code>DELETE_DATABASE</code> . |
| 3558 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 3559 | # populated. |
| 3560 | "errors": [ # The list of errors encountered while processing this operation. |
| 3561 | { # Database instance operation error. |
| 3562 | "code": "A String", # Identifies the specific error that occurred. |
| 3563 | "message": "A String", # Additional information about the error encountered. |
| 3564 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 3565 | }, |
| 3566 | ], |
| 3567 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3568 | }, |
| 3569 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3570 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 3571 | "csvImportOptions": { # Options for importing data as CSV. |
| 3572 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3573 | # of the database table are loaded with CSV data. |
| 3574 | "A String", |
| 3575 | ], |
| 3576 | "table": "A String", # The table to which CSV data is imported. |
| 3577 | }, |
| 3578 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3579 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 3580 | # <code>SQL</code>, this field is required only if the import file does not |
| 3581 | # specify a database, and is overridden by any database specification in the |
| 3582 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3583 | # must be specified. |
| 3584 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3585 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3586 | "encryptionOptions": { |
| 3587 | "pvkPassword": "A String", # Password that encrypts the private key |
| 3588 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3589 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3590 | # write permissions to the bucket and read access to the file. |
| 3591 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3592 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3593 | # write permissions to the bucket and read access to the file. |
| 3594 | }, |
| 3595 | }, |
| 3596 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 3597 | # <code>gs: |
| 3598 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3599 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3600 | # // write permissions to the bucket and read access to the file. |
| 3601 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3602 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3603 | }, |
| 3604 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3605 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3606 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3607 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 3608 | # identifier to retrieve the Operations resource that has information about |
| 3609 | # the operation. |
| 3610 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 3611 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 3612 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 3613 | # databases are exported, except for the <code>mysql</code> system database. |
| 3614 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 3615 | # either by using this property or by using the |
| 3616 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 3617 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 3618 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 3619 | # this database must match the one specified in the |
| 3620 | # <code>csvExportOptions.selectQuery</code> property. |
| 3621 | "A String", |
| 3622 | ], |
| 3623 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 3624 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 3625 | # you specify tables, specify one and only one database. For PostgreSQL |
| 3626 | # instances, you can specify only one table. |
| 3627 | "A String", |
| 3628 | ], |
| 3629 | "schemaOnly": True or False, # Export only schemas. |
| 3630 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 3631 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 3632 | # If set to <code>1</code>, the dump file includes |
| 3633 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 3634 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 3635 | # a SQL comment, and has no effect. |
| 3636 | # All other values are ignored. |
| 3637 | }, |
| 3638 | }, |
| 3639 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3640 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3641 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3642 | # stored. The URI is in the form <code>gs: |
| 3643 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3644 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3645 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3646 | # // compressed. |
| 3647 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3648 | "selectQuery": "A String", # The select query used to extract the data. |
| 3649 | }, |
| 3650 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 3651 | }, |
| 3652 | "targetId": "A String", # Name of the database instance related to this operation. |
| 3653 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3654 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3655 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3656 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3657 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3658 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3659 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3660 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3661 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3662 | }</pre> |
| 3663 | </div> |
| 3664 | |
| 3665 | <div class="method"> |
| 3666 | <code class="details" id="stopReplica">stopReplica(project, instance, x__xgafv=None)</code> |
| 3667 | <pre>Stops the replication in the read replica instance. |
| 3668 | |
| 3669 | Args: |
| 3670 | project: string, ID of the project that contains the read replica. (required) |
| 3671 | instance: string, Cloud SQL read replica instance name. (required) |
| 3672 | x__xgafv: string, V1 error format. |
| 3673 | Allowed values |
| 3674 | 1 - v1 error format |
| 3675 | 2 - v2 error format |
| 3676 | |
| 3677 | Returns: |
| 3678 | An object of the form: |
| 3679 | |
| 3680 | { # An Operation resource.&nbsp;For successful operations that return an |
| 3681 | # Operation resource, only the fields relevant to the operation are populated |
| 3682 | # in the resource. |
| 3683 | "user": "A String", # The email address of the user who initiated this operation. |
| 3684 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 3685 | "selfLink": "A String", # The URI of this resource. |
| 3686 | "targetLink": "A String", |
| 3687 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 3688 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 3689 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 3690 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 3691 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 3692 | # <code>DELETE_DATABASE</code> . |
| 3693 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 3694 | # populated. |
| 3695 | "errors": [ # The list of errors encountered while processing this operation. |
| 3696 | { # Database instance operation error. |
| 3697 | "code": "A String", # Identifies the specific error that occurred. |
| 3698 | "message": "A String", # Additional information about the error encountered. |
| 3699 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 3700 | }, |
| 3701 | ], |
| 3702 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3703 | }, |
| 3704 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3705 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 3706 | "csvImportOptions": { # Options for importing data as CSV. |
| 3707 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3708 | # of the database table are loaded with CSV data. |
| 3709 | "A String", |
| 3710 | ], |
| 3711 | "table": "A String", # The table to which CSV data is imported. |
| 3712 | }, |
| 3713 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3714 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 3715 | # <code>SQL</code>, this field is required only if the import file does not |
| 3716 | # specify a database, and is overridden by any database specification in the |
| 3717 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3718 | # must be specified. |
| 3719 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3720 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3721 | "encryptionOptions": { |
| 3722 | "pvkPassword": "A String", # Password that encrypts the private key |
| 3723 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3724 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3725 | # write permissions to the bucket and read access to the file. |
| 3726 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3727 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3728 | # write permissions to the bucket and read access to the file. |
| 3729 | }, |
| 3730 | }, |
| 3731 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 3732 | # <code>gs: |
| 3733 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3734 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3735 | # // write permissions to the bucket and read access to the file. |
| 3736 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3737 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3738 | }, |
| 3739 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3740 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3741 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3742 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 3743 | # identifier to retrieve the Operations resource that has information about |
| 3744 | # the operation. |
| 3745 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 3746 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 3747 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 3748 | # databases are exported, except for the <code>mysql</code> system database. |
| 3749 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 3750 | # either by using this property or by using the |
| 3751 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 3752 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 3753 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 3754 | # this database must match the one specified in the |
| 3755 | # <code>csvExportOptions.selectQuery</code> property. |
| 3756 | "A String", |
| 3757 | ], |
| 3758 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 3759 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 3760 | # you specify tables, specify one and only one database. For PostgreSQL |
| 3761 | # instances, you can specify only one table. |
| 3762 | "A String", |
| 3763 | ], |
| 3764 | "schemaOnly": True or False, # Export only schemas. |
| 3765 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 3766 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 3767 | # If set to <code>1</code>, the dump file includes |
| 3768 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 3769 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 3770 | # a SQL comment, and has no effect. |
| 3771 | # All other values are ignored. |
| 3772 | }, |
| 3773 | }, |
| 3774 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3775 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3776 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3777 | # stored. The URI is in the form <code>gs: |
| 3778 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3779 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3780 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3781 | # // compressed. |
| 3782 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3783 | "selectQuery": "A String", # The select query used to extract the data. |
| 3784 | }, |
| 3785 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 3786 | }, |
| 3787 | "targetId": "A String", # Name of the database instance related to this operation. |
| 3788 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3789 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3790 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3791 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3792 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3793 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3794 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3795 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3796 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3797 | }</pre> |
| 3798 | </div> |
| 3799 | |
| 3800 | <div class="method"> |
| 3801 | <code class="details" id="truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</code> |
| 3802 | <pre>Truncate MySQL general and slow query log tables |
| 3803 | |
| 3804 | Args: |
| 3805 | project: string, Project ID of the Cloud SQL project. (required) |
| 3806 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 3807 | body: object, The request body. |
| 3808 | The object takes the form of: |
| 3809 | |
| 3810 | { # Instance truncate log request. |
| 3811 | "truncateLogContext": { # Database Instance truncate log context. # Contains details about the truncate log operation. |
| 3812 | "logType": "A String", # The type of log to truncate. Valid values are |
| 3813 | # <code>MYSQL_GENERAL_TABLE</code> and <code>MYSQL_SLOW_TABLE</code>. |
| 3814 | "kind": "A String", # This is always <code>sql#truncateLogContext</code>. |
| 3815 | }, |
| 3816 | } |
| 3817 | |
| 3818 | x__xgafv: string, V1 error format. |
| 3819 | Allowed values |
| 3820 | 1 - v1 error format |
| 3821 | 2 - v2 error format |
| 3822 | |
| 3823 | Returns: |
| 3824 | An object of the form: |
| 3825 | |
| 3826 | { # An Operation resource.&nbsp;For successful operations that return an |
| 3827 | # Operation resource, only the fields relevant to the operation are populated |
| 3828 | # in the resource. |
| 3829 | "user": "A String", # The email address of the user who initiated this operation. |
| 3830 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 3831 | "selfLink": "A String", # The URI of this resource. |
| 3832 | "targetLink": "A String", |
| 3833 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 3834 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 3835 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 3836 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 3837 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 3838 | # <code>DELETE_DATABASE</code> . |
| 3839 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 3840 | # populated. |
| 3841 | "errors": [ # The list of errors encountered while processing this operation. |
| 3842 | { # Database instance operation error. |
| 3843 | "code": "A String", # Identifies the specific error that occurred. |
| 3844 | "message": "A String", # Additional information about the error encountered. |
| 3845 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 3846 | }, |
| 3847 | ], |
| 3848 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3849 | }, |
| 3850 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3851 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 3852 | "csvImportOptions": { # Options for importing data as CSV. |
| 3853 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3854 | # of the database table are loaded with CSV data. |
| 3855 | "A String", |
| 3856 | ], |
| 3857 | "table": "A String", # The table to which CSV data is imported. |
| 3858 | }, |
| 3859 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3860 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 3861 | # <code>SQL</code>, this field is required only if the import file does not |
| 3862 | # specify a database, and is overridden by any database specification in the |
| 3863 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3864 | # must be specified. |
| 3865 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3866 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3867 | "encryptionOptions": { |
| 3868 | "pvkPassword": "A String", # Password that encrypts the private key |
| 3869 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3870 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3871 | # write permissions to the bucket and read access to the file. |
| 3872 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3873 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3874 | # write permissions to the bucket and read access to the file. |
| 3875 | }, |
| 3876 | }, |
| 3877 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 3878 | # <code>gs: |
| 3879 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3880 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3881 | # // write permissions to the bucket and read access to the file. |
| 3882 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3883 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3884 | }, |
| 3885 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3886 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3887 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3888 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 3889 | # identifier to retrieve the Operations resource that has information about |
| 3890 | # the operation. |
| 3891 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 3892 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 3893 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 3894 | # databases are exported, except for the <code>mysql</code> system database. |
| 3895 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 3896 | # either by using this property or by using the |
| 3897 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 3898 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 3899 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 3900 | # this database must match the one specified in the |
| 3901 | # <code>csvExportOptions.selectQuery</code> property. |
| 3902 | "A String", |
| 3903 | ], |
| 3904 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 3905 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 3906 | # you specify tables, specify one and only one database. For PostgreSQL |
| 3907 | # instances, you can specify only one table. |
| 3908 | "A String", |
| 3909 | ], |
| 3910 | "schemaOnly": True or False, # Export only schemas. |
| 3911 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 3912 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 3913 | # If set to <code>1</code>, the dump file includes |
| 3914 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 3915 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 3916 | # a SQL comment, and has no effect. |
| 3917 | # All other values are ignored. |
| 3918 | }, |
| 3919 | }, |
| 3920 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3921 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3922 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3923 | # stored. The URI is in the form <code>gs: |
| 3924 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3925 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3926 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3927 | # // compressed. |
| 3928 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3929 | "selectQuery": "A String", # The select query used to extract the data. |
| 3930 | }, |
| 3931 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 3932 | }, |
| 3933 | "targetId": "A String", # Name of the database instance related to this operation. |
| 3934 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3935 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3936 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3937 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3938 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3939 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3940 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3941 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3942 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3943 | }</pre> |
| 3944 | </div> |
| 3945 | |
| 3946 | <div class="method"> |
| 3947 | <code class="details" id="update">update(project, instance, body=None, x__xgafv=None)</code> |
| 3948 | <pre>Updates settings of a Cloud SQL instance. Using this operation might cause |
| 3949 | your instance to restart. |
| 3950 | |
| 3951 | Args: |
| 3952 | project: string, Project ID of the project that contains the instance. (required) |
| 3953 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 3954 | body: object, The request body. |
| 3955 | The object takes the form of: |
| 3956 | |
| 3957 | { # A Cloud SQL instance resource. |
| 3958 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only |
| 3959 | # to First Generation instances. |
| 3960 | "selfLink": "A String", # The URI of this resource. |
| 3961 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. |
| 3962 | # Applies only to Second Generation instances. |
| 3963 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 3964 | "kind": "A String", # This is always <code>sql#diskEncryptionStatus</code>. |
| 3965 | }, |
| 3966 | "kind": "A String", # This is always <code>sql#instance</code>. |
| 3967 | "region": "A String", # The geographical region. Can be <code>us-central</code> |
| 3968 | # (<code>FIRST_GEN</code> instances only), <code>us-central1</code> |
| 3969 | # (<code>SECOND_GEN</code> instances only), <code>asia-east1</code> or |
| 3970 | # <code>europe-west1</code>. Defaults to <code>us-central</code> or |
| 3971 | # <code>us-central1</code> depending on the instance type (First Generation |
| 3972 | # or Second Generation). The region can not be changed after instance |
| 3973 | # creation. |
| 3974 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the |
| 3975 | # following. <br><code>RUNNABLE</code>: The instance is running, or is ready |
| 3976 | # to run when accessed. <br><code>SUSPENDED</code>: The instance is not |
| 3977 | # available, for example due to problems with billing. |
| 3978 | # <br><code>PENDING_CREATE</code>: The instance is being created. |
| 3979 | # <br><code>MAINTENANCE</code>: The instance is down for maintenance. |
| 3980 | # <br><code>FAILED</code>: The instance creation failed. |
| 3981 | # <br><code>UNKNOWN_STATE</code>: The state of the instance is unknown. |
| 3982 | "backendType": "A String", # <code>FIRST_GEN</code>: First Generation instance. MySQL only. <br |
| 3983 | # /><code>SECOND_GEN</code>: Second Generation instance or PostgreSQL |
| 3984 | # instance. <br /><code>EXTERNAL</code>: A database server that is not |
| 3985 | # managed by Google. <br>This property is read-only; use the |
| 3986 | # <code>tier</code> property in the <code>settings</code> object to determine |
| 3987 | # the database type and Second or First Generation. |
| 3988 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 3989 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 3990 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 3991 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 3992 | "username": "A String", # The username for connecting to on-premises instance. |
| 3993 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 3994 | "kind": "A String", # This is always <code>sql#onPremisesConfiguration</code>. |
| 3995 | "password": "A String", # The password for connecting to on-premises instance. |
| 3996 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 3997 | # is encoded in the client's certificate. |
| 3998 | }, |
| 3999 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google |
| 4000 | # apps domain is prefixed if applicable. |
| 4001 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property |
| 4002 | # is applicable only to Second Generation instances. |
| 4003 | "databaseVersion": "A String", # The database engine type and version. The <code>databaseVersion</code> |
| 4004 | # field can not be changed after instance creation. MySQL Second Generation |
| 4005 | # instances: <code>MYSQL_5_7</code> (default) or <code>MYSQL_5_6</code>. |
| 4006 | # PostgreSQL instances: <code>POSTGRES_9_6</code> (default) or |
| 4007 | # <code>POSTGRES_11 Beta</code> MySQL First Generation |
| 4008 | # instances: <code>MYSQL_5_6</code> (default) or <code>MYSQL_5_5</code> |
| 4009 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 4010 | "A String", |
| 4011 | ], |
| 4012 | "settings": { # Database instance settings. # The user settings. |
| 4013 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the |
| 4014 | # instance IP and manage which external networks can connect to the instance. |
| 4015 | # The IPv4 address cannot be disabled for Second Generation instances. |
| 4016 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is |
| 4017 | # accessible for private IP. For example, |
| 4018 | # <code>/projects/myProject/global/networks/default</code>. This setting can |
| 4019 | # be updated, but it cannot be removed after it is set. |
| 4020 | "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not. |
| 4021 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance |
| 4022 | # using the IP. In <a |
| 4023 | # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation">CIDR |
| 4024 | # notation</a>, also known as 'slash' notation (e.g. |
| 4025 | # <code>192.168.100.0/24</code>). |
| 4026 | { # An entry for an Access Control list. |
| 4027 | "value": "A String", # The whitelisted value for the access control list. |
| 4028 | "expirationTime": "A String", # The time when this access control entry expires in <a |
| 4029 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4030 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 4031 | "name": "A String", # Optional. A label to identify this entry. |
| 4032 | "kind": "A String", # This is always <code>sql#aclEntry</code>. |
| 4033 | }, |
| 4034 | ], |
| 4035 | "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not. |
| 4036 | }, |
| 4037 | "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values: |
| 4038 | # <br><code>ZONAL</code>: The instance serves data from only one zone. |
| 4039 | # Outages in that zone affect data accessibility. <br><code>REGIONAL</code>: |
| 4040 | # The instance can serve data from more than one zone in a region (it is |
| 4041 | # highly available). <br>For more information, see <a |
| 4042 | # href="https://cloud.google.com/sql/docs/postgres/high-availability">Overview |
| 4043 | # of the High Availability Configuration</a>. |
| 4044 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update |
| 4045 | # method to make sure concurrent updates are handled properly. During update, |
| 4046 | # use the most recent settingsVersion value for this instance and do not try |
| 4047 | # to update this value. |
| 4048 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 4049 | { # Database flags for Cloud SQL instances. |
| 4050 | "value": "A String", # The value of the flag. Booleans should be set to <code>on</code> for true |
| 4051 | # and <code>off</code> for false. This field must be omitted if the flag |
| 4052 | # doesn't take a value. |
| 4053 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so |
| 4054 | # include both server options and system variables for MySQL. Flags should be |
| 4055 | # specified with underscores, not hyphens. For more information, see <a |
| 4056 | # href="/sql/docs/mysql/flags">Configuring Database Flags</a> in the Cloud |
| 4057 | # SQL documentation. |
| 4058 | }, |
| 4059 | ], |
| 4060 | "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance |
| 4061 | # can be restarted for maintenance purposes. Not used for First Generation |
| 4062 | # instances. |
| 4063 | # preferably be restarted for system maintenance purposes. |
| 4064 | "updateTrack": "A String", # Maintenance timing setting: <code>canary</code> (Earlier) or |
| 4065 | # <code>stable</code> (Later). <br /><a |
| 4066 | # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"> |
| 4067 | # Learn more</a>. |
| 4068 | "hour": 42, # hour of day - 0 to 23. |
| 4069 | "day": 42, # day of week (1-7), starting on Monday. |
| 4070 | "kind": "A String", # This is always <code>sql#maintenanceWindow</code>. |
| 4071 | }, |
| 4072 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either <code>PER_USE</code> |
| 4073 | # or <code>PACKAGE</code>. Only <code>PER_USE</code> is supported for Second |
| 4074 | # Generation instances. |
| 4075 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is |
| 4076 | # true. Not used for First Generation instances. |
| 4077 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. |
| 4078 | # The default value is 0, which specifies that there is no limit. Not used |
| 4079 | # for First Generation instances. |
| 4080 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation |
| 4081 | # instances only. |
| 4082 | "A String", |
| 4083 | ], |
| 4084 | "tier": "A String", # The tier (or machine type) for this instance, for example |
| 4085 | # <code>db-n1-standard-1</code> (MySQL instances) or |
| 4086 | # <code>db-custom-1-3840</code> (PostgreSQL instances). For MySQL instances, |
| 4087 | # this property determines whether the instance is First or Second |
| 4088 | # Generation. For more information, see <a |
| 4089 | # href="/sql/docs/db_path/instance-settings">Instance Settings</a>. |
| 4090 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used |
| 4091 | # for First Generation instances. |
| 4092 | "dataDiskType": "A String", # The type of data disk: <code>PD_SSD</code> (default) or |
| 4093 | # <code>PD_HDD</code>. Not used for First Generation instances. |
| 4094 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 4095 | # replication is enabled or not. |
| 4096 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 4097 | # database flags for crash-safe replication are enabled. This property is |
| 4098 | # only applicable to First Generation instances. |
| 4099 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 4100 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 4101 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 |
| 4102 | # hour format - <code>HH:MM</code>. |
| 4103 | "kind": "A String", # This is always <code>sql#backupConfiguration</code>. |
| 4104 | "enabled": True or False, # Whether this configuration is enabled. |
| 4105 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is |
| 4106 | # disabled, binarylog must be disabled as well. |
| 4107 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 4108 | "location": "A String", # Location of the backup |
| 4109 | }, |
| 4110 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a |
| 4111 | # single key value pair. |
| 4112 | "a_key": "A String", |
| 4113 | }, |
| 4114 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as |
| 4115 | # near as possible to either an App Engine app or Compute Engine zone for |
| 4116 | # better performance. App Engine co-location is only applicable to First |
| 4117 | # Generation instances. |
| 4118 | # preferably be located, either in a specific Compute Engine zone, or |
| 4119 | # co-located with an App Engine application. Note that if the preferred |
| 4120 | # location is not available, the instance will be located as close as possible |
| 4121 | # within the region. Only one location may be specified. |
| 4122 | "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the |
| 4123 | # Cloud SQL instance. |
| 4124 | "kind": "A String", # This is always <code>sql#locationPreference</code>. |
| 4125 | "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b, |
| 4126 | # etc.). |
| 4127 | }, |
| 4128 | "kind": "A String", # This is always <code>sql#settings</code>. |
| 4129 | "replicationType": "A String", # The type of replication this instance uses. This can be either |
| 4130 | # <code>ASYNCHRONOUS</code> or <code>SYNCHRONOUS</code>. This property is |
| 4131 | # only applicable to First Generation instances. |
| 4132 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is |
| 4133 | # applicable only when the instance state is <code>RUNNABLE</code>. Valid |
| 4134 | # values: <br><code>ALWAYS</code>: The instance is on, and remains so even in |
| 4135 | # the absence of connection requests. <br><code>NEVER</code>: The instance is |
| 4136 | # off; it is not activated, even if a connection request arrives. |
| 4137 | # <br><code>ON_DEMAND</code>: First Generation instances only. The instance |
| 4138 | # responds to incoming requests, and turns itself off when not in use. |
| 4139 | # Instances with <code>PER_USE</code> pricing turn off after 15 minutes of |
| 4140 | # inactivity. Instances with <code>PER_PACKAGE</code> pricing turn off after |
| 4141 | # 12 hours of inactivity. |
| 4142 | }, |
| 4143 | "replicaNames": [ # The replicas of the instance. |
| 4144 | "A String", |
| 4145 | ], |
| 4146 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. |
| 4147 | # Applies only to Second Generation instances. |
| 4148 | "kind": "A String", # This is always <code>sql#diskEncryptionConfiguration</code>. |
| 4149 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 4150 | }, |
| 4151 | "rootPassword": "A String", # Initial root password. Use only on creation. |
| 4152 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 4153 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 4154 | "canDefer": True or False, |
| 4155 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 4156 | }, |
| 4157 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 4158 | # API. Use the <code>settings.settingsVersion</code> field instead. |
| 4159 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 4160 | "selfLink": "A String", # The URI of this resource. |
| 4161 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 4162 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4163 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 4164 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 4165 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 4166 | "cert": "A String", # PEM representation. |
| 4167 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 4168 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 4169 | "createTime": "A String", # The time when the certificate was created in <a |
| 4170 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4171 | # <code>2012-11-15T16:19:00.094Z</code> |
| 4172 | "instance": "A String", # Name of the database instance. |
| 4173 | }, |
| 4174 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 4175 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 4176 | "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup. |
| 4177 | "instanceType": "A String", # The instance type. This can be one of the following. |
| 4178 | # <br><code>CLOUD_SQL_INSTANCE</code>: A Cloud SQL instance that is not |
| 4179 | # replicating from a master. <br><code>ON_PREMISES_INSTANCE</code>: An |
| 4180 | # instance running on the |
| 4181 | # customer's premises. <br><code>READ_REPLICA_INSTANCE</code>: A Cloud SQL |
| 4182 | # instance configured as a read-replica. |
| 4183 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This |
| 4184 | # value could be different from the zone that was specified when the instance |
| 4185 | # was created if the instance has failed over to its secondary zone. |
| 4186 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been |
| 4187 | # deprecated. Users should use the |
| 4188 | # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud |
| 4189 | # Monitoring API instead. Please see <a |
| 4190 | # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ">this |
| 4191 | # announcement</a> for details. |
| 4192 | "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas. |
| 4193 | "kind": "A String", # This is always <code>sql#replicaConfiguration</code>. |
| 4194 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises |
| 4195 | # master. Replication configuration information such as the username, |
| 4196 | # password, certificates, and keys are not stored in the instance metadata. |
| 4197 | # The configuration information is used only to set up the replication |
| 4198 | # connection and is stored by MySQL in a file named <code>master.info</code> |
| 4199 | # in the data directory. |
| 4200 | "kind": "A String", # This is always <code>sql#mysqlReplicaConfiguration</code>. |
| 4201 | "password": "A String", # The password for the replication connection. |
| 4202 | "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate |
| 4203 | # that it sends during the SSL handshake. |
| 4204 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 4205 | # is encoded in the client's certificate. |
| 4206 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 4207 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 4208 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 4209 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave |
| 4210 | # instance is to be created. The URI is in the form gs: |
| 4211 | # //bucketName/fileName. Compressed gzip files (.gz) are also supported. |
| 4212 | # // Dumps should have the binlog co-ordinates from which replication should |
| 4213 | # // begin. This can be accomplished by setting --master-data to 1 when using |
| 4214 | # // mysqldump. |
| 4215 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 4216 | "username": "A String", # The username for the replication connection. |
| 4217 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 4218 | }, |
| 4219 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to |
| 4220 | # <code>true</code> the replica will be designated as a failover replica. In |
| 4221 | # case the master instance fails, the replica instance will be promoted as |
| 4222 | # the new master instance. <p>Only one replica can be specified as failover |
| 4223 | # target, and the replica has to be in different zone with the master |
| 4224 | # instance. |
| 4225 | }, |
| 4226 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 4227 | "failoverReplica": { # The name and status of the failover replica. This property is applicable |
| 4228 | # only to Second Generation instances. |
| 4229 | "available": True or False, # The availability status of the failover replica. A false status indicates |
| 4230 | # that the failover replica is out of sync. The master can only failover to |
| 4231 | # the failover replica when the status is true. |
| 4232 | "name": "A String", # The name of the failover replica. If specified at instance creation, a |
| 4233 | # failover replica is created for the instance. The name |
| 4234 | # doesn't include the project ID. This property is applicable only to |
| 4235 | # Second Generation instances. |
| 4236 | }, |
| 4237 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 4238 | { # Database instance IP Mapping. |
| 4239 | "timeToRetire": "A String", # The due time for this IP to be retired in <a |
| 4240 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4241 | # <code>2012-11-15T16:19:00.094Z</code>. This field is only available when |
| 4242 | # the IP is scheduled to be retired. |
| 4243 | "type": "A String", # The type of this IP address. A <code>PRIMARY</code> address is a public |
| 4244 | # address that can accept incoming connections. A <code>PRIVATE</code> |
| 4245 | # address is a private address that can accept incoming connections. An |
| 4246 | # <code>OUTGOING</code> address is the source address of connections |
| 4247 | # originating from the instance, if supported. |
| 4248 | "ipAddress": "A String", # The IP address assigned. |
| 4249 | }, |
| 4250 | ], |
| 4251 | } |
| 4252 | |
| 4253 | x__xgafv: string, V1 error format. |
| 4254 | Allowed values |
| 4255 | 1 - v1 error format |
| 4256 | 2 - v2 error format |
| 4257 | |
| 4258 | Returns: |
| 4259 | An object of the form: |
| 4260 | |
| 4261 | { # An Operation resource.&nbsp;For successful operations that return an |
| 4262 | # Operation resource, only the fields relevant to the operation are populated |
| 4263 | # in the resource. |
| 4264 | "user": "A String", # The email address of the user who initiated this operation. |
| 4265 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 4266 | "selfLink": "A String", # The URI of this resource. |
| 4267 | "targetLink": "A String", |
| 4268 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 4269 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 4270 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 4271 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 4272 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 4273 | # <code>DELETE_DATABASE</code> . |
| 4274 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 4275 | # populated. |
| 4276 | "errors": [ # The list of errors encountered while processing this operation. |
| 4277 | { # Database instance operation error. |
| 4278 | "code": "A String", # Identifies the specific error that occurred. |
| 4279 | "message": "A String", # Additional information about the error encountered. |
| 4280 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 4281 | }, |
| 4282 | ], |
| 4283 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 4284 | }, |
| 4285 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 4286 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 4287 | "csvImportOptions": { # Options for importing data as CSV. |
| 4288 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 4289 | # of the database table are loaded with CSV data. |
| 4290 | "A String", |
| 4291 | ], |
| 4292 | "table": "A String", # The table to which CSV data is imported. |
| 4293 | }, |
| 4294 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 4295 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 4296 | # <code>SQL</code>, this field is required only if the import file does not |
| 4297 | # specify a database, and is overridden by any database specification in the |
| 4298 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 4299 | # must be specified. |
| 4300 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 4301 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 4302 | "encryptionOptions": { |
| 4303 | "pvkPassword": "A String", # Password that encrypts the private key |
| 4304 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 4305 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 4306 | # write permissions to the bucket and read access to the file. |
| 4307 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 4308 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 4309 | # write permissions to the bucket and read access to the file. |
| 4310 | }, |
| 4311 | }, |
| 4312 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 4313 | # <code>gs: |
| 4314 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 4315 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 4316 | # // write permissions to the bucket and read access to the file. |
| 4317 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 4318 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 4319 | }, |
| 4320 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 4321 | # <code>RUNNING</code>, <code>DONE</code>, |
| 4322 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 4323 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 4324 | # identifier to retrieve the Operations resource that has information about |
| 4325 | # the operation. |
| 4326 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 4327 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 4328 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 4329 | # databases are exported, except for the <code>mysql</code> system database. |
| 4330 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 4331 | # either by using this property or by using the |
| 4332 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 4333 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 4334 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 4335 | # this database must match the one specified in the |
| 4336 | # <code>csvExportOptions.selectQuery</code> property. |
| 4337 | "A String", |
| 4338 | ], |
| 4339 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 4340 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 4341 | # you specify tables, specify one and only one database. For PostgreSQL |
| 4342 | # instances, you can specify only one table. |
| 4343 | "A String", |
| 4344 | ], |
| 4345 | "schemaOnly": True or False, # Export only schemas. |
| 4346 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 4347 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 4348 | # If set to <code>1</code>, the dump file includes |
| 4349 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 4350 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 4351 | # a SQL comment, and has no effect. |
| 4352 | # All other values are ignored. |
| 4353 | }, |
| 4354 | }, |
| 4355 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 4356 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 4357 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 4358 | # stored. The URI is in the form <code>gs: |
| 4359 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 4360 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 4361 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 4362 | # // compressed. |
| 4363 | "csvExportOptions": { # Options for exporting data as CSV. |
| 4364 | "selectQuery": "A String", # The select query used to extract the data. |
| 4365 | }, |
| 4366 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 4367 | }, |
| 4368 | "targetId": "A String", # Name of the database instance related to this operation. |
| 4369 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 4370 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4371 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 4372 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 4373 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4374 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 4375 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 4376 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4377 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 4378 | }</pre> |
| 4379 | </div> |
| 4380 | |
| 4381 | </body></html> |