blob: b99f24149e7dc0c29d04a62ac1992ab2c1b642d5 [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.
899 &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**).
900 { # An entry for an Access Control list.
901 &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**.
902 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#aclEntry**.
903 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
904 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
905 },
906 ],
907 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
908 &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.
909 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
910 },
911 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#settings**.
912 &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.
913 &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.
914 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#locationPreference**.
915 &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.
916 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
917 },
918 &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.
919 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
920 &quot;hour&quot;: 42, # hour of day - 0 to 23.
921 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#maintenanceWindow**.
922 &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).
923 },
924 &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.
925 &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.
926 &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.
927 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
928 &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.
929 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example **db-custom-1-3840**.
930 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
931 &quot;a_key&quot;: &quot;A String&quot;,
932 },
933 },
934 &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.
935 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
936 &quot;A String&quot;,
937 ],
938}</pre>
939</div>
940
941<div class="method">
942 <code class="details" id="import_">import_(project, instance, body=None, x__xgafv=None)</code>
943 <pre>Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.
944
945Args:
946 project: string, Project ID of the project that contains the instance. (required)
947 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
948 body: object, The request body.
949 The object takes the form of:
950
951{ # Database instance import request.
952 &quot;importContext&quot;: { # Database instance import context. # Contains details about the import operation.
953 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
954 &quot;encryptionOptions&quot;: {
955 &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.
956 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
957 &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.
958 },
959 },
960 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
961 &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.
962 &quot;A String&quot;,
963 ],
964 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
965 },
966 &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.
967 &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.
968 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
969 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
970 &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.
971 },
972}
973
974 x__xgafv: string, V1 error format.
975 Allowed values
976 1 - v1 error format
977 2 - v2 error format
978
979Returns:
980 An object of the form:
981
982 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
983 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
984 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
985 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
986 },
987 &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**.
988 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
989 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
990 { # Database instance operation error.
991 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
992 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
993 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
994 },
995 ],
996 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
997 },
998 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
999 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
1000 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1001 },
1002 &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**.
1003 &quot;A String&quot;,
1004 ],
1005 &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.
1006 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
1007 &quot;offload&quot;: True or False, # Option for export offload.
1008 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1009 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1010 &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.
1011 },
1012 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1013 &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.
1014 &quot;A String&quot;,
1015 ],
1016 },
1017 &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.
1018 },
1019 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1020 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1021 &quot;encryptionOptions&quot;: {
1022 &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.
1023 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1024 &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.
1025 },
1026 },
1027 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1028 &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.
1029 &quot;A String&quot;,
1030 ],
1031 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1032 },
1033 &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.
1034 &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.
1035 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1036 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
1037 &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.
1038 },
1039 &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**.
1040 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
1041 &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.
1042 &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**
1043 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1044 &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**.
1045 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
1046 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1047 &quot;targetLink&quot;: &quot;A String&quot;,
1048 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1049 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1050}</pre>
1051</div>
1052
1053<div class="method">
1054 <code class="details" id="insert">insert(project, body=None, x__xgafv=None)</code>
1055 <pre>Creates a new Cloud SQL instance.
1056
1057Args:
1058 project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required)
1059 body: object, The request body.
1060 The object takes the form of:
1061
1062{ # A Cloud SQL instance resource.
1063 &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.
1064 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
1065 &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.
1066 &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*.
1067 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
1068 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionConfiguration**.
1069 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1070 },
1071 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
1072 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionStatus**.
1073 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1074 },
1075 &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.
1076 &quot;failoverReplica&quot;: { # The name and status of the failover replica.
1077 &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.
1078 &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.
1079 },
1080 &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.
1081 &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.
1082 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1083 { # Database instance IP Mapping.
1084 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1085 &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.
1086 &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.
1087 },
1088 ],
1089 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1090 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1091 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1092 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1093 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1094 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1095 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1096 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1097 &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.
1098 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1099 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1100 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1101 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1102 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1103 },
1104 &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
1105 &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
1106 &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
1107 },
1108 &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.
1109 &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.
1110 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1111 &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.
1112 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1113 &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.
1114 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1115 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1116 &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.
1117 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1118 &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.
1119 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#mysqlReplicaConfiguration**.
1120 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1121 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1122 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1123 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1124 &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.
1125 },
1126 },
1127 &quot;replicaNames&quot;: [ # The replicas of the instance.
1128 &quot;A String&quot;,
1129 ],
1130 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
1131 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
1132 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1133 &quot;canDefer&quot;: True or False,
1134 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1135 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
1136 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1137 },
1138 &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.
1139 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1140 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1141 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1142 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1143 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1144 &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**
1145 &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**.
1146 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1147 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sslCert.
1148 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1149 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1150 },
1151 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
1152 &quot;settings&quot;: { # Database instance settings. # The user settings.
1153 &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.
1154 &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.
1155 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
1156 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
1157 },
1158 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
1159 &quot;A String&quot;,
1160 ],
1161 &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).
1162 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1163 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1164 &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.
1165 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1166 },
1167 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1168 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1169 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupConfiguration**.
1170 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1171 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
1172 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1173 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - **HH:MM**.
1174 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1175 },
1176 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1177 &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.
1178 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1179 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: **PD_SSD** (default) or **PD_HDD**.
1180 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1181 { # Database flags for Cloud SQL instances.
1182 &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.
1183 &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.
1184 },
1185 ],
1186 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1187 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1188 { # Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1189 &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
1190 &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
1191 &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
1192 },
1193 ],
1194 &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.
1195 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
1196 &quot;queryPlansPerMinute&quot;: 42, # Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.
1197 &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.
1198 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1199 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1200 },
1201 &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.
1202 &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**).
1203 { # An entry for an Access Control list.
1204 &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**.
1205 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#aclEntry**.
1206 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1207 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1208 },
1209 ],
1210 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1211 &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.
1212 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1213 },
1214 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#settings**.
1215 &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.
1216 &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.
1217 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#locationPreference**.
1218 &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.
1219 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1220 },
1221 &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.
1222 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1223 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1224 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#maintenanceWindow**.
1225 &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).
1226 },
1227 &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.
1228 &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.
1229 &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.
1230 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1231 &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.
1232 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example **db-custom-1-3840**.
1233 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1234 &quot;a_key&quot;: &quot;A String&quot;,
1235 },
1236 },
1237 &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.
1238 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1239 &quot;A String&quot;,
1240 ],
1241}
1242
1243 x__xgafv: string, V1 error format.
1244 Allowed values
1245 1 - v1 error format
1246 2 - v2 error format
1247
1248Returns:
1249 An object of the form:
1250
1251 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
1252 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1253 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1254 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
1255 },
1256 &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**.
1257 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1258 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1259 { # Database instance operation error.
1260 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1261 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
1262 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1263 },
1264 ],
1265 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
1266 },
1267 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1268 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
1269 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1270 },
1271 &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**.
1272 &quot;A String&quot;,
1273 ],
1274 &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.
1275 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
1276 &quot;offload&quot;: True or False, # Option for export offload.
1277 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1278 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1279 &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.
1280 },
1281 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1282 &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.
1283 &quot;A String&quot;,
1284 ],
1285 },
1286 &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.
1287 },
1288 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1289 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1290 &quot;encryptionOptions&quot;: {
1291 &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.
1292 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1293 &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.
1294 },
1295 },
1296 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1297 &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.
1298 &quot;A String&quot;,
1299 ],
1300 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1301 },
1302 &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.
1303 &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.
1304 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1305 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
1306 &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.
1307 },
1308 &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**.
1309 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
1310 &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.
1311 &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**
1312 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1313 &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**.
1314 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
1315 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1316 &quot;targetLink&quot;: &quot;A String&quot;,
1317 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1318 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1319}</pre>
1320</div>
1321
1322<div class="method">
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001323 <code class="details" id="list">list(project, filter=None, maxResults=None, pageToken=None, x__xgafv=None)</code>
1324 <pre>Lists instances under a given project.
1325
1326Args:
1327 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
1328 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.
1329 maxResults: integer, The maximum number of results to return per response.
1330 pageToken: string, A previously-returned page token representing part of the larger set of results to view.
1331 x__xgafv: string, V1 error format.
1332 Allowed values
1333 1 - v1 error format
1334 2 - v2 error format
1335
1336Returns:
1337 An object of the form:
1338
1339 { # Database instances list response.
1340 &quot;items&quot;: [ # List of database instance resources.
1341 { # A Cloud SQL instance resource.
1342 &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.
1343 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
1344 &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 -07001345 &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*.
1346 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001347 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionConfiguration**.
1348 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1349 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001350 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001351 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionStatus**.
1352 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1353 },
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001354 &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 -07001355 &quot;failoverReplica&quot;: { # The name and status of the failover replica.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001356 &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 -07001357 &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 -07001358 },
1359 &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 -07001360 &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 -07001361 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1362 { # Database instance IP Mapping.
1363 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1364 &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.
1365 &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.
1366 },
1367 ],
1368 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1369 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001370 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1371 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1372 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1373 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1374 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1375 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1376 &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.
1377 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1378 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1379 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1380 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1381 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1382 },
1383 &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
1384 &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
1385 &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
1386 },
1387 &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.
1388 &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.
1389 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1390 &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.
1391 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1392 &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.
1393 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1394 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1395 &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.
1396 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1397 &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.
1398 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#mysqlReplicaConfiguration**.
1399 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1400 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1401 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1402 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1403 &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.
1404 },
1405 },
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001406 &quot;replicaNames&quot;: [ # The replicas of the instance.
1407 &quot;A String&quot;,
1408 ],
1409 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
1410 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
1411 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1412 &quot;canDefer&quot;: True or False,
1413 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1414 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
1415 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1416 },
1417 &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.
1418 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1419 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1420 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1421 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1422 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1423 &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**
1424 &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**.
1425 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1426 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sslCert.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001427 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001428 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1429 },
1430 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
1431 &quot;settings&quot;: { # Database instance settings. # The user settings.
1432 &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.
1433 &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.
1434 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
1435 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
1436 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001437 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
1438 &quot;A String&quot;,
1439 ],
1440 &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 -07001441 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1442 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1443 &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.
1444 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1445 },
1446 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1447 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1448 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupConfiguration**.
1449 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1450 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
1451 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1452 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - **HH:MM**.
1453 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1454 },
1455 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1456 &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.
1457 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1458 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: **PD_SSD** (default) or **PD_HDD**.
1459 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1460 { # Database flags for Cloud SQL instances.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001461 &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 -07001462 &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.
1463 },
1464 ],
1465 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1466 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1467 { # Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1468 &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
1469 &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
1470 &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
1471 },
1472 ],
1473 &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.
1474 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001475 &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 -07001476 &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.
1477 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1478 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1479 },
1480 &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.
1481 &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**).
1482 { # An entry for an Access Control list.
1483 &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**.
1484 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#aclEntry**.
1485 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1486 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1487 },
1488 ],
1489 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1490 &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.
1491 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1492 },
1493 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#settings**.
1494 &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 -07001495 &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 -07001496 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#locationPreference**.
1497 &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.
1498 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1499 },
1500 &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.
1501 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1502 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1503 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#maintenanceWindow**.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001504 &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 -07001505 },
1506 &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.
1507 &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.
1508 &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.
1509 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1510 &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.
1511 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example **db-custom-1-3840**.
1512 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1513 &quot;a_key&quot;: &quot;A String&quot;,
1514 },
1515 },
1516 &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.
1517 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1518 &quot;A String&quot;,
1519 ],
1520 },
1521 ],
1522 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instancesList*.
1523 &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.
1524 &quot;warnings&quot;: [ # List of warnings that occurred while handling the request.
1525 { # An Admin API warning message.
1526 &quot;code&quot;: &quot;A String&quot;, # Code to uniquely identify the warning type.
1527 &quot;message&quot;: &quot;A String&quot;, # The warning message.
1528 &quot;region&quot;: &quot;A String&quot;, # The region name for REGION_UNREACHABLE warning.
1529 },
1530 ],
1531}</pre>
1532</div>
1533
1534<div class="method">
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001535 <code class="details" id="listServerCas">listServerCas(project, instance, x__xgafv=None)</code>
1536 <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.
1537
1538Args:
1539 project: string, Project ID of the project that contains the instance. (required)
1540 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1541 x__xgafv: string, V1 error format.
1542 Allowed values
1543 1 - v1 error format
1544 2 - v2 error format
1545
1546Returns:
1547 An object of the form:
1548
1549 { # Instances ListServerCas response.
1550 &quot;activeVersion&quot;: &quot;A String&quot;,
1551 &quot;certs&quot;: [ # List of server CA certificates for the instance.
1552 { # SslCerts Resource
1553 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1554 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1555 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1556 &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**
1557 &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**.
1558 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1559 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sslCert.
1560 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1561 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1562 },
1563 ],
1564 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instancesListServerCas*.
1565}</pre>
1566</div>
1567
1568<div class="method">
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001569 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1570 <pre>Retrieves the next page of results.
1571
1572Args:
1573 previous_request: The request for the previous page. (required)
1574 previous_response: The response from the request for the previous page. (required)
1575
1576Returns:
1577 A request object that you can call &#x27;execute()&#x27; on to request the next
1578 page. Returns None if there are no more items in the collection.
1579 </pre>
1580</div>
1581
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001582<div class="method">
1583 <code class="details" id="patch">patch(project, instance, body=None, x__xgafv=None)</code>
1584 <pre>Updates settings of a Cloud SQL instance. This method supports patch semantics.
1585
1586Args:
1587 project: string, Project ID of the project that contains the instance. (required)
1588 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1589 body: object, The request body.
1590 The object takes the form of:
1591
1592{ # A Cloud SQL instance resource.
1593 &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.
1594 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
1595 &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.
1596 &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*.
1597 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
1598 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionConfiguration**.
1599 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1600 },
1601 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
1602 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionStatus**.
1603 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1604 },
1605 &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.
1606 &quot;failoverReplica&quot;: { # The name and status of the failover replica.
1607 &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.
1608 &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.
1609 },
1610 &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.
1611 &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.
1612 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1613 { # Database instance IP Mapping.
1614 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1615 &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.
1616 &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.
1617 },
1618 ],
1619 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1620 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1621 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1622 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1623 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1624 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1625 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1626 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1627 &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.
1628 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1629 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1630 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1631 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1632 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1633 },
1634 &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
1635 &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
1636 &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
1637 },
1638 &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.
1639 &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.
1640 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1641 &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.
1642 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1643 &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.
1644 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1645 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1646 &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.
1647 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1648 &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.
1649 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#mysqlReplicaConfiguration**.
1650 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1651 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1652 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1653 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1654 &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.
1655 },
1656 },
1657 &quot;replicaNames&quot;: [ # The replicas of the instance.
1658 &quot;A String&quot;,
1659 ],
1660 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
1661 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
1662 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1663 &quot;canDefer&quot;: True or False,
1664 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1665 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
1666 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1667 },
1668 &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.
1669 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1670 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1671 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1672 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1673 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1674 &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**
1675 &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**.
1676 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1677 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sslCert.
1678 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1679 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1680 },
1681 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
1682 &quot;settings&quot;: { # Database instance settings. # The user settings.
1683 &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.
1684 &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.
1685 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
1686 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
1687 },
1688 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
1689 &quot;A String&quot;,
1690 ],
1691 &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).
1692 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1693 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1694 &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.
1695 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1696 },
1697 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1698 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1699 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupConfiguration**.
1700 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1701 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
1702 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1703 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - **HH:MM**.
1704 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1705 },
1706 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1707 &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.
1708 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1709 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: **PD_SSD** (default) or **PD_HDD**.
1710 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1711 { # Database flags for Cloud SQL instances.
1712 &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.
1713 &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.
1714 },
1715 ],
1716 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1717 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1718 { # Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1719 &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
1720 &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
1721 &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
1722 },
1723 ],
1724 &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.
1725 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
1726 &quot;queryPlansPerMinute&quot;: 42, # Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.
1727 &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.
1728 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1729 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1730 },
1731 &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.
1732 &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**).
1733 { # An entry for an Access Control list.
1734 &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**.
1735 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#aclEntry**.
1736 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1737 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1738 },
1739 ],
1740 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1741 &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.
1742 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1743 },
1744 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#settings**.
1745 &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.
1746 &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.
1747 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#locationPreference**.
1748 &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.
1749 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1750 },
1751 &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.
1752 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1753 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1754 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#maintenanceWindow**.
1755 &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).
1756 },
1757 &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.
1758 &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.
1759 &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.
1760 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1761 &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.
1762 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example **db-custom-1-3840**.
1763 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1764 &quot;a_key&quot;: &quot;A String&quot;,
1765 },
1766 },
1767 &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.
1768 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1769 &quot;A String&quot;,
1770 ],
1771}
1772
1773 x__xgafv: string, V1 error format.
1774 Allowed values
1775 1 - v1 error format
1776 2 - v2 error format
1777
1778Returns:
1779 An object of the form:
1780
1781 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
1782 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1783 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1784 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
1785 },
1786 &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**.
1787 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1788 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1789 { # Database instance operation error.
1790 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1791 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
1792 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1793 },
1794 ],
1795 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
1796 },
1797 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1798 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
1799 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1800 },
1801 &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**.
1802 &quot;A String&quot;,
1803 ],
1804 &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.
1805 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
1806 &quot;offload&quot;: True or False, # Option for export offload.
1807 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1808 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1809 &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.
1810 },
1811 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1812 &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.
1813 &quot;A String&quot;,
1814 ],
1815 },
1816 &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.
1817 },
1818 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1819 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1820 &quot;encryptionOptions&quot;: {
1821 &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.
1822 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1823 &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.
1824 },
1825 },
1826 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1827 &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.
1828 &quot;A String&quot;,
1829 ],
1830 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1831 },
1832 &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.
1833 &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.
1834 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1835 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
1836 &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.
1837 },
1838 &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**.
1839 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
1840 &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.
1841 &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**
1842 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1843 &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**.
1844 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
1845 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1846 &quot;targetLink&quot;: &quot;A String&quot;,
1847 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1848 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1849}</pre>
1850</div>
1851
1852<div class="method">
1853 <code class="details" id="promoteReplica">promoteReplica(project, instance, x__xgafv=None)</code>
1854 <pre>Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.
1855
1856Args:
1857 project: string, ID of the project that contains the read replica. (required)
1858 instance: string, Cloud SQL read replica instance name. (required)
1859 x__xgafv: string, V1 error format.
1860 Allowed values
1861 1 - v1 error format
1862 2 - v2 error format
1863
1864Returns:
1865 An object of the form:
1866
1867 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
1868 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1869 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1870 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
1871 },
1872 &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**.
1873 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1874 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1875 { # Database instance operation error.
1876 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1877 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
1878 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1879 },
1880 ],
1881 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
1882 },
1883 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1884 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
1885 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1886 },
1887 &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**.
1888 &quot;A String&quot;,
1889 ],
1890 &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.
1891 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
1892 &quot;offload&quot;: True or False, # Option for export offload.
1893 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1894 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1895 &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.
1896 },
1897 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1898 &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.
1899 &quot;A String&quot;,
1900 ],
1901 },
1902 &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.
1903 },
1904 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1905 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1906 &quot;encryptionOptions&quot;: {
1907 &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.
1908 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1909 &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.
1910 },
1911 },
1912 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1913 &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.
1914 &quot;A String&quot;,
1915 ],
1916 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1917 },
1918 &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.
1919 &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.
1920 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1921 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
1922 &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.
1923 },
1924 &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**.
1925 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
1926 &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.
1927 &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**
1928 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1929 &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**.
1930 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
1931 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1932 &quot;targetLink&quot;: &quot;A String&quot;,
1933 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1934 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1935}</pre>
1936</div>
1937
1938<div class="method">
1939 <code class="details" id="resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</code>
1940 <pre>Deletes all client certificates and generates a new server SSL certificate for the instance.
1941
1942Args:
1943 project: string, Project ID of the project that contains the instance. (required)
1944 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1945 x__xgafv: string, V1 error format.
1946 Allowed values
1947 1 - v1 error format
1948 2 - v2 error format
1949
1950Returns:
1951 An object of the form:
1952
1953 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
1954 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1955 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1956 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
1957 },
1958 &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**.
1959 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1960 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1961 { # Database instance operation error.
1962 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1963 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
1964 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1965 },
1966 ],
1967 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
1968 },
1969 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1970 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
1971 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1972 },
1973 &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**.
1974 &quot;A String&quot;,
1975 ],
1976 &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.
1977 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
1978 &quot;offload&quot;: True or False, # Option for export offload.
1979 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1980 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1981 &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.
1982 },
1983 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1984 &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.
1985 &quot;A String&quot;,
1986 ],
1987 },
1988 &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.
1989 },
1990 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1991 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1992 &quot;encryptionOptions&quot;: {
1993 &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.
1994 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1995 &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.
1996 },
1997 },
1998 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1999 &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.
2000 &quot;A String&quot;,
2001 ],
2002 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2003 },
2004 &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.
2005 &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.
2006 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2007 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2008 &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.
2009 },
2010 &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**.
2011 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2012 &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.
2013 &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**
2014 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2015 &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**.
2016 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2017 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2018 &quot;targetLink&quot;: &quot;A String&quot;,
2019 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2020 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2021}</pre>
2022</div>
2023
2024<div class="method">
2025 <code class="details" id="restart">restart(project, instance, x__xgafv=None)</code>
2026 <pre>Restarts a Cloud SQL instance.
2027
2028Args:
2029 project: string, Project ID of the project that contains the instance to be restarted. (required)
2030 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
2031 x__xgafv: string, V1 error format.
2032 Allowed values
2033 1 - v1 error format
2034 2 - v2 error format
2035
2036Returns:
2037 An object of the form:
2038
2039 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2040 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2041 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2042 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2043 },
2044 &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**.
2045 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2046 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2047 { # Database instance operation error.
2048 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2049 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2050 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2051 },
2052 ],
2053 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2054 },
2055 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2056 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
2057 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2058 },
2059 &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**.
2060 &quot;A String&quot;,
2061 ],
2062 &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.
2063 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2064 &quot;offload&quot;: True or False, # Option for export offload.
2065 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2066 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2067 &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.
2068 },
2069 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2070 &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.
2071 &quot;A String&quot;,
2072 ],
2073 },
2074 &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.
2075 },
2076 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2077 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2078 &quot;encryptionOptions&quot;: {
2079 &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.
2080 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2081 &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.
2082 },
2083 },
2084 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2085 &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.
2086 &quot;A String&quot;,
2087 ],
2088 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2089 },
2090 &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.
2091 &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.
2092 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2093 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2094 &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.
2095 },
2096 &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**.
2097 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2098 &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.
2099 &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**
2100 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2101 &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**.
2102 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2103 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2104 &quot;targetLink&quot;: &quot;A String&quot;,
2105 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2106 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2107}</pre>
2108</div>
2109
2110<div class="method">
2111 <code class="details" id="restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</code>
2112 <pre>Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.
2113
2114Args:
2115 project: string, Project ID of the project that contains the instance. (required)
2116 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
2117 body: object, The request body.
2118 The object takes the form of:
2119
2120{ # Database instance restore backup request.
2121 &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.
2122 &quot;backupRunId&quot;: &quot;A String&quot;, # The ID of the backup run to restore from.
2123 &quot;instanceId&quot;: &quot;A String&quot;, # The ID of the instance that the backup was taken from.
2124 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#restoreBackupContext*.
2125 &quot;project&quot;: &quot;A String&quot;, # The full project ID of the source instance.
2126 },
2127}
2128
2129 x__xgafv: string, V1 error format.
2130 Allowed values
2131 1 - v1 error format
2132 2 - v2 error format
2133
2134Returns:
2135 An object of the form:
2136
2137 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2138 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2139 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2140 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2141 },
2142 &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**.
2143 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2144 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2145 { # Database instance operation error.
2146 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2147 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2148 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2149 },
2150 ],
2151 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2152 },
2153 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2154 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
2155 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2156 },
2157 &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**.
2158 &quot;A String&quot;,
2159 ],
2160 &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.
2161 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2162 &quot;offload&quot;: True or False, # Option for export offload.
2163 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2164 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2165 &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.
2166 },
2167 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2168 &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.
2169 &quot;A String&quot;,
2170 ],
2171 },
2172 &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.
2173 },
2174 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2175 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2176 &quot;encryptionOptions&quot;: {
2177 &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.
2178 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2179 &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.
2180 },
2181 },
2182 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2183 &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.
2184 &quot;A String&quot;,
2185 ],
2186 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2187 },
2188 &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.
2189 &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.
2190 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2191 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2192 &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.
2193 },
2194 &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**.
2195 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2196 &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.
2197 &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**
2198 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2199 &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**.
2200 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2201 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2202 &quot;targetLink&quot;: &quot;A String&quot;,
2203 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2204 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2205}</pre>
2206</div>
2207
2208<div class="method">
2209 <code class="details" id="rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</code>
2210 <pre>Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.
2211
2212Args:
2213 project: string, Project ID of the project that contains the instance. (required)
2214 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
2215 body: object, The request body.
2216 The object takes the form of:
2217
2218{ # Rotate server CA request.
2219 &quot;rotateServerCaContext&quot;: { # Instance rotate server CA context. # Contains details about the rotate server CA operation.
2220 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#rotateServerCaContext*.
2221 &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.
2222 },
2223}
2224
2225 x__xgafv: string, V1 error format.
2226 Allowed values
2227 1 - v1 error format
2228 2 - v2 error format
2229
2230Returns:
2231 An object of the form:
2232
2233 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2234 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2235 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2236 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2237 },
2238 &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**.
2239 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2240 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2241 { # Database instance operation error.
2242 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2243 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2244 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2245 },
2246 ],
2247 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2248 },
2249 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2250 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
2251 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2252 },
2253 &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**.
2254 &quot;A String&quot;,
2255 ],
2256 &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.
2257 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2258 &quot;offload&quot;: True or False, # Option for export offload.
2259 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2260 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2261 &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.
2262 },
2263 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2264 &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.
2265 &quot;A String&quot;,
2266 ],
2267 },
2268 &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.
2269 },
2270 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2271 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2272 &quot;encryptionOptions&quot;: {
2273 &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.
2274 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2275 &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.
2276 },
2277 },
2278 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2279 &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.
2280 &quot;A String&quot;,
2281 ],
2282 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2283 },
2284 &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.
2285 &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.
2286 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2287 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2288 &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.
2289 },
2290 &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**.
2291 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2292 &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.
2293 &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**
2294 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2295 &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**.
2296 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2297 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2298 &quot;targetLink&quot;: &quot;A String&quot;,
2299 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2300 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2301}</pre>
2302</div>
2303
2304<div class="method">
2305 <code class="details" id="startReplica">startReplica(project, instance, x__xgafv=None)</code>
2306 <pre>Starts the replication in the read replica instance.
2307
2308Args:
2309 project: string, ID of the project that contains the read replica. (required)
2310 instance: string, Cloud SQL read replica instance name. (required)
2311 x__xgafv: string, V1 error format.
2312 Allowed values
2313 1 - v1 error format
2314 2 - v2 error format
2315
2316Returns:
2317 An object of the form:
2318
2319 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2320 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2321 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2322 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2323 },
2324 &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**.
2325 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2326 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2327 { # Database instance operation error.
2328 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2329 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2330 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2331 },
2332 ],
2333 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2334 },
2335 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2336 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
2337 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2338 },
2339 &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**.
2340 &quot;A String&quot;,
2341 ],
2342 &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.
2343 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2344 &quot;offload&quot;: True or False, # Option for export offload.
2345 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2346 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2347 &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.
2348 },
2349 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2350 &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.
2351 &quot;A String&quot;,
2352 ],
2353 },
2354 &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.
2355 },
2356 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2357 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2358 &quot;encryptionOptions&quot;: {
2359 &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.
2360 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2361 &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.
2362 },
2363 },
2364 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2365 &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.
2366 &quot;A String&quot;,
2367 ],
2368 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2369 },
2370 &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.
2371 &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.
2372 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2373 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2374 &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.
2375 },
2376 &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**.
2377 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2378 &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.
2379 &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**
2380 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2381 &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**.
2382 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2383 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2384 &quot;targetLink&quot;: &quot;A String&quot;,
2385 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2386 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2387}</pre>
2388</div>
2389
2390<div class="method">
2391 <code class="details" id="stopReplica">stopReplica(project, instance, x__xgafv=None)</code>
2392 <pre>Stops the replication in the read replica instance.
2393
2394Args:
2395 project: string, ID of the project that contains the read replica. (required)
2396 instance: string, Cloud SQL read replica instance name. (required)
2397 x__xgafv: string, V1 error format.
2398 Allowed values
2399 1 - v1 error format
2400 2 - v2 error format
2401
2402Returns:
2403 An object of the form:
2404
2405 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2406 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2407 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2408 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2409 },
2410 &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**.
2411 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2412 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2413 { # Database instance operation error.
2414 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2415 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2416 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2417 },
2418 ],
2419 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2420 },
2421 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2422 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
2423 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2424 },
2425 &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**.
2426 &quot;A String&quot;,
2427 ],
2428 &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.
2429 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2430 &quot;offload&quot;: True or False, # Option for export offload.
2431 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2432 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2433 &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.
2434 },
2435 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2436 &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.
2437 &quot;A String&quot;,
2438 ],
2439 },
2440 &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.
2441 },
2442 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2443 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2444 &quot;encryptionOptions&quot;: {
2445 &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.
2446 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2447 &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.
2448 },
2449 },
2450 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2451 &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.
2452 &quot;A String&quot;,
2453 ],
2454 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2455 },
2456 &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.
2457 &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.
2458 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2459 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2460 &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.
2461 },
2462 &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**.
2463 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2464 &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.
2465 &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**
2466 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2467 &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**.
2468 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2469 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2470 &quot;targetLink&quot;: &quot;A String&quot;,
2471 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2472 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2473}</pre>
2474</div>
2475
2476<div class="method">
2477 <code class="details" id="truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</code>
2478 <pre>Truncate MySQL general and slow query log tables MySQL only.
2479
2480Args:
2481 project: string, Project ID of the Cloud SQL project. (required)
2482 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
2483 body: object, The request body.
2484 The object takes the form of:
2485
2486{ # Instance truncate log request.
2487 &quot;truncateLogContext&quot;: { # Database Instance truncate log context. # Contains details about the truncate log operation.
2488 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#truncateLogContext*.
2489 &quot;logType&quot;: &quot;A String&quot;, # The type of log to truncate. Valid values are *MYSQL_GENERAL_TABLE* and *MYSQL_SLOW_TABLE*.
2490 },
2491}
2492
2493 x__xgafv: string, V1 error format.
2494 Allowed values
2495 1 - v1 error format
2496 2 - v2 error format
2497
2498Returns:
2499 An object of the form:
2500
2501 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2502 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2503 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2504 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2505 },
2506 &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**.
2507 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2508 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2509 { # Database instance operation error.
2510 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2511 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2512 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2513 },
2514 ],
2515 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2516 },
2517 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2518 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
2519 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2520 },
2521 &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**.
2522 &quot;A String&quot;,
2523 ],
2524 &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.
2525 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2526 &quot;offload&quot;: True or False, # Option for export offload.
2527 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2528 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2529 &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.
2530 },
2531 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2532 &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.
2533 &quot;A String&quot;,
2534 ],
2535 },
2536 &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.
2537 },
2538 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2539 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2540 &quot;encryptionOptions&quot;: {
2541 &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.
2542 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2543 &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.
2544 },
2545 },
2546 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2547 &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.
2548 &quot;A String&quot;,
2549 ],
2550 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2551 },
2552 &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.
2553 &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.
2554 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2555 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2556 &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.
2557 },
2558 &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**.
2559 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2560 &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.
2561 &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**
2562 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2563 &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**.
2564 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2565 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2566 &quot;targetLink&quot;: &quot;A String&quot;,
2567 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2568 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2569}</pre>
2570</div>
2571
2572<div class="method">
2573 <code class="details" id="update">update(project, instance, body=None, x__xgafv=None)</code>
2574 <pre>Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.
2575
2576Args:
2577 project: string, Project ID of the project that contains the instance. (required)
2578 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
2579 body: object, The request body.
2580 The object takes the form of:
2581
2582{ # A Cloud SQL instance resource.
2583 &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.
2584 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
2585 &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.
2586 &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*.
2587 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
2588 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionConfiguration**.
2589 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
2590 },
2591 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
2592 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionStatus**.
2593 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
2594 },
2595 &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.
2596 &quot;failoverReplica&quot;: { # The name and status of the failover replica.
2597 &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.
2598 &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.
2599 },
2600 &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.
2601 &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.
2602 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
2603 { # Database instance IP Mapping.
2604 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
2605 &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.
2606 &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.
2607 },
2608 ],
2609 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
2610 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
2611 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
2612 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
2613 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
2614 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
2615 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2616 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
2617 &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.
2618 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
2619 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
2620 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
2621 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
2622 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
2623 },
2624 &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
2625 &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
2626 &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
2627 },
2628 &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.
2629 &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.
2630 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
2631 &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.
2632 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
2633 &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.
2634 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2635 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
2636 &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.
2637 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
2638 &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.
2639 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#mysqlReplicaConfiguration**.
2640 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
2641 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
2642 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
2643 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
2644 &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.
2645 },
2646 },
2647 &quot;replicaNames&quot;: [ # The replicas of the instance.
2648 &quot;A String&quot;,
2649 ],
2650 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
2651 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
2652 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
2653 &quot;canDefer&quot;: True or False,
2654 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
2655 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
2656 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
2657 },
2658 &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.
2659 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2660 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
2661 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
2662 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
2663 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
2664 &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**
2665 &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**.
2666 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
2667 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sslCert.
2668 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2669 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
2670 },
2671 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
2672 &quot;settings&quot;: { # Database instance settings. # The user settings.
2673 &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.
2674 &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.
2675 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
2676 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
2677 },
2678 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
2679 &quot;A String&quot;,
2680 ],
2681 &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).
2682 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
2683 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
2684 &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.
2685 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
2686 },
2687 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
2688 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
2689 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupConfiguration**.
2690 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
2691 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
2692 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
2693 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - **HH:MM**.
2694 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
2695 },
2696 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
2697 &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.
2698 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
2699 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: **PD_SSD** (default) or **PD_HDD**.
2700 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
2701 { # Database flags for Cloud SQL instances.
2702 &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.
2703 &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.
2704 },
2705 ],
2706 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
2707 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
2708 { # Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
2709 &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
2710 &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
2711 &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
2712 },
2713 ],
2714 &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.
2715 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
2716 &quot;queryPlansPerMinute&quot;: 42, # Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.
2717 &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.
2718 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
2719 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
2720 },
2721 &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.
2722 &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**).
2723 { # An entry for an Access Control list.
2724 &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**.
2725 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#aclEntry**.
2726 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
2727 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
2728 },
2729 ],
2730 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
2731 &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.
2732 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
2733 },
2734 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#settings**.
2735 &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.
2736 &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.
2737 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#locationPreference**.
2738 &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.
2739 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
2740 },
2741 &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.
2742 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
2743 &quot;hour&quot;: 42, # hour of day - 0 to 23.
2744 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#maintenanceWindow**.
2745 &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).
2746 },
2747 &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.
2748 &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.
2749 &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.
2750 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
2751 &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.
2752 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example **db-custom-1-3840**.
2753 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
2754 &quot;a_key&quot;: &quot;A String&quot;,
2755 },
2756 },
2757 &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.
2758 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
2759 &quot;A String&quot;,
2760 ],
2761}
2762
2763 x__xgafv: string, V1 error format.
2764 Allowed values
2765 1 - v1 error format
2766 2 - v2 error format
2767
2768Returns:
2769 An object of the form:
2770
2771 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2772 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2773 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2774 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2775 },
2776 &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**.
2777 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2778 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2779 { # Database instance operation error.
2780 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2781 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2782 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2783 },
2784 ],
2785 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2786 },
2787 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2788 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
2789 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2790 },
2791 &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**.
2792 &quot;A String&quot;,
2793 ],
2794 &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.
2795 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2796 &quot;offload&quot;: True or False, # Option for export offload.
2797 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2798 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2799 &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.
2800 },
2801 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2802 &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.
2803 &quot;A String&quot;,
2804 ],
2805 },
2806 &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.
2807 },
2808 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2809 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2810 &quot;encryptionOptions&quot;: {
2811 &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.
2812 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2813 &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.
2814 },
2815 },
2816 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2817 &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.
2818 &quot;A String&quot;,
2819 ],
2820 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2821 },
2822 &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.
2823 &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.
2824 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2825 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2826 &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.
2827 },
2828 &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**.
2829 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2830 &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.
2831 &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**
2832 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2833 &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**.
2834 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2835 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2836 &quot;targetLink&quot;: &quot;A String&quot;,
2837 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2838 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2839}</pre>
2840</div>
2841
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07002842</body></html>