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.projects.html">projects</a> . <a href="sql_v1beta4.projects.instances.html">instances</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#rescheduleMaintenance">rescheduleMaintenance(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 79 | <p class="firstline">Reschedules the maintenance on the given instance.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#startExternalSync">startExternalSync(project, instance, syncMode=None, x__xgafv=None)</a></code></p> |
| 82 | <p class="firstline">Start External master migration.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#verifyExternalSyncSettings">verifyExternalSyncSettings(project, instance, verifyConnectionOnly=None, syncMode=None, x__xgafv=None)</a></code></p> |
| 85 | <p class="firstline">Verify External master external sync settings.</p> |
| 86 | <h3>Method Details</h3> |
| 87 | <div class="method"> |
| 88 | <code class="details" id="rescheduleMaintenance">rescheduleMaintenance(project, instance, body=None, x__xgafv=None)</code> |
| 89 | <pre>Reschedules the maintenance on the given instance. |
| 90 | |
| 91 | Args: |
| 92 | project: string, ID of the project that contains the instance. (required) |
| 93 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 94 | body: object, The request body. |
| 95 | The object takes the form of: |
| 96 | |
| 97 | { # Reschedule options for maintenance windows. |
| 98 | "reschedule": { # Required. The type of the reschedule the user wants. |
| 99 | "rescheduleType": "A String", # Required. The type of the reschedule. |
| 100 | "scheduleTime": "A String", # Optional. Timestamp when the maintenance shall be rescheduled to if |
| 101 | # reschedule_type=SPECIFIC_TIME, in <a |
| 102 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for |
| 103 | # example <code>2012-11-15T16:19:00.094Z</code>. |
| 104 | }, |
| 105 | } |
| 106 | |
| 107 | x__xgafv: string, V1 error format. |
| 108 | Allowed values |
| 109 | 1 - v1 error format |
| 110 | 2 - v2 error format |
| 111 | |
| 112 | Returns: |
| 113 | An object of the form: |
| 114 | |
| 115 | { # An Operation resource.&nbsp;For successful operations that return an |
| 116 | # Operation resource, only the fields relevant to the operation are populated |
| 117 | # in the resource. |
| 118 | "user": "A String", # The email address of the user who initiated this operation. |
| 119 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 120 | "selfLink": "A String", # The URI of this resource. |
| 121 | "targetLink": "A String", |
| 122 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 123 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 124 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 125 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 126 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 127 | # <code>DELETE_DATABASE</code> . |
| 128 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 129 | # populated. |
| 130 | "errors": [ # The list of errors encountered while processing this operation. |
| 131 | { # Database instance operation error. |
| 132 | "code": "A String", # Identifies the specific error that occurred. |
| 133 | "message": "A String", # Additional information about the error encountered. |
| 134 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 135 | }, |
| 136 | ], |
| 137 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 138 | }, |
| 139 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 140 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 141 | "csvImportOptions": { # Options for importing data as CSV. |
| 142 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 143 | # of the database table are loaded with CSV data. |
| 144 | "A String", |
| 145 | ], |
| 146 | "table": "A String", # The table to which CSV data is imported. |
| 147 | }, |
| 148 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 149 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 150 | # <code>SQL</code>, this field is required only if the import file does not |
| 151 | # specify a database, and is overridden by any database specification in the |
| 152 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 153 | # must be specified. |
| 154 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 155 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 156 | "encryptionOptions": { |
| 157 | "pvkPassword": "A String", # Password that encrypts the private key |
| 158 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 159 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 160 | # write permissions to the bucket and read access to the file. |
| 161 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 162 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 163 | # write permissions to the bucket and read access to the file. |
| 164 | }, |
| 165 | }, |
| 166 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 167 | # <code>gs: |
| 168 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 169 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 170 | # // write permissions to the bucket and read access to the file. |
| 171 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 172 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 173 | }, |
| 174 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 175 | # <code>RUNNING</code>, <code>DONE</code>, |
| 176 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 177 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 178 | # identifier to retrieve the Operations resource that has information about |
| 179 | # the operation. |
| 180 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 181 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 182 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 183 | # databases are exported, except for the <code>mysql</code> system database. |
| 184 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 185 | # either by using this property or by using the |
| 186 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 187 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 188 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 189 | # this database must match the one specified in the |
| 190 | # <code>csvExportOptions.selectQuery</code> property. |
| 191 | "A String", |
| 192 | ], |
| 193 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 194 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 195 | # you specify tables, specify one and only one database. For PostgreSQL |
| 196 | # instances, you can specify only one table. |
| 197 | "A String", |
| 198 | ], |
| 199 | "schemaOnly": True or False, # Export only schemas. |
| 200 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 201 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 202 | # If set to <code>1</code>, the dump file includes |
| 203 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 204 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 205 | # a SQL comment, and has no effect. |
| 206 | # All other values are ignored. |
| 207 | }, |
| 208 | }, |
| 209 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 210 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 211 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 212 | # stored. The URI is in the form <code>gs: |
| 213 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 214 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 215 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 216 | # // compressed. |
| 217 | "csvExportOptions": { # Options for exporting data as CSV. |
| 218 | "selectQuery": "A String", # The select query used to extract the data. |
| 219 | }, |
| 220 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 221 | }, |
| 222 | "targetId": "A String", # Name of the database instance related to this operation. |
| 223 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 224 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 225 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 226 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 227 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 228 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 229 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 230 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 231 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 232 | }</pre> |
| 233 | </div> |
| 234 | |
| 235 | <div class="method"> |
| 236 | <code class="details" id="startExternalSync">startExternalSync(project, instance, syncMode=None, x__xgafv=None)</code> |
| 237 | <pre>Start External master migration. |
| 238 | |
| 239 | Args: |
| 240 | project: string, ID of the project that contains the first generation instance. (required) |
| 241 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 242 | syncMode: string, External sync mode |
| 243 | x__xgafv: string, V1 error format. |
| 244 | Allowed values |
| 245 | 1 - v1 error format |
| 246 | 2 - v2 error format |
| 247 | |
| 248 | Returns: |
| 249 | An object of the form: |
| 250 | |
| 251 | { # An Operation resource.&nbsp;For successful operations that return an |
| 252 | # Operation resource, only the fields relevant to the operation are populated |
| 253 | # in the resource. |
| 254 | "user": "A String", # The email address of the user who initiated this operation. |
| 255 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 256 | "selfLink": "A String", # The URI of this resource. |
| 257 | "targetLink": "A String", |
| 258 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 259 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 260 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 261 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 262 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 263 | # <code>DELETE_DATABASE</code> . |
| 264 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 265 | # populated. |
| 266 | "errors": [ # The list of errors encountered while processing this operation. |
| 267 | { # Database instance operation error. |
| 268 | "code": "A String", # Identifies the specific error that occurred. |
| 269 | "message": "A String", # Additional information about the error encountered. |
| 270 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 271 | }, |
| 272 | ], |
| 273 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 274 | }, |
| 275 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 276 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 277 | "csvImportOptions": { # Options for importing data as CSV. |
| 278 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 279 | # of the database table are loaded with CSV data. |
| 280 | "A String", |
| 281 | ], |
| 282 | "table": "A String", # The table to which CSV data is imported. |
| 283 | }, |
| 284 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 285 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
| 286 | # <code>SQL</code>, this field is required only if the import file does not |
| 287 | # specify a database, and is overridden by any database specification in the |
| 288 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 289 | # must be specified. |
| 290 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 291 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 292 | "encryptionOptions": { |
| 293 | "pvkPassword": "A String", # Password that encrypts the private key |
| 294 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 295 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 296 | # write permissions to the bucket and read access to the file. |
| 297 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 298 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 299 | # write permissions to the bucket and read access to the file. |
| 300 | }, |
| 301 | }, |
| 302 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
| 303 | # <code>gs: |
| 304 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 305 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 306 | # // write permissions to the bucket and read access to the file. |
| 307 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 308 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 309 | }, |
| 310 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 311 | # <code>RUNNING</code>, <code>DONE</code>, |
| 312 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 313 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
| 314 | # identifier to retrieve the Operations resource that has information about |
| 315 | # the operation. |
| 316 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 317 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
| 318 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 319 | # databases are exported, except for the <code>mysql</code> system database. |
| 320 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 321 | # either by using this property or by using the |
| 322 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 323 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 324 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 325 | # this database must match the one specified in the |
| 326 | # <code>csvExportOptions.selectQuery</code> property. |
| 327 | "A String", |
| 328 | ], |
| 329 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 330 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
| 331 | # you specify tables, specify one and only one database. For PostgreSQL |
| 332 | # instances, you can specify only one table. |
| 333 | "A String", |
| 334 | ], |
| 335 | "schemaOnly": True or False, # Export only schemas. |
| 336 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 337 | "masterData": 42, # Option to include SQL statement required to set up replication. |
| 338 | # If set to <code>1</code>, the dump file includes |
| 339 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 340 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 341 | # a SQL comment, and has no effect. |
| 342 | # All other values are ignored. |
| 343 | }, |
| 344 | }, |
| 345 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 346 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 347 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 348 | # stored. The URI is in the form <code>gs: |
| 349 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 350 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 351 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 352 | # // compressed. |
| 353 | "csvExportOptions": { # Options for exporting data as CSV. |
| 354 | "selectQuery": "A String", # The select query used to extract the data. |
| 355 | }, |
| 356 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
| 357 | }, |
| 358 | "targetId": "A String", # Name of the database instance related to this operation. |
| 359 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 360 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 361 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 362 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 363 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 364 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 365 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 366 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 367 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 368 | }</pre> |
| 369 | </div> |
| 370 | |
| 371 | <div class="method"> |
| 372 | <code class="details" id="verifyExternalSyncSettings">verifyExternalSyncSettings(project, instance, verifyConnectionOnly=None, syncMode=None, x__xgafv=None)</code> |
| 373 | <pre>Verify External master external sync settings. |
| 374 | |
| 375 | Args: |
| 376 | project: string, Project ID of the project that contains the instance. (required) |
| 377 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
| 378 | verifyConnectionOnly: boolean, Flag to enable verifying connection only |
| 379 | syncMode: string, External sync mode |
| 380 | x__xgafv: string, V1 error format. |
| 381 | Allowed values |
| 382 | 1 - v1 error format |
| 383 | 2 - v2 error format |
| 384 | |
| 385 | Returns: |
| 386 | An object of the form: |
| 387 | |
| 388 | { # Instance verify external sync settings response. |
| 389 | "errors": [ # List of migration violations. |
| 390 | { # External master migration setting error. |
| 391 | "kind": "A String", # This is always <code>sql#migrationSettingError</code>. |
| 392 | "type": "A String", # Identifies the specific error that occurred. |
| 393 | "detail": "A String", # Additional information about the error encountered. |
| 394 | }, |
| 395 | ], |
| 396 | "kind": "A String", # This is always <code>sql#migrationSettingErrorList</code>. |
| 397 | }</pre> |
| 398 | </div> |
| 399 | |
| 400 | </body></html> |