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