Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 75 | <h1><a href="sqladmin_v1beta4.html">Cloud SQL Admin API</a> . <a href="sqladmin_v1beta4.instances.html">instances</a></h1> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 78 | <code><a href="#addServerCa">addServerCa(project, instance, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 79 | <p class="firstline">Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in.</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 80 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 81 | <code><a href="#clone">clone(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 82 | <p class="firstline">Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#close">close()</a></code></p> |
| 85 | <p class="firstline">Close httplib2 connections.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 86 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 87 | <code><a href="#delete">delete(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 88 | <p class="firstline">Deletes a Cloud SQL instance.</p> |
| 89 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 90 | <code><a href="#demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 91 | <p class="firstline">Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 92 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 | <code><a href="#export">export(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 94 | <p class="firstline">Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 95 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 96 | <code><a href="#failover">failover(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 97 | <p class="firstline">Failover the instance to its failover replica instance. Using this operation might cause your instance to restart.</p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 98 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 99 | <code><a href="#get">get(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 100 | <p class="firstline">Retrieves a resource containing information about a Cloud SQL instance.</p> |
| 101 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 102 | <code><a href="#import_">import_(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 103 | <p class="firstline">Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 104 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 105 | <code><a href="#insert">insert(project, body=None, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 106 | <p class="firstline">Creates a new Cloud SQL instance.</p> |
| 107 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 108 | <code><a href="#list">list(project, maxResults=None, filter=None, pageToken=None, x__xgafv=None)</a></code></p> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 109 | <p class="firstline">Lists instances under a given project.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 110 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 111 | <code><a href="#listServerCas">listServerCas(project, instance, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 112 | <p class="firstline">Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out.</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 113 | <p class="toc_element"> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 114 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 115 | <p class="firstline">Retrieves the next page of results.</p> |
| 116 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 117 | <code><a href="#patch">patch(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 118 | <p class="firstline">Updates settings of a Cloud SQL instance. This method supports patch semantics.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 119 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 120 | <code><a href="#promoteReplica">promoteReplica(project, instance, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 121 | <p class="firstline">Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 122 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 123 | <code><a href="#resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 124 | <p class="firstline">Deletes all client certificates and generates a new server SSL certificate for the instance.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 125 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 126 | <code><a href="#restart">restart(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 127 | <p class="firstline">Restarts a Cloud SQL instance.</p> |
| 128 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 129 | <code><a href="#restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 130 | <p class="firstline">Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 131 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 132 | <code><a href="#rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 133 | <p class="firstline">Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 134 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 135 | <code><a href="#startReplica">startReplica(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 136 | <p class="firstline">Starts the replication in the read replica instance.</p> |
| 137 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 138 | <code><a href="#stopReplica">stopReplica(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 139 | <p class="firstline">Stops the replication in the read replica instance.</p> |
| 140 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 141 | <code><a href="#truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 142 | <p class="firstline">Truncate MySQL general and slow query log tables</p> |
| 143 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 144 | <code><a href="#update">update(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 145 | <p class="firstline">Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 146 | <h3>Method Details</h3> |
| 147 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 148 | <code class="details" id="addServerCa">addServerCa(project, instance, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 149 | <pre>Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 150 | |
| 151 | Args: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 152 | project: string, Project ID of the project that contains the instance. (required) |
| 153 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 154 | x__xgafv: string, V1 error format. |
| 155 | Allowed values |
| 156 | 1 - v1 error format |
| 157 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 158 | |
| 159 | Returns: |
| 160 | An object of the form: |
| 161 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 162 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 163 | "kind": "A String", # This is always *sql#operation*. |
| 164 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 165 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 166 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 167 | "errors": [ # The list of errors encountered while processing this operation. |
| 168 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 169 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 170 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 171 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 172 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 173 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 174 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 175 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 176 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 177 | "selfLink": "A String", # The URI of this resource. |
| 178 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 179 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 180 | "csvExportOptions": { # Options for exporting data as CSV. |
| 181 | "selectQuery": "A String", # The select query used to extract the data. |
| 182 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 183 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 184 | "kind": "A String", # This is always *sql#exportContext*. |
| 185 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 186 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 187 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 188 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 189 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 190 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 191 | "schemaOnly": True or False, # Export only schemas. |
| 192 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 193 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 194 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 195 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 196 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 197 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 198 | }, |
| 199 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 200 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 201 | "targetId": "A String", # Name of the database instance related to this operation. |
| 202 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 203 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 204 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 205 | "targetLink": "A String", |
| 206 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 207 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 208 | "kind": "A String", # This is always *sql#importContext*. |
| 209 | "csvImportOptions": { # Options for importing data as CSV. |
| 210 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 211 | "A String", |
| 212 | ], |
| 213 | "table": "A String", # The table to which CSV data is imported. |
| 214 | }, |
| 215 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 216 | "encryptionOptions": { |
| 217 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 218 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 219 | "pvkPassword": "A String", # Password that encrypts the private key |
| 220 | }, |
| 221 | }, |
| 222 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 223 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 224 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 225 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 226 | }</pre> |
| 227 | </div> |
| 228 | |
| 229 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 230 | <code class="details" id="clone">clone(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 231 | <pre>Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 232 | |
| 233 | Args: |
| 234 | project: string, Project ID of the source as well as the clone Cloud SQL instance. (required) |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 235 | instance: string, The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 236 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 237 | The object takes the form of: |
| 238 | |
| 239 | { # Database instance clone request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 240 | "cloneContext": { # Database instance clone context. # Contains details about the clone operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 241 | "destinationInstanceName": "A String", # Name of the Cloud SQL instance to be created as a clone. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 242 | "binLogCoordinates": { # Binary log coordinates. # Binary log coordinates, if specified, identify the position up to which the source instance is cloned. If not specified, the source instance is cloned up to the most recent binary log coordinates. |
| 243 | "kind": "A String", # This is always *sql#binLogCoordinates*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 244 | "binLogFileName": "A String", # Name of the binary log file for a Cloud SQL instance. |
| 245 | "binLogPosition": "A String", # Position (offset) within the binary log file. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 246 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 247 | "pitrTimestampMs": "A String", # Reserved for future use. |
| 248 | "kind": "A String", # This is always *sql#cloneContext*. |
| 249 | "pointInTime": "A String", # Reserved for future use. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 250 | }, |
| 251 | } |
| 252 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 253 | x__xgafv: string, V1 error format. |
| 254 | Allowed values |
| 255 | 1 - v1 error format |
| 256 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 257 | |
| 258 | Returns: |
| 259 | An object of the form: |
| 260 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 261 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 262 | "kind": "A String", # This is always *sql#operation*. |
| 263 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 264 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 265 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 266 | "errors": [ # The list of errors encountered while processing this operation. |
| 267 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 268 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 269 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 270 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 271 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 272 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 273 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 274 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 275 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 276 | "selfLink": "A String", # The URI of this resource. |
| 277 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 278 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 279 | "csvExportOptions": { # Options for exporting data as CSV. |
| 280 | "selectQuery": "A String", # The select query used to extract the data. |
| 281 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 282 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 283 | "kind": "A String", # This is always *sql#exportContext*. |
| 284 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 285 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 286 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 287 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 288 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 289 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 290 | "schemaOnly": True or False, # Export only schemas. |
| 291 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 292 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 293 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 294 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 295 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 296 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 297 | }, |
| 298 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 299 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 300 | "targetId": "A String", # Name of the database instance related to this operation. |
| 301 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 302 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 303 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 304 | "targetLink": "A String", |
| 305 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 306 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 307 | "kind": "A String", # This is always *sql#importContext*. |
| 308 | "csvImportOptions": { # Options for importing data as CSV. |
| 309 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 310 | "A String", |
| 311 | ], |
| 312 | "table": "A String", # The table to which CSV data is imported. |
| 313 | }, |
| 314 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 315 | "encryptionOptions": { |
| 316 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 317 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 318 | "pvkPassword": "A String", # Password that encrypts the private key |
| 319 | }, |
| 320 | }, |
| 321 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 322 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 323 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 324 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 325 | }</pre> |
| 326 | </div> |
| 327 | |
| 328 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 329 | <code class="details" id="close">close()</code> |
| 330 | <pre>Close httplib2 connections.</pre> |
| 331 | </div> |
| 332 | |
| 333 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 334 | <code class="details" id="delete">delete(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 335 | <pre>Deletes a Cloud SQL instance. |
| 336 | |
| 337 | Args: |
| 338 | project: string, Project ID of the project that contains the instance to be deleted. (required) |
| 339 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 340 | x__xgafv: string, V1 error format. |
| 341 | Allowed values |
| 342 | 1 - v1 error format |
| 343 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 344 | |
| 345 | Returns: |
| 346 | An object of the form: |
| 347 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 348 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 349 | "kind": "A String", # This is always *sql#operation*. |
| 350 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 351 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 352 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 353 | "errors": [ # The list of errors encountered while processing this operation. |
| 354 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 355 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 356 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 357 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 358 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 359 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 360 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 361 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 362 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 363 | "selfLink": "A String", # The URI of this resource. |
| 364 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 365 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 366 | "csvExportOptions": { # Options for exporting data as CSV. |
| 367 | "selectQuery": "A String", # The select query used to extract the data. |
| 368 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 369 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 370 | "kind": "A String", # This is always *sql#exportContext*. |
| 371 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 372 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 373 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 374 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 375 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 376 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 377 | "schemaOnly": True or False, # Export only schemas. |
| 378 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 379 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 380 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 381 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 382 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 383 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 384 | }, |
| 385 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 386 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 387 | "targetId": "A String", # Name of the database instance related to this operation. |
| 388 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 389 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 390 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 391 | "targetLink": "A String", |
| 392 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 393 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 394 | "kind": "A String", # This is always *sql#importContext*. |
| 395 | "csvImportOptions": { # Options for importing data as CSV. |
| 396 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 397 | "A String", |
| 398 | ], |
| 399 | "table": "A String", # The table to which CSV data is imported. |
| 400 | }, |
| 401 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 402 | "encryptionOptions": { |
| 403 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 404 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 405 | "pvkPassword": "A String", # Password that encrypts the private key |
| 406 | }, |
| 407 | }, |
| 408 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 409 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 410 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 411 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 412 | }</pre> |
| 413 | </div> |
| 414 | |
| 415 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 416 | <code class="details" id="demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 417 | <pre>Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 418 | |
| 419 | Args: |
| 420 | project: string, ID of the project that contains the instance. (required) |
| 421 | instance: string, Cloud SQL instance name. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 422 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 423 | The object takes the form of: |
| 424 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 425 | { # Database demote primary instance request. |
| 426 | "demoteMasterContext": { # Database instance demote primary instance context. # Contains details about the demoteMaster operation. |
| 427 | "masterInstanceName": "A String", # The name of the instance which will act as on-premises primary instance in the replication setup. |
| 428 | "kind": "A String", # This is always *sql#demoteMasterContext*. |
| 429 | "verifyGtidConsistency": True or False, # Verify GTID consistency for demote operation. Default value: *True*. Second Generation instances only. Setting this flag to false enables you to bypass GTID consistency check between on-premises primary instance and Cloud SQL instance during the demotion operation but also exposes you to the risk of future replication failures. Change the value only if you know the reason for the GTID divergence and are confident that doing so will not cause any replication issues. |
| 430 | "replicaConfiguration": { # Read-replica configuration for connecting to the on-premises primary instance. # Configuration specific to read-replicas replicating from the on-premises primary instance. |
| 431 | "kind": "A String", # This is always *sql#demoteMasterConfiguration*. |
| 432 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory. |
| 433 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 434 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. The format of the replica's private key can be either PKCS #1 or PKCS #8. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 435 | "username": "A String", # The username for the replication connection. |
| 436 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 437 | "password": "A String", # The password for the replication connection. |
| 438 | "kind": "A String", # This is always *sql#demoteMasterMysqlReplicaConfiguration*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 439 | }, |
| 440 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 441 | }, |
| 442 | } |
| 443 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 444 | x__xgafv: string, V1 error format. |
| 445 | Allowed values |
| 446 | 1 - v1 error format |
| 447 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 448 | |
| 449 | Returns: |
| 450 | An object of the form: |
| 451 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 452 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 453 | "kind": "A String", # This is always *sql#operation*. |
| 454 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 455 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 456 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 457 | "errors": [ # The list of errors encountered while processing this operation. |
| 458 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 459 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 460 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 461 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 462 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 463 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 464 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 465 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 466 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 467 | "selfLink": "A String", # The URI of this resource. |
| 468 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 469 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 470 | "csvExportOptions": { # Options for exporting data as CSV. |
| 471 | "selectQuery": "A String", # The select query used to extract the data. |
| 472 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 473 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 474 | "kind": "A String", # This is always *sql#exportContext*. |
| 475 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 476 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 477 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 478 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 479 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 480 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 481 | "schemaOnly": True or False, # Export only schemas. |
| 482 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 483 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 484 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 485 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 486 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 487 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 488 | }, |
| 489 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 490 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 491 | "targetId": "A String", # Name of the database instance related to this operation. |
| 492 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 493 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 494 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 495 | "targetLink": "A String", |
| 496 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 497 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 498 | "kind": "A String", # This is always *sql#importContext*. |
| 499 | "csvImportOptions": { # Options for importing data as CSV. |
| 500 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 501 | "A String", |
| 502 | ], |
| 503 | "table": "A String", # The table to which CSV data is imported. |
| 504 | }, |
| 505 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 506 | "encryptionOptions": { |
| 507 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 508 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 509 | "pvkPassword": "A String", # Password that encrypts the private key |
| 510 | }, |
| 511 | }, |
| 512 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 513 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 514 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 515 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 516 | }</pre> |
| 517 | </div> |
| 518 | |
| 519 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 520 | <code class="details" id="export">export(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 521 | <pre>Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 522 | |
| 523 | Args: |
| 524 | project: string, Project ID of the project that contains the instance to be exported. (required) |
| 525 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 526 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 527 | The object takes the form of: |
| 528 | |
| 529 | { # Database instance export request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 530 | "exportContext": { # Database instance export context. # Contains details about the export operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 531 | "csvExportOptions": { # Options for exporting data as CSV. |
| 532 | "selectQuery": "A String", # The select query used to extract the data. |
| 533 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 534 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 535 | "kind": "A String", # This is always *sql#exportContext*. |
| 536 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 537 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 538 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 539 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 540 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 541 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 542 | "schemaOnly": True or False, # Export only schemas. |
| 543 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 544 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 545 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 546 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 547 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 548 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 549 | }, |
| 550 | }, |
| 551 | } |
| 552 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 553 | x__xgafv: string, V1 error format. |
| 554 | Allowed values |
| 555 | 1 - v1 error format |
| 556 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 557 | |
| 558 | Returns: |
| 559 | An object of the form: |
| 560 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 561 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 562 | "kind": "A String", # This is always *sql#operation*. |
| 563 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 564 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 565 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 566 | "errors": [ # The list of errors encountered while processing this operation. |
| 567 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 568 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 569 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 570 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 571 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 572 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 573 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 574 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 575 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 576 | "selfLink": "A String", # The URI of this resource. |
| 577 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 578 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 579 | "csvExportOptions": { # Options for exporting data as CSV. |
| 580 | "selectQuery": "A String", # The select query used to extract the data. |
| 581 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 582 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 583 | "kind": "A String", # This is always *sql#exportContext*. |
| 584 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 585 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 586 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 587 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 588 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 589 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 590 | "schemaOnly": True or False, # Export only schemas. |
| 591 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 592 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 593 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 594 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 595 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 596 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 597 | }, |
| 598 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 599 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 600 | "targetId": "A String", # Name of the database instance related to this operation. |
| 601 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 602 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 603 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 604 | "targetLink": "A String", |
| 605 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 606 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 607 | "kind": "A String", # This is always *sql#importContext*. |
| 608 | "csvImportOptions": { # Options for importing data as CSV. |
| 609 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 610 | "A String", |
| 611 | ], |
| 612 | "table": "A String", # The table to which CSV data is imported. |
| 613 | }, |
| 614 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 615 | "encryptionOptions": { |
| 616 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 617 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 618 | "pvkPassword": "A String", # Password that encrypts the private key |
| 619 | }, |
| 620 | }, |
| 621 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 622 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 623 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 624 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 625 | }</pre> |
| 626 | </div> |
| 627 | |
| 628 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 629 | <code class="details" id="failover">failover(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 630 | <pre>Failover the instance to its failover replica instance. Using this operation might cause your instance to restart. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 631 | |
| 632 | Args: |
| 633 | project: string, ID of the project that contains the read replica. (required) |
| 634 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 635 | body: object, The request body. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 636 | The object takes the form of: |
| 637 | |
| 638 | { # Instance failover request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 639 | "failoverContext": { # Database instance failover context. # Failover Context. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 640 | "settingsVersion": "A String", # The current settings version of this instance. Request will be rejected if this version doesn't match the current settings version. |
| 641 | "kind": "A String", # This is always *sql#failoverContext*. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 642 | }, |
| 643 | } |
| 644 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 645 | x__xgafv: string, V1 error format. |
| 646 | Allowed values |
| 647 | 1 - v1 error format |
| 648 | 2 - v2 error format |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 649 | |
| 650 | Returns: |
| 651 | An object of the form: |
| 652 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 653 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 654 | "kind": "A String", # This is always *sql#operation*. |
| 655 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 656 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 657 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 658 | "errors": [ # The list of errors encountered while processing this operation. |
| 659 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 660 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 661 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 662 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 663 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 664 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 665 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 666 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 667 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 668 | "selfLink": "A String", # The URI of this resource. |
| 669 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 670 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 671 | "csvExportOptions": { # Options for exporting data as CSV. |
| 672 | "selectQuery": "A String", # The select query used to extract the data. |
| 673 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 674 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 675 | "kind": "A String", # This is always *sql#exportContext*. |
| 676 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 677 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 678 | "A String", |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 679 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 680 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 681 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 682 | "schemaOnly": True or False, # Export only schemas. |
| 683 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 684 | "A String", |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 685 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 686 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 687 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 688 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 689 | }, |
| 690 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 691 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 692 | "targetId": "A String", # Name of the database instance related to this operation. |
| 693 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 694 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 695 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 696 | "targetLink": "A String", |
| 697 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 698 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 699 | "kind": "A String", # This is always *sql#importContext*. |
| 700 | "csvImportOptions": { # Options for importing data as CSV. |
| 701 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 702 | "A String", |
| 703 | ], |
| 704 | "table": "A String", # The table to which CSV data is imported. |
| 705 | }, |
| 706 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 707 | "encryptionOptions": { |
| 708 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 709 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 710 | "pvkPassword": "A String", # Password that encrypts the private key |
| 711 | }, |
| 712 | }, |
| 713 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 714 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 715 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 716 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 717 | }</pre> |
| 718 | </div> |
| 719 | |
| 720 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 721 | <code class="details" id="get">get(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 722 | <pre>Retrieves a resource containing information about a Cloud SQL instance. |
| 723 | |
| 724 | Args: |
| 725 | project: string, Project ID of the project that contains the instance. (required) |
| 726 | instance: string, Database instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 727 | x__xgafv: string, V1 error format. |
| 728 | Allowed values |
| 729 | 1 - v1 error format |
| 730 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 731 | |
| 732 | Returns: |
| 733 | An object of the form: |
| 734 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 735 | { # A Cloud SQL instance resource. Next field: 36 |
| 736 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable. |
| 737 | "region": "A String", # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation. |
| 738 | "settings": { # Database instance settings. # The user settings. |
| 739 | "tier": "A String", # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances). |
| 740 | "kind": "A String", # This is always *sql#settings*. |
| 741 | "dataDiskType": "A String", # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances. |
| 742 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 743 | "A String", |
| 744 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 745 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances. |
| 746 | "activeDirectoryConfig": { # Active Directory configuration, for now relevant only for SQL Server # Active Directory configuration, for now relevant only for SQL Server |
| 747 | "domain": "A String", # Domain name |
| 748 | "kind": "A String", # This will be always sql#activeDirectoryConfig. |
| 749 | }, |
| 750 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances. |
| 751 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances. |
| 752 | "kind": "A String", # This is always *sql#locationPreference*. |
| 753 | "zone": "A String", # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). |
| 754 | "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance. |
| 755 | }, |
| 756 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not. |
| 757 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. |
| 758 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances. |
| 759 | "requireSsl": True or False, # Whether SSL connections over IP are enforced or not. |
| 760 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set. |
| 761 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: *192.168.100.0/24*). |
| 762 | { # An entry for an Access Control list. |
| 763 | "name": "A String", # Optional. A label to identify this entry. |
| 764 | "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 765 | "value": "A String", # The allowlisted value for the access control list. |
| 766 | "kind": "A String", # This is always *sql#aclEntry*. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 767 | }, |
| 768 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 769 | "ipv4Enabled": True or False, # Whether the instance is assigned a public IP address or not. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 770 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 771 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 772 | "enabled": True or False, # Whether this configuration is enabled. |
| 773 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 774 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 775 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*. |
| 776 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well. |
| 777 | "location": "A String", # Location of the backup |
| 778 | "kind": "A String", # This is always *sql#backupConfiguration*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 779 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 780 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value. |
| 781 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. |
| 782 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 783 | { # Database flags for Cloud SQL instances. |
| 784 | "value": "A String", # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn't take a value. |
| 785 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 786 | }, |
| 787 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 788 | "maintenanceWindow": { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes. |
| 789 | "kind": "A String", # This is always *sql#maintenanceWindow*. |
| 790 | "hour": 42, # hour of day - 0 to 23. |
| 791 | "updateTrack": "A String", # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more. |
| 792 | "day": 42, # day of week (1-7), starting on Monday. |
| 793 | }, |
| 794 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a single key value pair. |
| 795 | "a_key": "A String", |
| 796 | }, |
| 797 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is true. |
| 798 | "availabilityType": "A String", # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration. |
| 799 | "collation": "A String", # The name of server Instance collation. |
| 800 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives. |
| 801 | "replicationType": "A String", # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances. |
| 802 | "denyMaintenancePeriods": [ # Deny maintenance periods |
| 803 | { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied. |
| 804 | "startDate": "A String", # "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 805 | "time": "A String", # Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 |
| 806 | "endDate": "A String", # "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 807 | }, |
| 808 | ], |
| 809 | }, |
| 810 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 811 | "rootPassword": "A String", # Initial root password. Use only on creation. |
| 812 | "databaseVersion": "A String", # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*. |
| 813 | "selfLink": "A String", # The URI of this resource. |
| 814 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances. |
| 815 | "kind": "A String", # This is always *sql#diskEncryptionConfiguration*. |
| 816 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 817 | }, |
| 818 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see this announcement for details. |
| 819 | "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances. |
| 820 | "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances. |
| 821 | "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true. |
| 822 | }, |
| 823 | "replicaNames": [ # The replicas of the instance. |
| 824 | "A String", |
| 825 | ], |
| 826 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 827 | "A String", |
| 828 | ], |
| 829 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 830 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following. *RUNNABLE*: The instance is running, or is ready to run when accessed. *SUSPENDED*: The instance is not available, for example due to problems with billing. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed. *UNKNOWN_STATE*: The state of the instance is unknown. |
| 831 | "backendType": "A String", # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type. |
| 832 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 833 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances. |
| 834 | "kind": "A String", # This is always *sql#diskEncryptionStatus*. |
| 835 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 836 | }, |
| 837 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 838 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 839 | "password": "A String", # The password for connecting to on-premises instance. |
| 840 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 841 | "kind": "A String", # This is always *sql#onPremisesConfiguration*. |
| 842 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 843 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 844 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 845 | "username": "A String", # The username for connecting to on-premises instance. |
| 846 | }, |
| 847 | "replicaConfiguration": { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas. |
| 848 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance. |
| 849 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory. |
| 850 | "verifyServerCertificate": True or False, # Whether or not to check the primary instance's Common Name value in the certificate that it sends during the SSL handshake. |
| 851 | "username": "A String", # The username for the replication connection. |
| 852 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 853 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 854 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 855 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 856 | "password": "A String", # The password for the replication connection. |
| 857 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 858 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump. |
| 859 | "kind": "A String", # This is always *sql#mysqlReplicaConfiguration*. |
| 860 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 861 | }, |
| 862 | "kind": "A String", # This is always *sql#replicaConfiguration*. |
| 863 | }, |
| 864 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 865 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 866 | "selfLink": "A String", # The URI of this resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 867 | "instance": "A String", # Name of the database instance. |
| 868 | "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 869 | "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z* |
| 870 | "kind": "A String", # This is always *sql#sslCert*. |
| 871 | "cert": "A String", # PEM representation. |
| 872 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 873 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 874 | }, |
| 875 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead. |
| 876 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 877 | { # Database instance IP Mapping. |
| 878 | "ipAddress": "A String", # The IP address assigned. |
| 879 | "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired. |
| 880 | "type": "A String", # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 881 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 882 | ], |
| 883 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 884 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 885 | "canDefer": True or False, |
| 886 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 887 | }, |
| 888 | "instanceType": "A String", # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer's premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica. |
| 889 | "masterInstanceName": "A String", # The name of the instance which will act as primary in the replication setup. |
| 890 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances. |
| 891 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances. |
| 892 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. |
| 893 | "kind": "A String", # This is always *sql#instance*. |
| 894 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 895 | </div> |
| 896 | |
| 897 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 898 | <code class="details" id="import_">import_(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 899 | <pre>Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 900 | |
| 901 | Args: |
| 902 | project: string, Project ID of the project that contains the instance. (required) |
| 903 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 904 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 905 | The object takes the form of: |
| 906 | |
| 907 | { # Database instance import request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 908 | "importContext": { # Database instance import context. # Contains details about the import operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 909 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 910 | "kind": "A String", # This is always *sql#importContext*. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 911 | "csvImportOptions": { # Options for importing data as CSV. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 912 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 913 | "A String", |
| 914 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 915 | "table": "A String", # The table to which CSV data is imported. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 916 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 917 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 918 | "encryptionOptions": { |
| 919 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 920 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 921 | "pvkPassword": "A String", # Password that encrypts the private key |
| 922 | }, |
| 923 | }, |
| 924 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 925 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 926 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 927 | }, |
| 928 | } |
| 929 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 930 | x__xgafv: string, V1 error format. |
| 931 | Allowed values |
| 932 | 1 - v1 error format |
| 933 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 934 | |
| 935 | Returns: |
| 936 | An object of the form: |
| 937 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 938 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 939 | "kind": "A String", # This is always *sql#operation*. |
| 940 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 941 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 942 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 943 | "errors": [ # The list of errors encountered while processing this operation. |
| 944 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 945 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 946 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 947 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 948 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 949 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 950 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 951 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 952 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 953 | "selfLink": "A String", # The URI of this resource. |
| 954 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 955 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 956 | "csvExportOptions": { # Options for exporting data as CSV. |
| 957 | "selectQuery": "A String", # The select query used to extract the data. |
| 958 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 959 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 960 | "kind": "A String", # This is always *sql#exportContext*. |
| 961 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 962 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 963 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 964 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 965 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 966 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 967 | "schemaOnly": True or False, # Export only schemas. |
| 968 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 969 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 970 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 971 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 972 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 973 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 974 | }, |
| 975 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 976 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 977 | "targetId": "A String", # Name of the database instance related to this operation. |
| 978 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 979 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 980 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 981 | "targetLink": "A String", |
| 982 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 983 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 984 | "kind": "A String", # This is always *sql#importContext*. |
| 985 | "csvImportOptions": { # Options for importing data as CSV. |
| 986 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 987 | "A String", |
| 988 | ], |
| 989 | "table": "A String", # The table to which CSV data is imported. |
| 990 | }, |
| 991 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 992 | "encryptionOptions": { |
| 993 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 994 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 995 | "pvkPassword": "A String", # Password that encrypts the private key |
| 996 | }, |
| 997 | }, |
| 998 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 999 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 1000 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1001 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1002 | }</pre> |
| 1003 | </div> |
| 1004 | |
| 1005 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1006 | <code class="details" id="insert">insert(project, body=None, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1007 | <pre>Creates a new Cloud SQL instance. |
| 1008 | |
| 1009 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1010 | project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1011 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1012 | The object takes the form of: |
| 1013 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1014 | { # A Cloud SQL instance resource. Next field: 36 |
| 1015 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable. |
| 1016 | "region": "A String", # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation. |
| 1017 | "settings": { # Database instance settings. # The user settings. |
| 1018 | "tier": "A String", # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances). |
| 1019 | "kind": "A String", # This is always *sql#settings*. |
| 1020 | "dataDiskType": "A String", # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances. |
| 1021 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1022 | "A String", |
| 1023 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1024 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances. |
| 1025 | "activeDirectoryConfig": { # Active Directory configuration, for now relevant only for SQL Server # Active Directory configuration, for now relevant only for SQL Server |
| 1026 | "domain": "A String", # Domain name |
| 1027 | "kind": "A String", # This will be always sql#activeDirectoryConfig. |
| 1028 | }, |
| 1029 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances. |
| 1030 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances. |
| 1031 | "kind": "A String", # This is always *sql#locationPreference*. |
| 1032 | "zone": "A String", # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). |
| 1033 | "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance. |
| 1034 | }, |
| 1035 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not. |
| 1036 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. |
| 1037 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances. |
| 1038 | "requireSsl": True or False, # Whether SSL connections over IP are enforced or not. |
| 1039 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set. |
| 1040 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: *192.168.100.0/24*). |
| 1041 | { # An entry for an Access Control list. |
| 1042 | "name": "A String", # Optional. A label to identify this entry. |
| 1043 | "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1044 | "value": "A String", # The allowlisted value for the access control list. |
| 1045 | "kind": "A String", # This is always *sql#aclEntry*. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1046 | }, |
| 1047 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1048 | "ipv4Enabled": True or False, # Whether the instance is assigned a public IP address or not. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1049 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1050 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 1051 | "enabled": True or False, # Whether this configuration is enabled. |
| 1052 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 1053 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 1054 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*. |
| 1055 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well. |
| 1056 | "location": "A String", # Location of the backup |
| 1057 | "kind": "A String", # This is always *sql#backupConfiguration*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1058 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1059 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value. |
| 1060 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. |
| 1061 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 1062 | { # Database flags for Cloud SQL instances. |
| 1063 | "value": "A String", # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn't take a value. |
| 1064 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1065 | }, |
| 1066 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1067 | "maintenanceWindow": { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes. |
| 1068 | "kind": "A String", # This is always *sql#maintenanceWindow*. |
| 1069 | "hour": 42, # hour of day - 0 to 23. |
| 1070 | "updateTrack": "A String", # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more. |
| 1071 | "day": 42, # day of week (1-7), starting on Monday. |
| 1072 | }, |
| 1073 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a single key value pair. |
| 1074 | "a_key": "A String", |
| 1075 | }, |
| 1076 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is true. |
| 1077 | "availabilityType": "A String", # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration. |
| 1078 | "collation": "A String", # The name of server Instance collation. |
| 1079 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives. |
| 1080 | "replicationType": "A String", # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances. |
| 1081 | "denyMaintenancePeriods": [ # Deny maintenance periods |
| 1082 | { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied. |
| 1083 | "startDate": "A String", # "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 1084 | "time": "A String", # Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 |
| 1085 | "endDate": "A String", # "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 1086 | }, |
| 1087 | ], |
| 1088 | }, |
| 1089 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 1090 | "rootPassword": "A String", # Initial root password. Use only on creation. |
| 1091 | "databaseVersion": "A String", # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*. |
| 1092 | "selfLink": "A String", # The URI of this resource. |
| 1093 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances. |
| 1094 | "kind": "A String", # This is always *sql#diskEncryptionConfiguration*. |
| 1095 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 1096 | }, |
| 1097 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see this announcement for details. |
| 1098 | "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances. |
| 1099 | "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances. |
| 1100 | "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true. |
| 1101 | }, |
| 1102 | "replicaNames": [ # The replicas of the instance. |
| 1103 | "A String", |
| 1104 | ], |
| 1105 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 1106 | "A String", |
| 1107 | ], |
| 1108 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 1109 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following. *RUNNABLE*: The instance is running, or is ready to run when accessed. *SUSPENDED*: The instance is not available, for example due to problems with billing. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed. *UNKNOWN_STATE*: The state of the instance is unknown. |
| 1110 | "backendType": "A String", # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type. |
| 1111 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 1112 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances. |
| 1113 | "kind": "A String", # This is always *sql#diskEncryptionStatus*. |
| 1114 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 1115 | }, |
| 1116 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 1117 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 1118 | "password": "A String", # The password for connecting to on-premises instance. |
| 1119 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1120 | "kind": "A String", # This is always *sql#onPremisesConfiguration*. |
| 1121 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 1122 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 1123 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 1124 | "username": "A String", # The username for connecting to on-premises instance. |
| 1125 | }, |
| 1126 | "replicaConfiguration": { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas. |
| 1127 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance. |
| 1128 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory. |
| 1129 | "verifyServerCertificate": True or False, # Whether or not to check the primary instance's Common Name value in the certificate that it sends during the SSL handshake. |
| 1130 | "username": "A String", # The username for the replication connection. |
| 1131 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 1132 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 1133 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 1134 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 1135 | "password": "A String", # The password for the replication connection. |
| 1136 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1137 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump. |
| 1138 | "kind": "A String", # This is always *sql#mysqlReplicaConfiguration*. |
| 1139 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 1140 | }, |
| 1141 | "kind": "A String", # This is always *sql#replicaConfiguration*. |
| 1142 | }, |
| 1143 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 1144 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1145 | "selfLink": "A String", # The URI of this resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1146 | "instance": "A String", # Name of the database instance. |
| 1147 | "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1148 | "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z* |
| 1149 | "kind": "A String", # This is always *sql#sslCert*. |
| 1150 | "cert": "A String", # PEM representation. |
| 1151 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 1152 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 1153 | }, |
| 1154 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead. |
| 1155 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 1156 | { # Database instance IP Mapping. |
| 1157 | "ipAddress": "A String", # The IP address assigned. |
| 1158 | "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired. |
| 1159 | "type": "A String", # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1160 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1161 | ], |
| 1162 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 1163 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 1164 | "canDefer": True or False, |
| 1165 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 1166 | }, |
| 1167 | "instanceType": "A String", # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer's premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica. |
| 1168 | "masterInstanceName": "A String", # The name of the instance which will act as primary in the replication setup. |
| 1169 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances. |
| 1170 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances. |
| 1171 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. |
| 1172 | "kind": "A String", # This is always *sql#instance*. |
| 1173 | } |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1174 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1175 | x__xgafv: string, V1 error format. |
| 1176 | Allowed values |
| 1177 | 1 - v1 error format |
| 1178 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1179 | |
| 1180 | Returns: |
| 1181 | An object of the form: |
| 1182 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1183 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 1184 | "kind": "A String", # This is always *sql#operation*. |
| 1185 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 1186 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1187 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1188 | "errors": [ # The list of errors encountered while processing this operation. |
| 1189 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1190 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1191 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1192 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1193 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1194 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1195 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1196 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1197 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 1198 | "selfLink": "A String", # The URI of this resource. |
| 1199 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1200 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1201 | "csvExportOptions": { # Options for exporting data as CSV. |
| 1202 | "selectQuery": "A String", # The select query used to extract the data. |
| 1203 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1204 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1205 | "kind": "A String", # This is always *sql#exportContext*. |
| 1206 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 1207 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1208 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1209 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1210 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1211 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1212 | "schemaOnly": True or False, # Export only schemas. |
| 1213 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1214 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1215 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1216 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1217 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1218 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1219 | }, |
| 1220 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1221 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1222 | "targetId": "A String", # Name of the database instance related to this operation. |
| 1223 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1224 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1225 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1226 | "targetLink": "A String", |
| 1227 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 1228 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1229 | "kind": "A String", # This is always *sql#importContext*. |
| 1230 | "csvImportOptions": { # Options for importing data as CSV. |
| 1231 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 1232 | "A String", |
| 1233 | ], |
| 1234 | "table": "A String", # The table to which CSV data is imported. |
| 1235 | }, |
| 1236 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1237 | "encryptionOptions": { |
| 1238 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 1239 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 1240 | "pvkPassword": "A String", # Password that encrypts the private key |
| 1241 | }, |
| 1242 | }, |
| 1243 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 1244 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 1245 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1246 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1247 | }</pre> |
| 1248 | </div> |
| 1249 | |
| 1250 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1251 | <code class="details" id="list">list(project, maxResults=None, filter=None, pageToken=None, x__xgafv=None)</code> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1252 | <pre>Lists instances under a given project. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1253 | |
| 1254 | Args: |
| 1255 | project: string, Project ID of the project for which to list Cloud SQL instances. (required) |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1256 | maxResults: integer, The maximum number of results to return per response. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1257 | filter: string, A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. |
| 1258 | pageToken: string, A previously-returned page token representing part of the larger set of results to view. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1259 | x__xgafv: string, V1 error format. |
| 1260 | Allowed values |
| 1261 | 1 - v1 error format |
| 1262 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1263 | |
| 1264 | Returns: |
| 1265 | An object of the form: |
| 1266 | |
| 1267 | { # Database instances list response. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1268 | "kind": "A String", # This is always *sql#instancesList*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1269 | "items": [ # List of database instance resources. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1270 | { # A Cloud SQL instance resource. Next field: 36 |
| 1271 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable. |
| 1272 | "region": "A String", # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation. |
| 1273 | "settings": { # Database instance settings. # The user settings. |
| 1274 | "tier": "A String", # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances). |
| 1275 | "kind": "A String", # This is always *sql#settings*. |
| 1276 | "dataDiskType": "A String", # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances. |
| 1277 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1278 | "A String", |
| 1279 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1280 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances. |
| 1281 | "activeDirectoryConfig": { # Active Directory configuration, for now relevant only for SQL Server # Active Directory configuration, for now relevant only for SQL Server |
| 1282 | "domain": "A String", # Domain name |
| 1283 | "kind": "A String", # This will be always sql#activeDirectoryConfig. |
| 1284 | }, |
| 1285 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances. |
| 1286 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances. |
| 1287 | "kind": "A String", # This is always *sql#locationPreference*. |
| 1288 | "zone": "A String", # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). |
| 1289 | "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance. |
| 1290 | }, |
| 1291 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not. |
| 1292 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. |
| 1293 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances. |
| 1294 | "requireSsl": True or False, # Whether SSL connections over IP are enforced or not. |
| 1295 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set. |
| 1296 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: *192.168.100.0/24*). |
| 1297 | { # An entry for an Access Control list. |
| 1298 | "name": "A String", # Optional. A label to identify this entry. |
| 1299 | "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1300 | "value": "A String", # The allowlisted value for the access control list. |
| 1301 | "kind": "A String", # This is always *sql#aclEntry*. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1302 | }, |
| 1303 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1304 | "ipv4Enabled": True or False, # Whether the instance is assigned a public IP address or not. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1305 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1306 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 1307 | "enabled": True or False, # Whether this configuration is enabled. |
| 1308 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 1309 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 1310 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*. |
| 1311 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well. |
| 1312 | "location": "A String", # Location of the backup |
| 1313 | "kind": "A String", # This is always *sql#backupConfiguration*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1314 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1315 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value. |
| 1316 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. |
| 1317 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 1318 | { # Database flags for Cloud SQL instances. |
| 1319 | "value": "A String", # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn't take a value. |
| 1320 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1321 | }, |
| 1322 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1323 | "maintenanceWindow": { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes. |
| 1324 | "kind": "A String", # This is always *sql#maintenanceWindow*. |
| 1325 | "hour": 42, # hour of day - 0 to 23. |
| 1326 | "updateTrack": "A String", # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more. |
| 1327 | "day": 42, # day of week (1-7), starting on Monday. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1328 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1329 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a single key value pair. |
| 1330 | "a_key": "A String", |
| 1331 | }, |
| 1332 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is true. |
| 1333 | "availabilityType": "A String", # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration. |
| 1334 | "collation": "A String", # The name of server Instance collation. |
| 1335 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives. |
| 1336 | "replicationType": "A String", # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances. |
| 1337 | "denyMaintenancePeriods": [ # Deny maintenance periods |
| 1338 | { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied. |
| 1339 | "startDate": "A String", # "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 1340 | "time": "A String", # Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 |
| 1341 | "endDate": "A String", # "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 1342 | }, |
| 1343 | ], |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1344 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1345 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 1346 | "rootPassword": "A String", # Initial root password. Use only on creation. |
| 1347 | "databaseVersion": "A String", # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*. |
| 1348 | "selfLink": "A String", # The URI of this resource. |
| 1349 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances. |
| 1350 | "kind": "A String", # This is always *sql#diskEncryptionConfiguration*. |
| 1351 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 1352 | }, |
| 1353 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see this announcement for details. |
| 1354 | "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances. |
| 1355 | "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances. |
| 1356 | "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true. |
| 1357 | }, |
| 1358 | "replicaNames": [ # The replicas of the instance. |
| 1359 | "A String", |
| 1360 | ], |
| 1361 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 1362 | "A String", |
| 1363 | ], |
| 1364 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 1365 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following. *RUNNABLE*: The instance is running, or is ready to run when accessed. *SUSPENDED*: The instance is not available, for example due to problems with billing. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed. *UNKNOWN_STATE*: The state of the instance is unknown. |
| 1366 | "backendType": "A String", # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type. |
| 1367 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 1368 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances. |
| 1369 | "kind": "A String", # This is always *sql#diskEncryptionStatus*. |
| 1370 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 1371 | }, |
| 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 | "password": "A String", # The password for connecting to on-premises instance. |
| 1375 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1376 | "kind": "A String", # This is always *sql#onPremisesConfiguration*. |
| 1377 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 1378 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 1379 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 1380 | "username": "A String", # The username for connecting to on-premises instance. |
| 1381 | }, |
| 1382 | "replicaConfiguration": { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas. |
| 1383 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance. |
| 1384 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory. |
| 1385 | "verifyServerCertificate": True or False, # Whether or not to check the primary instance's Common Name value in the certificate that it sends during the SSL handshake. |
| 1386 | "username": "A String", # The username for the replication connection. |
| 1387 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 1388 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 1389 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 1390 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 1391 | "password": "A String", # The password for the replication connection. |
| 1392 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1393 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump. |
| 1394 | "kind": "A String", # This is always *sql#mysqlReplicaConfiguration*. |
| 1395 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 1396 | }, |
| 1397 | "kind": "A String", # This is always *sql#replicaConfiguration*. |
| 1398 | }, |
| 1399 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 1400 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 1401 | "selfLink": "A String", # The URI of this resource. |
| 1402 | "instance": "A String", # Name of the database instance. |
| 1403 | "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1404 | "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z* |
| 1405 | "kind": "A String", # This is always *sql#sslCert*. |
| 1406 | "cert": "A String", # PEM representation. |
| 1407 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 1408 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 1409 | }, |
| 1410 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead. |
| 1411 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 1412 | { # Database instance IP Mapping. |
| 1413 | "ipAddress": "A String", # The IP address assigned. |
| 1414 | "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired. |
| 1415 | "type": "A String", # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported. |
| 1416 | }, |
| 1417 | ], |
| 1418 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 1419 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 1420 | "canDefer": True or False, |
| 1421 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 1422 | }, |
| 1423 | "instanceType": "A String", # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer's premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica. |
| 1424 | "masterInstanceName": "A String", # The name of the instance which will act as primary in the replication setup. |
| 1425 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances. |
| 1426 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances. |
| 1427 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. |
| 1428 | "kind": "A String", # This is always *sql#instance*. |
| 1429 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1430 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1431 | "warnings": [ # List of warnings that occurred while handling the request. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1432 | { # An Admin API warning message. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1433 | "message": "A String", # The warning message. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1434 | "code": "A String", # Code to uniquely identify the warning type. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1435 | }, |
| 1436 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1437 | "nextPageToken": "A String", # The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1438 | }</pre> |
| 1439 | </div> |
| 1440 | |
| 1441 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1442 | <code class="details" id="listServerCas">listServerCas(project, instance, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1443 | <pre>Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1444 | |
| 1445 | Args: |
| 1446 | project: string, Project ID of the project that contains the instance. (required) |
| 1447 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1448 | x__xgafv: string, V1 error format. |
| 1449 | Allowed values |
| 1450 | 1 - v1 error format |
| 1451 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1452 | |
| 1453 | Returns: |
| 1454 | An object of the form: |
| 1455 | |
| 1456 | { # Instances ListServerCas response. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1457 | "kind": "A String", # This is always *sql#instancesListServerCas*. |
| 1458 | "activeVersion": "A String", |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1459 | "certs": [ # List of server CA certificates for the instance. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1460 | { # SslCerts Resource |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1461 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1462 | "selfLink": "A String", # The URI of this resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1463 | "instance": "A String", # Name of the database instance. |
| 1464 | "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1465 | "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z* |
| 1466 | "kind": "A String", # This is always *sql#sslCert*. |
| 1467 | "cert": "A String", # PEM representation. |
| 1468 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 1469 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1470 | }, |
| 1471 | ], |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1472 | }</pre> |
| 1473 | </div> |
| 1474 | |
| 1475 | <div class="method"> |
| 1476 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 1477 | <pre>Retrieves the next page of results. |
| 1478 | |
| 1479 | Args: |
| 1480 | previous_request: The request for the previous page. (required) |
| 1481 | previous_response: The response from the request for the previous page. (required) |
| 1482 | |
| 1483 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1484 | A request object that you can call 'execute()' on to request the next |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1485 | page. Returns None if there are no more items in the collection. |
| 1486 | </pre> |
| 1487 | </div> |
| 1488 | |
| 1489 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1490 | <code class="details" id="patch">patch(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1491 | <pre>Updates settings of a Cloud SQL instance. This method supports patch semantics. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1492 | |
| 1493 | Args: |
| 1494 | project: string, Project ID of the project that contains the instance. (required) |
| 1495 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1496 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1497 | The object takes the form of: |
| 1498 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1499 | { # A Cloud SQL instance resource. Next field: 36 |
| 1500 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable. |
| 1501 | "region": "A String", # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation. |
| 1502 | "settings": { # Database instance settings. # The user settings. |
| 1503 | "tier": "A String", # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances). |
| 1504 | "kind": "A String", # This is always *sql#settings*. |
| 1505 | "dataDiskType": "A String", # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances. |
| 1506 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1507 | "A String", |
| 1508 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1509 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances. |
| 1510 | "activeDirectoryConfig": { # Active Directory configuration, for now relevant only for SQL Server # Active Directory configuration, for now relevant only for SQL Server |
| 1511 | "domain": "A String", # Domain name |
| 1512 | "kind": "A String", # This will be always sql#activeDirectoryConfig. |
| 1513 | }, |
| 1514 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances. |
| 1515 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances. |
| 1516 | "kind": "A String", # This is always *sql#locationPreference*. |
| 1517 | "zone": "A String", # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). |
| 1518 | "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance. |
| 1519 | }, |
| 1520 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not. |
| 1521 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. |
| 1522 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances. |
| 1523 | "requireSsl": True or False, # Whether SSL connections over IP are enforced or not. |
| 1524 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set. |
| 1525 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: *192.168.100.0/24*). |
| 1526 | { # An entry for an Access Control list. |
| 1527 | "name": "A String", # Optional. A label to identify this entry. |
| 1528 | "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1529 | "value": "A String", # The allowlisted value for the access control list. |
| 1530 | "kind": "A String", # This is always *sql#aclEntry*. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1531 | }, |
| 1532 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1533 | "ipv4Enabled": True or False, # Whether the instance is assigned a public IP address or not. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1534 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1535 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 1536 | "enabled": True or False, # Whether this configuration is enabled. |
| 1537 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 1538 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 1539 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*. |
| 1540 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well. |
| 1541 | "location": "A String", # Location of the backup |
| 1542 | "kind": "A String", # This is always *sql#backupConfiguration*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1543 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1544 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value. |
| 1545 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. |
| 1546 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 1547 | { # Database flags for Cloud SQL instances. |
| 1548 | "value": "A String", # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn't take a value. |
| 1549 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1550 | }, |
| 1551 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1552 | "maintenanceWindow": { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes. |
| 1553 | "kind": "A String", # This is always *sql#maintenanceWindow*. |
| 1554 | "hour": 42, # hour of day - 0 to 23. |
| 1555 | "updateTrack": "A String", # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more. |
| 1556 | "day": 42, # day of week (1-7), starting on Monday. |
| 1557 | }, |
| 1558 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a single key value pair. |
| 1559 | "a_key": "A String", |
| 1560 | }, |
| 1561 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is true. |
| 1562 | "availabilityType": "A String", # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration. |
| 1563 | "collation": "A String", # The name of server Instance collation. |
| 1564 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives. |
| 1565 | "replicationType": "A String", # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances. |
| 1566 | "denyMaintenancePeriods": [ # Deny maintenance periods |
| 1567 | { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied. |
| 1568 | "startDate": "A String", # "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 1569 | "time": "A String", # Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 |
| 1570 | "endDate": "A String", # "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 1571 | }, |
| 1572 | ], |
| 1573 | }, |
| 1574 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 1575 | "rootPassword": "A String", # Initial root password. Use only on creation. |
| 1576 | "databaseVersion": "A String", # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*. |
| 1577 | "selfLink": "A String", # The URI of this resource. |
| 1578 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances. |
| 1579 | "kind": "A String", # This is always *sql#diskEncryptionConfiguration*. |
| 1580 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 1581 | }, |
| 1582 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see this announcement for details. |
| 1583 | "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances. |
| 1584 | "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances. |
| 1585 | "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true. |
| 1586 | }, |
| 1587 | "replicaNames": [ # The replicas of the instance. |
| 1588 | "A String", |
| 1589 | ], |
| 1590 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 1591 | "A String", |
| 1592 | ], |
| 1593 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 1594 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following. *RUNNABLE*: The instance is running, or is ready to run when accessed. *SUSPENDED*: The instance is not available, for example due to problems with billing. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed. *UNKNOWN_STATE*: The state of the instance is unknown. |
| 1595 | "backendType": "A String", # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type. |
| 1596 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 1597 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances. |
| 1598 | "kind": "A String", # This is always *sql#diskEncryptionStatus*. |
| 1599 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 1600 | }, |
| 1601 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 1602 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 1603 | "password": "A String", # The password for connecting to on-premises instance. |
| 1604 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1605 | "kind": "A String", # This is always *sql#onPremisesConfiguration*. |
| 1606 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 1607 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 1608 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 1609 | "username": "A String", # The username for connecting to on-premises instance. |
| 1610 | }, |
| 1611 | "replicaConfiguration": { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas. |
| 1612 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance. |
| 1613 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory. |
| 1614 | "verifyServerCertificate": True or False, # Whether or not to check the primary instance's Common Name value in the certificate that it sends during the SSL handshake. |
| 1615 | "username": "A String", # The username for the replication connection. |
| 1616 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 1617 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 1618 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 1619 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 1620 | "password": "A String", # The password for the replication connection. |
| 1621 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1622 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump. |
| 1623 | "kind": "A String", # This is always *sql#mysqlReplicaConfiguration*. |
| 1624 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 1625 | }, |
| 1626 | "kind": "A String", # This is always *sql#replicaConfiguration*. |
| 1627 | }, |
| 1628 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 1629 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1630 | "selfLink": "A String", # The URI of this resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1631 | "instance": "A String", # Name of the database instance. |
| 1632 | "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1633 | "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z* |
| 1634 | "kind": "A String", # This is always *sql#sslCert*. |
| 1635 | "cert": "A String", # PEM representation. |
| 1636 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 1637 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 1638 | }, |
| 1639 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead. |
| 1640 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 1641 | { # Database instance IP Mapping. |
| 1642 | "ipAddress": "A String", # The IP address assigned. |
| 1643 | "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired. |
| 1644 | "type": "A String", # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1645 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1646 | ], |
| 1647 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 1648 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 1649 | "canDefer": True or False, |
| 1650 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 1651 | }, |
| 1652 | "instanceType": "A String", # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer's premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica. |
| 1653 | "masterInstanceName": "A String", # The name of the instance which will act as primary in the replication setup. |
| 1654 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances. |
| 1655 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances. |
| 1656 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. |
| 1657 | "kind": "A String", # This is always *sql#instance*. |
| 1658 | } |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1659 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1660 | x__xgafv: string, V1 error format. |
| 1661 | Allowed values |
| 1662 | 1 - v1 error format |
| 1663 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1664 | |
| 1665 | Returns: |
| 1666 | An object of the form: |
| 1667 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1668 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 1669 | "kind": "A String", # This is always *sql#operation*. |
| 1670 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 1671 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1672 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1673 | "errors": [ # The list of errors encountered while processing this operation. |
| 1674 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1675 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1676 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1677 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1678 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1679 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1680 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1681 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1682 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 1683 | "selfLink": "A String", # The URI of this resource. |
| 1684 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1685 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1686 | "csvExportOptions": { # Options for exporting data as CSV. |
| 1687 | "selectQuery": "A String", # The select query used to extract the data. |
| 1688 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1689 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1690 | "kind": "A String", # This is always *sql#exportContext*. |
| 1691 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 1692 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1693 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1694 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1695 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1696 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1697 | "schemaOnly": True or False, # Export only schemas. |
| 1698 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1699 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1700 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1701 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1702 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1703 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1704 | }, |
| 1705 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1706 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1707 | "targetId": "A String", # Name of the database instance related to this operation. |
| 1708 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1709 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1710 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1711 | "targetLink": "A String", |
| 1712 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 1713 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1714 | "kind": "A String", # This is always *sql#importContext*. |
| 1715 | "csvImportOptions": { # Options for importing data as CSV. |
| 1716 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 1717 | "A String", |
| 1718 | ], |
| 1719 | "table": "A String", # The table to which CSV data is imported. |
| 1720 | }, |
| 1721 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1722 | "encryptionOptions": { |
| 1723 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 1724 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 1725 | "pvkPassword": "A String", # Password that encrypts the private key |
| 1726 | }, |
| 1727 | }, |
| 1728 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 1729 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 1730 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1731 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1732 | }</pre> |
| 1733 | </div> |
| 1734 | |
| 1735 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1736 | <code class="details" id="promoteReplica">promoteReplica(project, instance, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1737 | <pre>Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1738 | |
| 1739 | Args: |
| 1740 | project: string, ID of the project that contains the read replica. (required) |
| 1741 | instance: string, Cloud SQL read replica instance name. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1742 | x__xgafv: string, V1 error format. |
| 1743 | Allowed values |
| 1744 | 1 - v1 error format |
| 1745 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1746 | |
| 1747 | Returns: |
| 1748 | An object of the form: |
| 1749 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1750 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 1751 | "kind": "A String", # This is always *sql#operation*. |
| 1752 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 1753 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1754 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1755 | "errors": [ # The list of errors encountered while processing this operation. |
| 1756 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1757 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1758 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1759 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1760 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1761 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1762 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1763 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1764 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 1765 | "selfLink": "A String", # The URI of this resource. |
| 1766 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1767 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1768 | "csvExportOptions": { # Options for exporting data as CSV. |
| 1769 | "selectQuery": "A String", # The select query used to extract the data. |
| 1770 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1771 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1772 | "kind": "A String", # This is always *sql#exportContext*. |
| 1773 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 1774 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1775 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1776 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1777 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1778 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1779 | "schemaOnly": True or False, # Export only schemas. |
| 1780 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1781 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1782 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1783 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1784 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1785 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1786 | }, |
| 1787 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1788 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1789 | "targetId": "A String", # Name of the database instance related to this operation. |
| 1790 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1791 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1792 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1793 | "targetLink": "A String", |
| 1794 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 1795 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1796 | "kind": "A String", # This is always *sql#importContext*. |
| 1797 | "csvImportOptions": { # Options for importing data as CSV. |
| 1798 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 1799 | "A String", |
| 1800 | ], |
| 1801 | "table": "A String", # The table to which CSV data is imported. |
| 1802 | }, |
| 1803 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1804 | "encryptionOptions": { |
| 1805 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 1806 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 1807 | "pvkPassword": "A String", # Password that encrypts the private key |
| 1808 | }, |
| 1809 | }, |
| 1810 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 1811 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 1812 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1813 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1814 | }</pre> |
| 1815 | </div> |
| 1816 | |
| 1817 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1818 | <code class="details" id="resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1819 | <pre>Deletes all client certificates and generates a new server SSL certificate for the instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1820 | |
| 1821 | Args: |
| 1822 | project: string, Project ID of the project that contains the instance. (required) |
| 1823 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1824 | x__xgafv: string, V1 error format. |
| 1825 | Allowed values |
| 1826 | 1 - v1 error format |
| 1827 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1828 | |
| 1829 | Returns: |
| 1830 | An object of the form: |
| 1831 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1832 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 1833 | "kind": "A String", # This is always *sql#operation*. |
| 1834 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 1835 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1836 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1837 | "errors": [ # The list of errors encountered while processing this operation. |
| 1838 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1839 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1840 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1841 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1842 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1843 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1844 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1845 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1846 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 1847 | "selfLink": "A String", # The URI of this resource. |
| 1848 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1849 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1850 | "csvExportOptions": { # Options for exporting data as CSV. |
| 1851 | "selectQuery": "A String", # The select query used to extract the data. |
| 1852 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1853 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1854 | "kind": "A String", # This is always *sql#exportContext*. |
| 1855 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 1856 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1857 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1858 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1859 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1860 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1861 | "schemaOnly": True or False, # Export only schemas. |
| 1862 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1863 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1864 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1865 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1866 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1867 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1868 | }, |
| 1869 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1870 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1871 | "targetId": "A String", # Name of the database instance related to this operation. |
| 1872 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1873 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1874 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1875 | "targetLink": "A String", |
| 1876 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 1877 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1878 | "kind": "A String", # This is always *sql#importContext*. |
| 1879 | "csvImportOptions": { # Options for importing data as CSV. |
| 1880 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 1881 | "A String", |
| 1882 | ], |
| 1883 | "table": "A String", # The table to which CSV data is imported. |
| 1884 | }, |
| 1885 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1886 | "encryptionOptions": { |
| 1887 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 1888 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 1889 | "pvkPassword": "A String", # Password that encrypts the private key |
| 1890 | }, |
| 1891 | }, |
| 1892 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 1893 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 1894 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1895 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1896 | }</pre> |
| 1897 | </div> |
| 1898 | |
| 1899 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1900 | <code class="details" id="restart">restart(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1901 | <pre>Restarts a Cloud SQL instance. |
| 1902 | |
| 1903 | Args: |
| 1904 | project: string, Project ID of the project that contains the instance to be restarted. (required) |
| 1905 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1906 | x__xgafv: string, V1 error format. |
| 1907 | Allowed values |
| 1908 | 1 - v1 error format |
| 1909 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1910 | |
| 1911 | Returns: |
| 1912 | An object of the form: |
| 1913 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1914 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 1915 | "kind": "A String", # This is always *sql#operation*. |
| 1916 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 1917 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1918 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1919 | "errors": [ # The list of errors encountered while processing this operation. |
| 1920 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1921 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1922 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1923 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1924 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1925 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1926 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1927 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1928 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 1929 | "selfLink": "A String", # The URI of this resource. |
| 1930 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1931 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1932 | "csvExportOptions": { # Options for exporting data as CSV. |
| 1933 | "selectQuery": "A String", # The select query used to extract the data. |
| 1934 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1935 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1936 | "kind": "A String", # This is always *sql#exportContext*. |
| 1937 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 1938 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1939 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1940 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1941 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1942 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1943 | "schemaOnly": True or False, # Export only schemas. |
| 1944 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1945 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1946 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1947 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1948 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1949 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1950 | }, |
| 1951 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1952 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1953 | "targetId": "A String", # Name of the database instance related to this operation. |
| 1954 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1955 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1956 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1957 | "targetLink": "A String", |
| 1958 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 1959 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1960 | "kind": "A String", # This is always *sql#importContext*. |
| 1961 | "csvImportOptions": { # Options for importing data as CSV. |
| 1962 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 1963 | "A String", |
| 1964 | ], |
| 1965 | "table": "A String", # The table to which CSV data is imported. |
| 1966 | }, |
| 1967 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1968 | "encryptionOptions": { |
| 1969 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 1970 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 1971 | "pvkPassword": "A String", # Password that encrypts the private key |
| 1972 | }, |
| 1973 | }, |
| 1974 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 1975 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 1976 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1977 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1978 | }</pre> |
| 1979 | </div> |
| 1980 | |
| 1981 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1982 | <code class="details" id="restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1983 | <pre>Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1984 | |
| 1985 | Args: |
| 1986 | project: string, Project ID of the project that contains the instance. (required) |
| 1987 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1988 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1989 | The object takes the form of: |
| 1990 | |
| 1991 | { # Database instance restore backup request. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1992 | "restoreBackupContext": { # Database instance restore from backup context. Backup context contains source instance id and project id. # Parameters required to perform the restore backup operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1993 | "project": "A String", # The full project ID of the source instance. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 1994 | "kind": "A String", # This is always *sql#restoreBackupContext*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1995 | "backupRunId": "A String", # The ID of the backup run to restore from. |
| 1996 | "instanceId": "A String", # The ID of the instance that the backup was taken from. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1997 | }, |
| 1998 | } |
| 1999 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2000 | x__xgafv: string, V1 error format. |
| 2001 | Allowed values |
| 2002 | 1 - v1 error format |
| 2003 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2004 | |
| 2005 | Returns: |
| 2006 | An object of the form: |
| 2007 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2008 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 2009 | "kind": "A String", # This is always *sql#operation*. |
| 2010 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 2011 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2012 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2013 | "errors": [ # The list of errors encountered while processing this operation. |
| 2014 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2015 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2016 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2017 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2018 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2019 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2020 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2021 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2022 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 2023 | "selfLink": "A String", # The URI of this resource. |
| 2024 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2025 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2026 | "csvExportOptions": { # Options for exporting data as CSV. |
| 2027 | "selectQuery": "A String", # The select query used to extract the data. |
| 2028 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2029 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2030 | "kind": "A String", # This is always *sql#exportContext*. |
| 2031 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 2032 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2033 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2034 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2035 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2036 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2037 | "schemaOnly": True or False, # Export only schemas. |
| 2038 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2039 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2040 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2041 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2042 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2043 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2044 | }, |
| 2045 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2046 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2047 | "targetId": "A String", # Name of the database instance related to this operation. |
| 2048 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2049 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2050 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2051 | "targetLink": "A String", |
| 2052 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 2053 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2054 | "kind": "A String", # This is always *sql#importContext*. |
| 2055 | "csvImportOptions": { # Options for importing data as CSV. |
| 2056 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 2057 | "A String", |
| 2058 | ], |
| 2059 | "table": "A String", # The table to which CSV data is imported. |
| 2060 | }, |
| 2061 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 2062 | "encryptionOptions": { |
| 2063 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 2064 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 2065 | "pvkPassword": "A String", # Password that encrypts the private key |
| 2066 | }, |
| 2067 | }, |
| 2068 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 2069 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 2070 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 2071 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2072 | }</pre> |
| 2073 | </div> |
| 2074 | |
| 2075 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2076 | <code class="details" id="rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2077 | <pre>Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2078 | |
| 2079 | Args: |
| 2080 | project: string, Project ID of the project that contains the instance. (required) |
| 2081 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2082 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2083 | The object takes the form of: |
| 2084 | |
| 2085 | { # Rotate Server CA request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2086 | "rotateServerCaContext": { # Instance rotate server CA context. # Contains details about the rotate server CA operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2087 | "nextVersion": "A String", # The fingerprint of the next version to be rotated to. If left unspecified, will be rotated to the most recently added server CA version. |
| 2088 | "kind": "A String", # This is always *sql#rotateServerCaContext*. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2089 | }, |
| 2090 | } |
| 2091 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2092 | x__xgafv: string, V1 error format. |
| 2093 | Allowed values |
| 2094 | 1 - v1 error format |
| 2095 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2096 | |
| 2097 | Returns: |
| 2098 | An object of the form: |
| 2099 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2100 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 2101 | "kind": "A String", # This is always *sql#operation*. |
| 2102 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 2103 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2104 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2105 | "errors": [ # The list of errors encountered while processing this operation. |
| 2106 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2107 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2108 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2109 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2110 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2111 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2112 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2113 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2114 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 2115 | "selfLink": "A String", # The URI of this resource. |
| 2116 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2117 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2118 | "csvExportOptions": { # Options for exporting data as CSV. |
| 2119 | "selectQuery": "A String", # The select query used to extract the data. |
| 2120 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2121 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2122 | "kind": "A String", # This is always *sql#exportContext*. |
| 2123 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 2124 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2125 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2126 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2127 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2128 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2129 | "schemaOnly": True or False, # Export only schemas. |
| 2130 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2131 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2132 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2133 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2134 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2135 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2136 | }, |
| 2137 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2138 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2139 | "targetId": "A String", # Name of the database instance related to this operation. |
| 2140 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2141 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2142 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2143 | "targetLink": "A String", |
| 2144 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 2145 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2146 | "kind": "A String", # This is always *sql#importContext*. |
| 2147 | "csvImportOptions": { # Options for importing data as CSV. |
| 2148 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 2149 | "A String", |
| 2150 | ], |
| 2151 | "table": "A String", # The table to which CSV data is imported. |
| 2152 | }, |
| 2153 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 2154 | "encryptionOptions": { |
| 2155 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 2156 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 2157 | "pvkPassword": "A String", # Password that encrypts the private key |
| 2158 | }, |
| 2159 | }, |
| 2160 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 2161 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 2162 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 2163 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2164 | }</pre> |
| 2165 | </div> |
| 2166 | |
| 2167 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2168 | <code class="details" id="startReplica">startReplica(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2169 | <pre>Starts the replication in the read replica instance. |
| 2170 | |
| 2171 | Args: |
| 2172 | project: string, ID of the project that contains the read replica. (required) |
| 2173 | instance: string, Cloud SQL read replica instance name. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2174 | x__xgafv: string, V1 error format. |
| 2175 | Allowed values |
| 2176 | 1 - v1 error format |
| 2177 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2178 | |
| 2179 | Returns: |
| 2180 | An object of the form: |
| 2181 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2182 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 2183 | "kind": "A String", # This is always *sql#operation*. |
| 2184 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 2185 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2186 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2187 | "errors": [ # The list of errors encountered while processing this operation. |
| 2188 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2189 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2190 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2191 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2192 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2193 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2194 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2195 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2196 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 2197 | "selfLink": "A String", # The URI of this resource. |
| 2198 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2199 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2200 | "csvExportOptions": { # Options for exporting data as CSV. |
| 2201 | "selectQuery": "A String", # The select query used to extract the data. |
| 2202 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2203 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2204 | "kind": "A String", # This is always *sql#exportContext*. |
| 2205 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 2206 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2207 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2208 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2209 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2210 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2211 | "schemaOnly": True or False, # Export only schemas. |
| 2212 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2213 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2214 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2215 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2216 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2217 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2218 | }, |
| 2219 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2220 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2221 | "targetId": "A String", # Name of the database instance related to this operation. |
| 2222 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2223 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2224 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2225 | "targetLink": "A String", |
| 2226 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 2227 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2228 | "kind": "A String", # This is always *sql#importContext*. |
| 2229 | "csvImportOptions": { # Options for importing data as CSV. |
| 2230 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 2231 | "A String", |
| 2232 | ], |
| 2233 | "table": "A String", # The table to which CSV data is imported. |
| 2234 | }, |
| 2235 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 2236 | "encryptionOptions": { |
| 2237 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 2238 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 2239 | "pvkPassword": "A String", # Password that encrypts the private key |
| 2240 | }, |
| 2241 | }, |
| 2242 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 2243 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 2244 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 2245 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2246 | }</pre> |
| 2247 | </div> |
| 2248 | |
| 2249 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2250 | <code class="details" id="stopReplica">stopReplica(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2251 | <pre>Stops the replication in the read replica instance. |
| 2252 | |
| 2253 | Args: |
| 2254 | project: string, ID of the project that contains the read replica. (required) |
| 2255 | instance: string, Cloud SQL read replica instance name. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2256 | x__xgafv: string, V1 error format. |
| 2257 | Allowed values |
| 2258 | 1 - v1 error format |
| 2259 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2260 | |
| 2261 | Returns: |
| 2262 | An object of the form: |
| 2263 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2264 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 2265 | "kind": "A String", # This is always *sql#operation*. |
| 2266 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 2267 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2268 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2269 | "errors": [ # The list of errors encountered while processing this operation. |
| 2270 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2271 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2272 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2273 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2274 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2275 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2276 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2277 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2278 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 2279 | "selfLink": "A String", # The URI of this resource. |
| 2280 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2281 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2282 | "csvExportOptions": { # Options for exporting data as CSV. |
| 2283 | "selectQuery": "A String", # The select query used to extract the data. |
| 2284 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2285 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2286 | "kind": "A String", # This is always *sql#exportContext*. |
| 2287 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 2288 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2289 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2290 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2291 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2292 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2293 | "schemaOnly": True or False, # Export only schemas. |
| 2294 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2295 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2296 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2297 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2298 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2299 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2300 | }, |
| 2301 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2302 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2303 | "targetId": "A String", # Name of the database instance related to this operation. |
| 2304 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2305 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2306 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2307 | "targetLink": "A String", |
| 2308 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 2309 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2310 | "kind": "A String", # This is always *sql#importContext*. |
| 2311 | "csvImportOptions": { # Options for importing data as CSV. |
| 2312 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 2313 | "A String", |
| 2314 | ], |
| 2315 | "table": "A String", # The table to which CSV data is imported. |
| 2316 | }, |
| 2317 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 2318 | "encryptionOptions": { |
| 2319 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 2320 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 2321 | "pvkPassword": "A String", # Password that encrypts the private key |
| 2322 | }, |
| 2323 | }, |
| 2324 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 2325 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 2326 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 2327 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2328 | }</pre> |
| 2329 | </div> |
| 2330 | |
| 2331 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2332 | <code class="details" id="truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 2333 | <pre>Truncate MySQL general and slow query log tables |
| 2334 | |
| 2335 | Args: |
| 2336 | project: string, Project ID of the Cloud SQL project. (required) |
| 2337 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2338 | body: object, The request body. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 2339 | The object takes the form of: |
| 2340 | |
| 2341 | { # Instance truncate log request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2342 | "truncateLogContext": { # Database Instance truncate log context. # Contains details about the truncate log operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2343 | "kind": "A String", # This is always *sql#truncateLogContext*. |
| 2344 | "logType": "A String", # The type of log to truncate. Valid values are *MYSQL_GENERAL_TABLE* and *MYSQL_SLOW_TABLE*. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 2345 | }, |
| 2346 | } |
| 2347 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2348 | x__xgafv: string, V1 error format. |
| 2349 | Allowed values |
| 2350 | 1 - v1 error format |
| 2351 | 2 - v2 error format |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 2352 | |
| 2353 | Returns: |
| 2354 | An object of the form: |
| 2355 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2356 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 2357 | "kind": "A String", # This is always *sql#operation*. |
| 2358 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 2359 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2360 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2361 | "errors": [ # The list of errors encountered while processing this operation. |
| 2362 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2363 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2364 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2365 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2366 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2367 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2368 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2369 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2370 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 2371 | "selfLink": "A String", # The URI of this resource. |
| 2372 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2373 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2374 | "csvExportOptions": { # Options for exporting data as CSV. |
| 2375 | "selectQuery": "A String", # The select query used to extract the data. |
| 2376 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2377 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2378 | "kind": "A String", # This is always *sql#exportContext*. |
| 2379 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 2380 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2381 | "A String", |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 2382 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2383 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2384 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2385 | "schemaOnly": True or False, # Export only schemas. |
| 2386 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2387 | "A String", |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 2388 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2389 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2390 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2391 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 2392 | }, |
| 2393 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2394 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2395 | "targetId": "A String", # Name of the database instance related to this operation. |
| 2396 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2397 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2398 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2399 | "targetLink": "A String", |
| 2400 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 2401 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2402 | "kind": "A String", # This is always *sql#importContext*. |
| 2403 | "csvImportOptions": { # Options for importing data as CSV. |
| 2404 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 2405 | "A String", |
| 2406 | ], |
| 2407 | "table": "A String", # The table to which CSV data is imported. |
| 2408 | }, |
| 2409 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 2410 | "encryptionOptions": { |
| 2411 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 2412 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 2413 | "pvkPassword": "A String", # Password that encrypts the private key |
| 2414 | }, |
| 2415 | }, |
| 2416 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 2417 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 2418 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 2419 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 2420 | }</pre> |
| 2421 | </div> |
| 2422 | |
| 2423 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2424 | <code class="details" id="update">update(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2425 | <pre>Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2426 | |
| 2427 | Args: |
| 2428 | project: string, Project ID of the project that contains the instance. (required) |
| 2429 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2430 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2431 | The object takes the form of: |
| 2432 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2433 | { # A Cloud SQL instance resource. Next field: 36 |
| 2434 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable. |
| 2435 | "region": "A String", # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation. |
| 2436 | "settings": { # Database instance settings. # The user settings. |
| 2437 | "tier": "A String", # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances). |
| 2438 | "kind": "A String", # This is always *sql#settings*. |
| 2439 | "dataDiskType": "A String", # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances. |
| 2440 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2441 | "A String", |
| 2442 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2443 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances. |
| 2444 | "activeDirectoryConfig": { # Active Directory configuration, for now relevant only for SQL Server # Active Directory configuration, for now relevant only for SQL Server |
| 2445 | "domain": "A String", # Domain name |
| 2446 | "kind": "A String", # This will be always sql#activeDirectoryConfig. |
| 2447 | }, |
| 2448 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances. |
| 2449 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances. |
| 2450 | "kind": "A String", # This is always *sql#locationPreference*. |
| 2451 | "zone": "A String", # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). |
| 2452 | "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance. |
| 2453 | }, |
| 2454 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not. |
| 2455 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. |
| 2456 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances. |
| 2457 | "requireSsl": True or False, # Whether SSL connections over IP are enforced or not. |
| 2458 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set. |
| 2459 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: *192.168.100.0/24*). |
| 2460 | { # An entry for an Access Control list. |
| 2461 | "name": "A String", # Optional. A label to identify this entry. |
| 2462 | "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2463 | "value": "A String", # The allowlisted value for the access control list. |
| 2464 | "kind": "A String", # This is always *sql#aclEntry*. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2465 | }, |
| 2466 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2467 | "ipv4Enabled": True or False, # Whether the instance is assigned a public IP address or not. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 2468 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2469 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 2470 | "enabled": True or False, # Whether this configuration is enabled. |
| 2471 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 2472 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 2473 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*. |
| 2474 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well. |
| 2475 | "location": "A String", # Location of the backup |
| 2476 | "kind": "A String", # This is always *sql#backupConfiguration*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2477 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2478 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value. |
| 2479 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. |
| 2480 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 2481 | { # Database flags for Cloud SQL instances. |
| 2482 | "value": "A String", # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn't take a value. |
| 2483 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2484 | }, |
| 2485 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2486 | "maintenanceWindow": { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes. |
| 2487 | "kind": "A String", # This is always *sql#maintenanceWindow*. |
| 2488 | "hour": 42, # hour of day - 0 to 23. |
| 2489 | "updateTrack": "A String", # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more. |
| 2490 | "day": 42, # day of week (1-7), starting on Monday. |
| 2491 | }, |
| 2492 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a single key value pair. |
| 2493 | "a_key": "A String", |
| 2494 | }, |
| 2495 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is true. |
| 2496 | "availabilityType": "A String", # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration. |
| 2497 | "collation": "A String", # The name of server Instance collation. |
| 2498 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives. |
| 2499 | "replicationType": "A String", # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances. |
| 2500 | "denyMaintenancePeriods": [ # Deny maintenance periods |
| 2501 | { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied. |
| 2502 | "startDate": "A String", # "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 2503 | "time": "A String", # Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 |
| 2504 | "endDate": "A String", # "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 2505 | }, |
| 2506 | ], |
| 2507 | }, |
| 2508 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 2509 | "rootPassword": "A String", # Initial root password. Use only on creation. |
| 2510 | "databaseVersion": "A String", # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*. |
| 2511 | "selfLink": "A String", # The URI of this resource. |
| 2512 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances. |
| 2513 | "kind": "A String", # This is always *sql#diskEncryptionConfiguration*. |
| 2514 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 2515 | }, |
| 2516 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see this announcement for details. |
| 2517 | "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances. |
| 2518 | "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances. |
| 2519 | "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true. |
| 2520 | }, |
| 2521 | "replicaNames": [ # The replicas of the instance. |
| 2522 | "A String", |
| 2523 | ], |
| 2524 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 2525 | "A String", |
| 2526 | ], |
| 2527 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 2528 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following. *RUNNABLE*: The instance is running, or is ready to run when accessed. *SUSPENDED*: The instance is not available, for example due to problems with billing. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed. *UNKNOWN_STATE*: The state of the instance is unknown. |
| 2529 | "backendType": "A String", # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type. |
| 2530 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 2531 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances. |
| 2532 | "kind": "A String", # This is always *sql#diskEncryptionStatus*. |
| 2533 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 2534 | }, |
| 2535 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 2536 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 2537 | "password": "A String", # The password for connecting to on-premises instance. |
| 2538 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 2539 | "kind": "A String", # This is always *sql#onPremisesConfiguration*. |
| 2540 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 2541 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 2542 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 2543 | "username": "A String", # The username for connecting to on-premises instance. |
| 2544 | }, |
| 2545 | "replicaConfiguration": { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas. |
| 2546 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance. |
| 2547 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory. |
| 2548 | "verifyServerCertificate": True or False, # Whether or not to check the primary instance's Common Name value in the certificate that it sends during the SSL handshake. |
| 2549 | "username": "A String", # The username for the replication connection. |
| 2550 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 2551 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 2552 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 2553 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 2554 | "password": "A String", # The password for the replication connection. |
| 2555 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 2556 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump. |
| 2557 | "kind": "A String", # This is always *sql#mysqlReplicaConfiguration*. |
| 2558 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 2559 | }, |
| 2560 | "kind": "A String", # This is always *sql#replicaConfiguration*. |
| 2561 | }, |
| 2562 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 2563 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2564 | "selfLink": "A String", # The URI of this resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2565 | "instance": "A String", # Name of the database instance. |
| 2566 | "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2567 | "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z* |
| 2568 | "kind": "A String", # This is always *sql#sslCert*. |
| 2569 | "cert": "A String", # PEM representation. |
| 2570 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 2571 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 2572 | }, |
| 2573 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead. |
| 2574 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 2575 | { # Database instance IP Mapping. |
| 2576 | "ipAddress": "A String", # The IP address assigned. |
| 2577 | "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired. |
| 2578 | "type": "A String", # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2579 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2580 | ], |
| 2581 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 2582 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 2583 | "canDefer": True or False, |
| 2584 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 2585 | }, |
| 2586 | "instanceType": "A String", # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer's premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica. |
| 2587 | "masterInstanceName": "A String", # The name of the instance which will act as primary in the replication setup. |
| 2588 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances. |
| 2589 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances. |
| 2590 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. |
| 2591 | "kind": "A String", # This is always *sql#instance*. |
| 2592 | } |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2593 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2594 | x__xgafv: string, V1 error format. |
| 2595 | Allowed values |
| 2596 | 1 - v1 error format |
| 2597 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2598 | |
| 2599 | Returns: |
| 2600 | An object of the form: |
| 2601 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2602 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
| 2603 | "kind": "A String", # This is always *sql#operation*. |
| 2604 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 2605 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2606 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2607 | "errors": [ # The list of errors encountered while processing this operation. |
| 2608 | { # Database instance operation error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2609 | "code": "A String", # Identifies the specific error that occurred. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2610 | "kind": "A String", # This is always *sql#operationError*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2611 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2612 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2613 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2614 | "kind": "A String", # This is always *sql#operationErrors*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2615 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2616 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 2617 | "selfLink": "A String", # The URI of this resource. |
| 2618 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2619 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2620 | "csvExportOptions": { # Options for exporting data as CSV. |
| 2621 | "selectQuery": "A String", # The select query used to extract the data. |
| 2622 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2623 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2624 | "kind": "A String", # This is always *sql#exportContext*. |
| 2625 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed. |
| 2626 | "databases": [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2627 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2628 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2629 | "offload": True or False, # Option for export offload. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2630 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2631 | "schemaOnly": True or False, # Export only schemas. |
| 2632 | "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2633 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2634 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2635 | "mysqlExportOptions": { # Options for exporting from MySQL. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2636 | "masterData": 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2637 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2638 | }, |
| 2639 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2640 | "user": "A String", # The email address of the user who initiated this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2641 | "targetId": "A String", # Name of the database instance related to this operation. |
| 2642 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2643 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2644 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 2645 | "targetLink": "A String", |
| 2646 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 2647 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2648 | "kind": "A String", # This is always *sql#importContext*. |
| 2649 | "csvImportOptions": { # Options for importing data as CSV. |
| 2650 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 2651 | "A String", |
| 2652 | ], |
| 2653 | "table": "A String", # The table to which CSV data is imported. |
| 2654 | }, |
| 2655 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 2656 | "encryptionOptions": { |
| 2657 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 2658 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file. |
| 2659 | "pvkPassword": "A String", # Password that encrypts the private key |
| 2660 | }, |
| 2661 | }, |
| 2662 | "database": "A String", # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified. |
| 2663 | "uri": "A String", # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file. |
| 2664 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 2665 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2666 | }</pre> |
| 2667 | </div> |
| 2668 | |
| 2669 | </body></html> |