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