blob: fb25de45649de46bf9e61dfdf6833d99fc3ce5ee [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 },
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700452 &quot;skipReplicationSetup&quot;: True or False, # Flag to skip replication setup on the instance.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700453 &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.
454 },
455}
456
457 x__xgafv: string, V1 error format.
458 Allowed values
459 1 - v1 error format
460 2 - v2 error format
461
462Returns:
463 An object of the form:
464
465 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
466 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
467 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
468 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
469 },
470 &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**.
471 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
472 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
473 { # Database instance operation error.
474 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
475 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
476 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
477 },
478 ],
479 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
480 },
481 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
482 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
483 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
484 },
485 &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**.
486 &quot;A String&quot;,
487 ],
488 &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.
489 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
490 &quot;offload&quot;: True or False, # Option for export offload.
491 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
492 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
493 &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.
494 },
495 &quot;schemaOnly&quot;: True or False, # Export only schemas.
496 &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.
497 &quot;A String&quot;,
498 ],
499 },
500 &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.
501 },
502 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
503 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
504 &quot;encryptionOptions&quot;: {
505 &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.
506 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
507 &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.
508 },
509 },
510 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
511 &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.
512 &quot;A String&quot;,
513 ],
514 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
515 },
516 &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.
517 &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.
518 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
519 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
520 &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.
521 },
522 &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**.
523 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
524 &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.
525 &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**
526 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
527 &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**.
528 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
529 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
530 &quot;targetLink&quot;: &quot;A String&quot;,
531 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
532 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
533}</pre>
534</div>
535
536<div class="method">
537 <code class="details" id="export">export(project, instance, body=None, x__xgafv=None)</code>
538 <pre>Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.
539
540Args:
541 project: string, Project ID of the project that contains the instance to be exported. (required)
542 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
543 body: object, The request body.
544 The object takes the form of:
545
546{ # Database instance export request.
547 &quot;exportContext&quot;: { # Database instance export context. # Contains details about the export operation.
548 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
549 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
550 },
551 &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**.
552 &quot;A String&quot;,
553 ],
554 &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.
555 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
556 &quot;offload&quot;: True or False, # Option for export offload.
557 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
558 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
559 &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.
560 },
561 &quot;schemaOnly&quot;: True or False, # Export only schemas.
562 &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.
563 &quot;A String&quot;,
564 ],
565 },
566 &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.
567 },
568}
569
570 x__xgafv: string, V1 error format.
571 Allowed values
572 1 - v1 error format
573 2 - v2 error format
574
575Returns:
576 An object of the form:
577
578 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
579 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
580 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
581 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
582 },
583 &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**.
584 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
585 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
586 { # Database instance operation error.
587 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
588 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
589 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
590 },
591 ],
592 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
593 },
594 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
595 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
596 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
597 },
598 &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**.
599 &quot;A String&quot;,
600 ],
601 &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.
602 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
603 &quot;offload&quot;: True or False, # Option for export offload.
604 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
605 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
606 &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.
607 },
608 &quot;schemaOnly&quot;: True or False, # Export only schemas.
609 &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.
610 &quot;A String&quot;,
611 ],
612 },
613 &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.
614 },
615 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
616 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
617 &quot;encryptionOptions&quot;: {
618 &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.
619 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
620 &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.
621 },
622 },
623 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
624 &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.
625 &quot;A String&quot;,
626 ],
627 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
628 },
629 &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.
630 &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.
631 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
632 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
633 &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.
634 },
635 &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**.
636 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
637 &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.
638 &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**
639 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
640 &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**.
641 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
642 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
643 &quot;targetLink&quot;: &quot;A String&quot;,
644 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
645 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
646}</pre>
647</div>
648
649<div class="method">
650 <code class="details" id="failover">failover(project, instance, body=None, x__xgafv=None)</code>
651 <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.
652
653Args:
654 project: string, ID of the project that contains the read replica. (required)
655 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
656 body: object, The request body.
657 The object takes the form of:
658
659{ # Instance failover request.
660 &quot;failoverContext&quot;: { # Database instance failover context. # Failover Context.
661 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#failoverContext*.
662 &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.
663 },
664}
665
666 x__xgafv: string, V1 error format.
667 Allowed values
668 1 - v1 error format
669 2 - v2 error format
670
671Returns:
672 An object of the form:
673
674 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
675 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
676 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
677 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
678 },
679 &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**.
680 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
681 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
682 { # Database instance operation error.
683 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
684 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
685 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
686 },
687 ],
688 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
689 },
690 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
691 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
692 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
693 },
694 &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**.
695 &quot;A String&quot;,
696 ],
697 &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.
698 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
699 &quot;offload&quot;: True or False, # Option for export offload.
700 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
701 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
702 &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.
703 },
704 &quot;schemaOnly&quot;: True or False, # Export only schemas.
705 &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.
706 &quot;A String&quot;,
707 ],
708 },
709 &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.
710 },
711 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
712 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
713 &quot;encryptionOptions&quot;: {
714 &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.
715 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
716 &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.
717 },
718 },
719 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
720 &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.
721 &quot;A String&quot;,
722 ],
723 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
724 },
725 &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.
726 &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.
727 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
728 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
729 &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.
730 },
731 &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**.
732 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
733 &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.
734 &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**
735 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
736 &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**.
737 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
738 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
739 &quot;targetLink&quot;: &quot;A String&quot;,
740 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
741 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
742}</pre>
743</div>
744
745<div class="method">
746 <code class="details" id="get">get(project, instance, x__xgafv=None)</code>
747 <pre>Retrieves a resource containing information about a Cloud SQL instance.
748
749Args:
750 project: string, Project ID of the project that contains the instance. (required)
751 instance: string, Database instance ID. This does not include the project ID. (required)
752 x__xgafv: string, V1 error format.
753 Allowed values
754 1 - v1 error format
755 2 - v2 error format
756
757Returns:
758 An object of the form:
759
760 { # A Cloud SQL instance resource.
761 &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.
762 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700763 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the instance was created in RFC 3339 format (https://tools.ietf.org/html/rfc3339), for example 2012-11-15T16:19:00.094Z
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700764 &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.
765 &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*.
766 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
767 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionConfiguration**.
768 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
769 },
770 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
771 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionStatus**.
772 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
773 },
774 &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.
775 &quot;failoverReplica&quot;: { # The name and status of the failover replica.
776 &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.
777 &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.
778 },
779 &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.
780 &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.
781 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
782 { # Database instance IP Mapping.
783 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
784 &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.
785 &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.
786 },
787 ],
788 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
789 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
790 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
791 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
792 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
793 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
794 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
795 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
796 &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.
797 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
798 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
799 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
800 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700801 &quot;sourceInstance&quot;: { # Reference to another Cloud SQL instance. # The reference to Cloud SQL instance if the source is Cloud SQL.
802 &quot;name&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance being referenced. This does not include the project ID.
803 &quot;project&quot;: &quot;A String&quot;, # The project ID of the Cloud SQL instance being referenced. The default is the same project ID as the instance references it.
804 &quot;region&quot;: &quot;A String&quot;, # The region of the Cloud SQL instance being referenced.
805 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700806 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
807 },
808 &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
809 &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
810 &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
811 },
812 &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.
813 &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.
814 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
815 &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.
816 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
817 &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.
818 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
819 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
820 &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.
821 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
822 &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.
823 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#mysqlReplicaConfiguration**.
824 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
825 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
826 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
827 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
828 &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.
829 },
830 },
831 &quot;replicaNames&quot;: [ # The replicas of the instance.
832 &quot;A String&quot;,
833 ],
834 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
835 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
836 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
837 &quot;canDefer&quot;: True or False,
838 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
839 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
840 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
841 },
842 &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.
843 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
844 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
845 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
846 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
847 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
848 &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**
849 &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**.
850 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
851 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sslCert.
852 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
853 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
854 },
855 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
856 &quot;settings&quot;: { # Database instance settings. # The user settings.
857 &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.
858 &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.
859 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
860 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
861 },
862 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
863 &quot;A String&quot;,
864 ],
865 &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).
866 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
867 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
868 &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.
869 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
870 },
871 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
872 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
873 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupConfiguration**.
874 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
875 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
876 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
877 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - **HH:MM**.
878 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
879 },
880 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
881 &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.
882 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
883 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: **PD_SSD** (default) or **PD_HDD**.
884 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
885 { # Database flags for Cloud SQL instances.
886 &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.
887 &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.
888 },
889 ],
890 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
891 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
892 { # Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
893 &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
894 &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
895 &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
896 },
897 ],
898 &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.
899 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
900 &quot;queryPlansPerMinute&quot;: 42, # Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.
901 &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.
902 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
903 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
904 },
905 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700906 &quot;allocatedIpRange&quot;: &quot;A String&quot;, # The name of the allocated ip range for the private ip CloudSQL instance. For example: &quot;google-managed-services-default&quot;. If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.` Reserved for future use.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700907 &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**).
908 { # An entry for an Access Control list.
909 &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**.
910 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#aclEntry**.
911 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
912 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
913 },
914 ],
915 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
916 &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.
917 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
918 },
919 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#settings**.
920 &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.
921 &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.
922 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#locationPreference**.
923 &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.
924 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
925 },
926 &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.
927 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
928 &quot;hour&quot;: 42, # hour of day - 0 to 23.
929 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#maintenanceWindow**.
930 &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).
931 },
932 &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.
933 &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.
934 &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.
935 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
936 &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.
937 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example **db-custom-1-3840**.
938 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
939 &quot;a_key&quot;: &quot;A String&quot;,
940 },
941 },
942 &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.
943 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
944 &quot;A String&quot;,
945 ],
946}</pre>
947</div>
948
949<div class="method">
950 <code class="details" id="import_">import_(project, instance, body=None, x__xgafv=None)</code>
951 <pre>Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.
952
953Args:
954 project: string, Project ID of the project that contains the instance. (required)
955 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
956 body: object, The request body.
957 The object takes the form of:
958
959{ # Database instance import request.
960 &quot;importContext&quot;: { # Database instance import context. # Contains details about the import operation.
961 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
962 &quot;encryptionOptions&quot;: {
963 &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.
964 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
965 &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.
966 },
967 },
968 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
969 &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.
970 &quot;A String&quot;,
971 ],
972 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
973 },
974 &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.
975 &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.
976 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
977 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
978 &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.
979 },
980}
981
982 x__xgafv: string, V1 error format.
983 Allowed values
984 1 - v1 error format
985 2 - v2 error format
986
987Returns:
988 An object of the form:
989
990 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
991 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
992 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
993 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
994 },
995 &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**.
996 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
997 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
998 { # Database instance operation error.
999 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1000 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
1001 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1002 },
1003 ],
1004 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
1005 },
1006 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1007 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
1008 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1009 },
1010 &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**.
1011 &quot;A String&quot;,
1012 ],
1013 &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.
1014 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
1015 &quot;offload&quot;: True or False, # Option for export offload.
1016 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1017 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1018 &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.
1019 },
1020 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1021 &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.
1022 &quot;A String&quot;,
1023 ],
1024 },
1025 &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.
1026 },
1027 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1028 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1029 &quot;encryptionOptions&quot;: {
1030 &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.
1031 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1032 &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.
1033 },
1034 },
1035 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1036 &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.
1037 &quot;A String&quot;,
1038 ],
1039 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1040 },
1041 &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.
1042 &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.
1043 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1044 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
1045 &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.
1046 },
1047 &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**.
1048 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
1049 &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.
1050 &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**
1051 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1052 &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**.
1053 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
1054 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1055 &quot;targetLink&quot;: &quot;A String&quot;,
1056 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1057 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1058}</pre>
1059</div>
1060
1061<div class="method">
1062 <code class="details" id="insert">insert(project, body=None, x__xgafv=None)</code>
1063 <pre>Creates a new Cloud SQL instance.
1064
1065Args:
1066 project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required)
1067 body: object, The request body.
1068 The object takes the form of:
1069
1070{ # A Cloud SQL instance resource.
1071 &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.
1072 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001073 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the instance was created in RFC 3339 format (https://tools.ietf.org/html/rfc3339), for example 2012-11-15T16:19:00.094Z
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001074 &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.
1075 &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*.
1076 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
1077 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionConfiguration**.
1078 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1079 },
1080 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
1081 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionStatus**.
1082 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1083 },
1084 &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.
1085 &quot;failoverReplica&quot;: { # The name and status of the failover replica.
1086 &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.
1087 &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.
1088 },
1089 &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.
1090 &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.
1091 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1092 { # Database instance IP Mapping.
1093 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1094 &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.
1095 &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.
1096 },
1097 ],
1098 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1099 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1100 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1101 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1102 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1103 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1104 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1105 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1106 &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.
1107 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1108 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1109 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1110 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001111 &quot;sourceInstance&quot;: { # Reference to another Cloud SQL instance. # The reference to Cloud SQL instance if the source is Cloud SQL.
1112 &quot;name&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance being referenced. This does not include the project ID.
1113 &quot;project&quot;: &quot;A String&quot;, # The project ID of the Cloud SQL instance being referenced. The default is the same project ID as the instance references it.
1114 &quot;region&quot;: &quot;A String&quot;, # The region of the Cloud SQL instance being referenced.
1115 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001116 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1117 },
1118 &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
1119 &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
1120 &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
1121 },
1122 &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.
1123 &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.
1124 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1125 &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.
1126 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1127 &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.
1128 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1129 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1130 &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.
1131 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1132 &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.
1133 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#mysqlReplicaConfiguration**.
1134 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1135 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1136 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1137 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1138 &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.
1139 },
1140 },
1141 &quot;replicaNames&quot;: [ # The replicas of the instance.
1142 &quot;A String&quot;,
1143 ],
1144 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
1145 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
1146 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1147 &quot;canDefer&quot;: True or False,
1148 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1149 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
1150 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1151 },
1152 &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.
1153 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1154 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1155 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1156 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1157 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1158 &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**
1159 &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**.
1160 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1161 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sslCert.
1162 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1163 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1164 },
1165 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
1166 &quot;settings&quot;: { # Database instance settings. # The user settings.
1167 &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.
1168 &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.
1169 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
1170 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
1171 },
1172 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
1173 &quot;A String&quot;,
1174 ],
1175 &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).
1176 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1177 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1178 &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.
1179 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1180 },
1181 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1182 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1183 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupConfiguration**.
1184 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1185 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
1186 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1187 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - **HH:MM**.
1188 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1189 },
1190 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1191 &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.
1192 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1193 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: **PD_SSD** (default) or **PD_HDD**.
1194 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1195 { # Database flags for Cloud SQL instances.
1196 &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.
1197 &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.
1198 },
1199 ],
1200 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1201 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1202 { # Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1203 &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
1204 &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
1205 &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
1206 },
1207 ],
1208 &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.
1209 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
1210 &quot;queryPlansPerMinute&quot;: 42, # Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.
1211 &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.
1212 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1213 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1214 },
1215 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001216 &quot;allocatedIpRange&quot;: &quot;A String&quot;, # The name of the allocated ip range for the private ip CloudSQL instance. For example: &quot;google-managed-services-default&quot;. If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.` Reserved for future use.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001217 &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**).
1218 { # An entry for an Access Control list.
1219 &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**.
1220 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#aclEntry**.
1221 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1222 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1223 },
1224 ],
1225 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1226 &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.
1227 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1228 },
1229 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#settings**.
1230 &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.
1231 &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.
1232 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#locationPreference**.
1233 &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.
1234 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1235 },
1236 &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.
1237 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1238 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1239 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#maintenanceWindow**.
1240 &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).
1241 },
1242 &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.
1243 &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.
1244 &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.
1245 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1246 &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.
1247 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example **db-custom-1-3840**.
1248 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1249 &quot;a_key&quot;: &quot;A String&quot;,
1250 },
1251 },
1252 &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.
1253 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1254 &quot;A String&quot;,
1255 ],
1256}
1257
1258 x__xgafv: string, V1 error format.
1259 Allowed values
1260 1 - v1 error format
1261 2 - v2 error format
1262
1263Returns:
1264 An object of the form:
1265
1266 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
1267 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1268 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1269 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
1270 },
1271 &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**.
1272 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1273 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1274 { # Database instance operation error.
1275 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1276 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
1277 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1278 },
1279 ],
1280 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
1281 },
1282 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1283 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
1284 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1285 },
1286 &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**.
1287 &quot;A String&quot;,
1288 ],
1289 &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.
1290 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
1291 &quot;offload&quot;: True or False, # Option for export offload.
1292 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1293 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1294 &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.
1295 },
1296 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1297 &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.
1298 &quot;A String&quot;,
1299 ],
1300 },
1301 &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.
1302 },
1303 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1304 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1305 &quot;encryptionOptions&quot;: {
1306 &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.
1307 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1308 &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.
1309 },
1310 },
1311 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1312 &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.
1313 &quot;A String&quot;,
1314 ],
1315 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1316 },
1317 &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.
1318 &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.
1319 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1320 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
1321 &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.
1322 },
1323 &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**.
1324 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
1325 &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.
1326 &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**
1327 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1328 &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**.
1329 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
1330 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1331 &quot;targetLink&quot;: &quot;A String&quot;,
1332 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1333 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1334}</pre>
1335</div>
1336
1337<div class="method">
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001338 <code class="details" id="list">list(project, filter=None, maxResults=None, pageToken=None, x__xgafv=None)</code>
1339 <pre>Lists instances under a given project.
1340
1341Args:
1342 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
1343 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.
1344 maxResults: integer, The maximum number of results to return per response.
1345 pageToken: string, A previously-returned page token representing part of the larger set of results to view.
1346 x__xgafv: string, V1 error format.
1347 Allowed values
1348 1 - v1 error format
1349 2 - v2 error format
1350
1351Returns:
1352 An object of the form:
1353
1354 { # Database instances list response.
1355 &quot;items&quot;: [ # List of database instance resources.
1356 { # A Cloud SQL instance resource.
1357 &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.
1358 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001359 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the instance was created in RFC 3339 format (https://tools.ietf.org/html/rfc3339), for example 2012-11-15T16:19:00.094Z
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001360 &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 -07001361 &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*.
1362 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001363 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionConfiguration**.
1364 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1365 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001366 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001367 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionStatus**.
1368 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1369 },
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001370 &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 -07001371 &quot;failoverReplica&quot;: { # The name and status of the failover replica.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001372 &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 -07001373 &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 -07001374 },
1375 &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 -07001376 &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 -07001377 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1378 { # Database instance IP Mapping.
1379 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1380 &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.
1381 &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.
1382 },
1383 ],
1384 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1385 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001386 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1387 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1388 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1389 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1390 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1391 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1392 &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.
1393 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1394 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1395 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1396 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001397 &quot;sourceInstance&quot;: { # Reference to another Cloud SQL instance. # The reference to Cloud SQL instance if the source is Cloud SQL.
1398 &quot;name&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance being referenced. This does not include the project ID.
1399 &quot;project&quot;: &quot;A String&quot;, # The project ID of the Cloud SQL instance being referenced. The default is the same project ID as the instance references it.
1400 &quot;region&quot;: &quot;A String&quot;, # The region of the Cloud SQL instance being referenced.
1401 },
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001402 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1403 },
1404 &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
1405 &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
1406 &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
1407 },
1408 &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.
1409 &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.
1410 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1411 &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.
1412 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1413 &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.
1414 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1415 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1416 &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.
1417 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1418 &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.
1419 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#mysqlReplicaConfiguration**.
1420 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1421 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1422 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1423 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1424 &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.
1425 },
1426 },
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001427 &quot;replicaNames&quot;: [ # The replicas of the instance.
1428 &quot;A String&quot;,
1429 ],
1430 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
1431 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
1432 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1433 &quot;canDefer&quot;: True or False,
1434 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1435 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
1436 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1437 },
1438 &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.
1439 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1440 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1441 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1442 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1443 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1444 &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**
1445 &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**.
1446 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1447 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sslCert.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001448 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001449 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1450 },
1451 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
1452 &quot;settings&quot;: { # Database instance settings. # The user settings.
1453 &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.
1454 &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.
1455 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
1456 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
1457 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001458 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
1459 &quot;A String&quot;,
1460 ],
1461 &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 -07001462 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1463 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1464 &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.
1465 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1466 },
1467 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1468 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1469 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupConfiguration**.
1470 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1471 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
1472 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1473 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - **HH:MM**.
1474 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1475 },
1476 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1477 &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.
1478 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1479 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: **PD_SSD** (default) or **PD_HDD**.
1480 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1481 { # Database flags for Cloud SQL instances.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001482 &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 -07001483 &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.
1484 },
1485 ],
1486 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1487 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1488 { # Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1489 &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
1490 &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
1491 &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
1492 },
1493 ],
1494 &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.
1495 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001496 &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 -07001497 &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.
1498 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1499 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1500 },
1501 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001502 &quot;allocatedIpRange&quot;: &quot;A String&quot;, # The name of the allocated ip range for the private ip CloudSQL instance. For example: &quot;google-managed-services-default&quot;. If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.` Reserved for future use.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001503 &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**).
1504 { # An entry for an Access Control list.
1505 &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**.
1506 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#aclEntry**.
1507 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1508 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1509 },
1510 ],
1511 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1512 &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.
1513 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1514 },
1515 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#settings**.
1516 &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 -07001517 &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 -07001518 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#locationPreference**.
1519 &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.
1520 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1521 },
1522 &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.
1523 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1524 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1525 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#maintenanceWindow**.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001526 &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 -07001527 },
1528 &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.
1529 &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.
1530 &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.
1531 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1532 &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.
1533 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example **db-custom-1-3840**.
1534 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1535 &quot;a_key&quot;: &quot;A String&quot;,
1536 },
1537 },
1538 &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.
1539 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1540 &quot;A String&quot;,
1541 ],
1542 },
1543 ],
1544 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instancesList*.
1545 &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.
1546 &quot;warnings&quot;: [ # List of warnings that occurred while handling the request.
1547 { # An Admin API warning message.
1548 &quot;code&quot;: &quot;A String&quot;, # Code to uniquely identify the warning type.
1549 &quot;message&quot;: &quot;A String&quot;, # The warning message.
1550 &quot;region&quot;: &quot;A String&quot;, # The region name for REGION_UNREACHABLE warning.
1551 },
1552 ],
1553}</pre>
1554</div>
1555
1556<div class="method">
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001557 <code class="details" id="listServerCas">listServerCas(project, instance, x__xgafv=None)</code>
1558 <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.
1559
1560Args:
1561 project: string, Project ID of the project that contains the instance. (required)
1562 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1563 x__xgafv: string, V1 error format.
1564 Allowed values
1565 1 - v1 error format
1566 2 - v2 error format
1567
1568Returns:
1569 An object of the form:
1570
1571 { # Instances ListServerCas response.
1572 &quot;activeVersion&quot;: &quot;A String&quot;,
1573 &quot;certs&quot;: [ # List of server CA certificates for the instance.
1574 { # SslCerts Resource
1575 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1576 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1577 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1578 &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**
1579 &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**.
1580 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1581 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sslCert.
1582 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1583 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1584 },
1585 ],
1586 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instancesListServerCas*.
1587}</pre>
1588</div>
1589
1590<div class="method">
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001591 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1592 <pre>Retrieves the next page of results.
1593
1594Args:
1595 previous_request: The request for the previous page. (required)
1596 previous_response: The response from the request for the previous page. (required)
1597
1598Returns:
1599 A request object that you can call &#x27;execute()&#x27; on to request the next
1600 page. Returns None if there are no more items in the collection.
1601 </pre>
1602</div>
1603
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001604<div class="method">
1605 <code class="details" id="patch">patch(project, instance, body=None, x__xgafv=None)</code>
1606 <pre>Updates settings of a Cloud SQL instance. This method supports patch semantics.
1607
1608Args:
1609 project: string, Project ID of the project that contains the instance. (required)
1610 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1611 body: object, The request body.
1612 The object takes the form of:
1613
1614{ # A Cloud SQL instance resource.
1615 &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.
1616 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001617 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the instance was created in RFC 3339 format (https://tools.ietf.org/html/rfc3339), for example 2012-11-15T16:19:00.094Z
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001618 &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.
1619 &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*.
1620 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
1621 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionConfiguration**.
1622 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1623 },
1624 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
1625 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionStatus**.
1626 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1627 },
1628 &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.
1629 &quot;failoverReplica&quot;: { # The name and status of the failover replica.
1630 &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.
1631 &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.
1632 },
1633 &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.
1634 &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.
1635 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1636 { # Database instance IP Mapping.
1637 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1638 &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.
1639 &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.
1640 },
1641 ],
1642 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1643 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1644 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1645 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1646 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1647 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1648 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1649 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1650 &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.
1651 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1652 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1653 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1654 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001655 &quot;sourceInstance&quot;: { # Reference to another Cloud SQL instance. # The reference to Cloud SQL instance if the source is Cloud SQL.
1656 &quot;name&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance being referenced. This does not include the project ID.
1657 &quot;project&quot;: &quot;A String&quot;, # The project ID of the Cloud SQL instance being referenced. The default is the same project ID as the instance references it.
1658 &quot;region&quot;: &quot;A String&quot;, # The region of the Cloud SQL instance being referenced.
1659 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001660 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1661 },
1662 &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
1663 &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
1664 &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
1665 },
1666 &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.
1667 &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.
1668 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1669 &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.
1670 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1671 &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.
1672 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1673 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1674 &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.
1675 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1676 &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.
1677 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#mysqlReplicaConfiguration**.
1678 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1679 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1680 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1681 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1682 &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.
1683 },
1684 },
1685 &quot;replicaNames&quot;: [ # The replicas of the instance.
1686 &quot;A String&quot;,
1687 ],
1688 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
1689 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
1690 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1691 &quot;canDefer&quot;: True or False,
1692 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1693 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
1694 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1695 },
1696 &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.
1697 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1698 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1699 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1700 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1701 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1702 &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**
1703 &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**.
1704 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1705 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sslCert.
1706 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1707 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1708 },
1709 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
1710 &quot;settings&quot;: { # Database instance settings. # The user settings.
1711 &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.
1712 &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.
1713 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
1714 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
1715 },
1716 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
1717 &quot;A String&quot;,
1718 ],
1719 &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).
1720 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1721 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1722 &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.
1723 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1724 },
1725 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1726 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1727 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupConfiguration**.
1728 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1729 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
1730 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1731 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - **HH:MM**.
1732 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1733 },
1734 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1735 &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.
1736 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1737 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: **PD_SSD** (default) or **PD_HDD**.
1738 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1739 { # Database flags for Cloud SQL instances.
1740 &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.
1741 &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.
1742 },
1743 ],
1744 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1745 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1746 { # Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1747 &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
1748 &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
1749 &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
1750 },
1751 ],
1752 &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.
1753 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
1754 &quot;queryPlansPerMinute&quot;: 42, # Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.
1755 &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.
1756 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1757 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1758 },
1759 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001760 &quot;allocatedIpRange&quot;: &quot;A String&quot;, # The name of the allocated ip range for the private ip CloudSQL instance. For example: &quot;google-managed-services-default&quot;. If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.` Reserved for future use.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001761 &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**).
1762 { # An entry for an Access Control list.
1763 &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**.
1764 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#aclEntry**.
1765 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1766 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1767 },
1768 ],
1769 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1770 &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.
1771 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1772 },
1773 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#settings**.
1774 &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.
1775 &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.
1776 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#locationPreference**.
1777 &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.
1778 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1779 },
1780 &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.
1781 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1782 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1783 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#maintenanceWindow**.
1784 &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).
1785 },
1786 &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.
1787 &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.
1788 &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.
1789 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1790 &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.
1791 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example **db-custom-1-3840**.
1792 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1793 &quot;a_key&quot;: &quot;A String&quot;,
1794 },
1795 },
1796 &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.
1797 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1798 &quot;A String&quot;,
1799 ],
1800}
1801
1802 x__xgafv: string, V1 error format.
1803 Allowed values
1804 1 - v1 error format
1805 2 - v2 error format
1806
1807Returns:
1808 An object of the form:
1809
1810 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
1811 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1812 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1813 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
1814 },
1815 &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**.
1816 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1817 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1818 { # Database instance operation error.
1819 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1820 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
1821 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1822 },
1823 ],
1824 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
1825 },
1826 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1827 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
1828 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1829 },
1830 &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**.
1831 &quot;A String&quot;,
1832 ],
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. **BAK**: The file contains backup data for a SQL Server instance.
1834 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
1835 &quot;offload&quot;: True or False, # Option for export offload.
1836 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1837 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1838 &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.
1839 },
1840 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1841 &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.
1842 &quot;A String&quot;,
1843 ],
1844 },
1845 &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.
1846 },
1847 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1848 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1849 &quot;encryptionOptions&quot;: {
1850 &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.
1851 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1852 &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.
1853 },
1854 },
1855 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1856 &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.
1857 &quot;A String&quot;,
1858 ],
1859 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1860 },
1861 &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.
1862 &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.
1863 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1864 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
1865 &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.
1866 },
1867 &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**.
1868 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
1869 &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.
1870 &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**
1871 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1872 &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**.
1873 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
1874 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1875 &quot;targetLink&quot;: &quot;A String&quot;,
1876 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1877 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1878}</pre>
1879</div>
1880
1881<div class="method">
1882 <code class="details" id="promoteReplica">promoteReplica(project, instance, x__xgafv=None)</code>
1883 <pre>Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.
1884
1885Args:
1886 project: string, ID of the project that contains the read replica. (required)
1887 instance: string, Cloud SQL read replica instance name. (required)
1888 x__xgafv: string, V1 error format.
1889 Allowed values
1890 1 - v1 error format
1891 2 - v2 error format
1892
1893Returns:
1894 An object of the form:
1895
1896 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
1897 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1898 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1899 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
1900 },
1901 &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**.
1902 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1903 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1904 { # Database instance operation error.
1905 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1906 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
1907 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1908 },
1909 ],
1910 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
1911 },
1912 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1913 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
1914 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1915 },
1916 &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**.
1917 &quot;A String&quot;,
1918 ],
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. **BAK**: The file contains backup data for a SQL Server instance.
1920 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
1921 &quot;offload&quot;: True or False, # Option for export offload.
1922 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1923 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1924 &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.
1925 },
1926 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1927 &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.
1928 &quot;A String&quot;,
1929 ],
1930 },
1931 &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.
1932 },
1933 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1934 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1935 &quot;encryptionOptions&quot;: {
1936 &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.
1937 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1938 &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.
1939 },
1940 },
1941 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1942 &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.
1943 &quot;A String&quot;,
1944 ],
1945 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1946 },
1947 &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.
1948 &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.
1949 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1950 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
1951 &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.
1952 },
1953 &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**.
1954 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
1955 &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.
1956 &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**
1957 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1958 &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**.
1959 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
1960 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1961 &quot;targetLink&quot;: &quot;A String&quot;,
1962 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1963 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1964}</pre>
1965</div>
1966
1967<div class="method">
1968 <code class="details" id="resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</code>
1969 <pre>Deletes all client certificates and generates a new server SSL certificate for the instance.
1970
1971Args:
1972 project: string, Project ID of the project that contains the instance. (required)
1973 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1974 x__xgafv: string, V1 error format.
1975 Allowed values
1976 1 - v1 error format
1977 2 - v2 error format
1978
1979Returns:
1980 An object of the form:
1981
1982 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
1983 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1984 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1985 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
1986 },
1987 &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**.
1988 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1989 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1990 { # Database instance operation error.
1991 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1992 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
1993 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1994 },
1995 ],
1996 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
1997 },
1998 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1999 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
2000 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2001 },
2002 &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**.
2003 &quot;A String&quot;,
2004 ],
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. **BAK**: The file contains backup data for a SQL Server instance.
2006 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2007 &quot;offload&quot;: True or False, # Option for export offload.
2008 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2009 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2010 &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.
2011 },
2012 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2013 &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.
2014 &quot;A String&quot;,
2015 ],
2016 },
2017 &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.
2018 },
2019 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2020 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2021 &quot;encryptionOptions&quot;: {
2022 &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.
2023 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2024 &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.
2025 },
2026 },
2027 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2028 &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.
2029 &quot;A String&quot;,
2030 ],
2031 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2032 },
2033 &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.
2034 &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.
2035 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2036 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2037 &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.
2038 },
2039 &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**.
2040 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2041 &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.
2042 &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**
2043 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2044 &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**.
2045 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2046 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2047 &quot;targetLink&quot;: &quot;A String&quot;,
2048 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2049 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2050}</pre>
2051</div>
2052
2053<div class="method">
2054 <code class="details" id="restart">restart(project, instance, x__xgafv=None)</code>
2055 <pre>Restarts a Cloud SQL instance.
2056
2057Args:
2058 project: string, Project ID of the project that contains the instance to be restarted. (required)
2059 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
2060 x__xgafv: string, V1 error format.
2061 Allowed values
2062 1 - v1 error format
2063 2 - v2 error format
2064
2065Returns:
2066 An object of the form:
2067
2068 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2069 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2070 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2071 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2072 },
2073 &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**.
2074 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2075 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2076 { # Database instance operation error.
2077 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2078 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2079 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2080 },
2081 ],
2082 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2083 },
2084 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2085 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
2086 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2087 },
2088 &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**.
2089 &quot;A String&quot;,
2090 ],
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. **BAK**: The file contains backup data for a SQL Server instance.
2092 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2093 &quot;offload&quot;: True or False, # Option for export offload.
2094 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2095 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2096 &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.
2097 },
2098 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2099 &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.
2100 &quot;A String&quot;,
2101 ],
2102 },
2103 &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.
2104 },
2105 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2106 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2107 &quot;encryptionOptions&quot;: {
2108 &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.
2109 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2110 &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.
2111 },
2112 },
2113 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2114 &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.
2115 &quot;A String&quot;,
2116 ],
2117 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2118 },
2119 &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.
2120 &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.
2121 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2122 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2123 &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.
2124 },
2125 &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**.
2126 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2127 &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.
2128 &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**
2129 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2130 &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**.
2131 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2132 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2133 &quot;targetLink&quot;: &quot;A String&quot;,
2134 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2135 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2136}</pre>
2137</div>
2138
2139<div class="method">
2140 <code class="details" id="restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</code>
2141 <pre>Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.
2142
2143Args:
2144 project: string, Project ID of the project that contains the instance. (required)
2145 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
2146 body: object, The request body.
2147 The object takes the form of:
2148
2149{ # Database instance restore backup request.
2150 &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.
2151 &quot;backupRunId&quot;: &quot;A String&quot;, # The ID of the backup run to restore from.
2152 &quot;instanceId&quot;: &quot;A String&quot;, # The ID of the instance that the backup was taken from.
2153 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#restoreBackupContext*.
2154 &quot;project&quot;: &quot;A String&quot;, # The full project ID of the source instance.
2155 },
2156}
2157
2158 x__xgafv: string, V1 error format.
2159 Allowed values
2160 1 - v1 error format
2161 2 - v2 error format
2162
2163Returns:
2164 An object of the form:
2165
2166 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2167 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2168 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2169 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2170 },
2171 &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**.
2172 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2173 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2174 { # Database instance operation error.
2175 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2176 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2177 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2178 },
2179 ],
2180 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2181 },
2182 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2183 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
2184 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2185 },
2186 &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**.
2187 &quot;A String&quot;,
2188 ],
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. **BAK**: The file contains backup data for a SQL Server instance.
2190 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2191 &quot;offload&quot;: True or False, # Option for export offload.
2192 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2193 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2194 &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.
2195 },
2196 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2197 &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.
2198 &quot;A String&quot;,
2199 ],
2200 },
2201 &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.
2202 },
2203 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2204 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2205 &quot;encryptionOptions&quot;: {
2206 &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.
2207 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2208 &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.
2209 },
2210 },
2211 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2212 &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.
2213 &quot;A String&quot;,
2214 ],
2215 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2216 },
2217 &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.
2218 &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.
2219 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2220 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2221 &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.
2222 },
2223 &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**.
2224 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2225 &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.
2226 &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**
2227 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2228 &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**.
2229 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2230 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2231 &quot;targetLink&quot;: &quot;A String&quot;,
2232 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2233 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2234}</pre>
2235</div>
2236
2237<div class="method">
2238 <code class="details" id="rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</code>
2239 <pre>Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.
2240
2241Args:
2242 project: string, Project ID of the project that contains the instance. (required)
2243 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
2244 body: object, The request body.
2245 The object takes the form of:
2246
2247{ # Rotate server CA request.
2248 &quot;rotateServerCaContext&quot;: { # Instance rotate server CA context. # Contains details about the rotate server CA operation.
2249 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#rotateServerCaContext*.
2250 &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.
2251 },
2252}
2253
2254 x__xgafv: string, V1 error format.
2255 Allowed values
2256 1 - v1 error format
2257 2 - v2 error format
2258
2259Returns:
2260 An object of the form:
2261
2262 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2263 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2264 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2265 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2266 },
2267 &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**.
2268 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2269 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2270 { # Database instance operation error.
2271 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2272 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2273 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2274 },
2275 ],
2276 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2277 },
2278 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2279 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
2280 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2281 },
2282 &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**.
2283 &quot;A String&quot;,
2284 ],
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. **BAK**: The file contains backup data for a SQL Server instance.
2286 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2287 &quot;offload&quot;: True or False, # Option for export offload.
2288 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2289 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2290 &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.
2291 },
2292 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2293 &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.
2294 &quot;A String&quot;,
2295 ],
2296 },
2297 &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.
2298 },
2299 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2300 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2301 &quot;encryptionOptions&quot;: {
2302 &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.
2303 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2304 &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.
2305 },
2306 },
2307 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2308 &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.
2309 &quot;A String&quot;,
2310 ],
2311 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2312 },
2313 &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.
2314 &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.
2315 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2316 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2317 &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.
2318 },
2319 &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**.
2320 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2321 &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.
2322 &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**
2323 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2324 &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**.
2325 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2326 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2327 &quot;targetLink&quot;: &quot;A String&quot;,
2328 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2329 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2330}</pre>
2331</div>
2332
2333<div class="method">
2334 <code class="details" id="startReplica">startReplica(project, instance, x__xgafv=None)</code>
2335 <pre>Starts the replication in the read replica instance.
2336
2337Args:
2338 project: string, ID of the project that contains the read replica. (required)
2339 instance: string, Cloud SQL read replica instance name. (required)
2340 x__xgafv: string, V1 error format.
2341 Allowed values
2342 1 - v1 error format
2343 2 - v2 error format
2344
2345Returns:
2346 An object of the form:
2347
2348 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2349 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2350 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2351 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2352 },
2353 &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**.
2354 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2355 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2356 { # Database instance operation error.
2357 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2358 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2359 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2360 },
2361 ],
2362 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2363 },
2364 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2365 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
2366 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2367 },
2368 &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**.
2369 &quot;A String&quot;,
2370 ],
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. **BAK**: The file contains backup data for a SQL Server instance.
2372 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2373 &quot;offload&quot;: True or False, # Option for export offload.
2374 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2375 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2376 &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.
2377 },
2378 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2379 &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.
2380 &quot;A String&quot;,
2381 ],
2382 },
2383 &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.
2384 },
2385 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2386 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2387 &quot;encryptionOptions&quot;: {
2388 &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.
2389 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2390 &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.
2391 },
2392 },
2393 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2394 &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.
2395 &quot;A String&quot;,
2396 ],
2397 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2398 },
2399 &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.
2400 &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.
2401 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2402 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2403 &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.
2404 },
2405 &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**.
2406 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2407 &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.
2408 &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**
2409 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2410 &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**.
2411 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2412 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2413 &quot;targetLink&quot;: &quot;A String&quot;,
2414 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2415 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2416}</pre>
2417</div>
2418
2419<div class="method">
2420 <code class="details" id="stopReplica">stopReplica(project, instance, x__xgafv=None)</code>
2421 <pre>Stops the replication in the read replica instance.
2422
2423Args:
2424 project: string, ID of the project that contains the read replica. (required)
2425 instance: string, Cloud SQL read replica instance name. (required)
2426 x__xgafv: string, V1 error format.
2427 Allowed values
2428 1 - v1 error format
2429 2 - v2 error format
2430
2431Returns:
2432 An object of the form:
2433
2434 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2435 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2436 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2437 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2438 },
2439 &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**.
2440 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2441 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2442 { # Database instance operation error.
2443 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2444 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2445 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2446 },
2447 ],
2448 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2449 },
2450 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2451 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
2452 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2453 },
2454 &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**.
2455 &quot;A String&quot;,
2456 ],
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. **BAK**: The file contains backup data for a SQL Server instance.
2458 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2459 &quot;offload&quot;: True or False, # Option for export offload.
2460 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2461 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2462 &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.
2463 },
2464 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2465 &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.
2466 &quot;A String&quot;,
2467 ],
2468 },
2469 &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.
2470 },
2471 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2472 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2473 &quot;encryptionOptions&quot;: {
2474 &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.
2475 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2476 &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.
2477 },
2478 },
2479 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2480 &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.
2481 &quot;A String&quot;,
2482 ],
2483 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2484 },
2485 &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.
2486 &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.
2487 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2488 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2489 &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.
2490 },
2491 &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**.
2492 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2493 &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.
2494 &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**
2495 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2496 &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**.
2497 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2498 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2499 &quot;targetLink&quot;: &quot;A String&quot;,
2500 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2501 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2502}</pre>
2503</div>
2504
2505<div class="method">
2506 <code class="details" id="truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</code>
2507 <pre>Truncate MySQL general and slow query log tables MySQL only.
2508
2509Args:
2510 project: string, Project ID of the Cloud SQL project. (required)
2511 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
2512 body: object, The request body.
2513 The object takes the form of:
2514
2515{ # Instance truncate log request.
2516 &quot;truncateLogContext&quot;: { # Database Instance truncate log context. # Contains details about the truncate log operation.
2517 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#truncateLogContext*.
2518 &quot;logType&quot;: &quot;A String&quot;, # The type of log to truncate. Valid values are *MYSQL_GENERAL_TABLE* and *MYSQL_SLOW_TABLE*.
2519 },
2520}
2521
2522 x__xgafv: string, V1 error format.
2523 Allowed values
2524 1 - v1 error format
2525 2 - v2 error format
2526
2527Returns:
2528 An object of the form:
2529
2530 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2531 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2532 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2533 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2534 },
2535 &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**.
2536 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2537 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2538 { # Database instance operation error.
2539 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2540 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2541 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2542 },
2543 ],
2544 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2545 },
2546 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2547 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
2548 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2549 },
2550 &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**.
2551 &quot;A String&quot;,
2552 ],
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. **BAK**: The file contains backup data for a SQL Server instance.
2554 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2555 &quot;offload&quot;: True or False, # Option for export offload.
2556 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2557 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2558 &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.
2559 },
2560 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2561 &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.
2562 &quot;A String&quot;,
2563 ],
2564 },
2565 &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.
2566 },
2567 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2568 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2569 &quot;encryptionOptions&quot;: {
2570 &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.
2571 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2572 &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.
2573 },
2574 },
2575 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2576 &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.
2577 &quot;A String&quot;,
2578 ],
2579 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2580 },
2581 &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.
2582 &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.
2583 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2584 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2585 &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.
2586 },
2587 &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**.
2588 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2589 &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.
2590 &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**
2591 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2592 &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**.
2593 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2594 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2595 &quot;targetLink&quot;: &quot;A String&quot;,
2596 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2597 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2598}</pre>
2599</div>
2600
2601<div class="method">
2602 <code class="details" id="update">update(project, instance, body=None, x__xgafv=None)</code>
2603 <pre>Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.
2604
2605Args:
2606 project: string, Project ID of the project that contains the instance. (required)
2607 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
2608 body: object, The request body.
2609 The object takes the form of:
2610
2611{ # A Cloud SQL instance resource.
2612 &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.
2613 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07002614 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the instance was created in RFC 3339 format (https://tools.ietf.org/html/rfc3339), for example 2012-11-15T16:19:00.094Z
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002615 &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.
2616 &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*.
2617 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
2618 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionConfiguration**.
2619 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
2620 },
2621 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
2622 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionStatus**.
2623 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
2624 },
2625 &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.
2626 &quot;failoverReplica&quot;: { # The name and status of the failover replica.
2627 &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.
2628 &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.
2629 },
2630 &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.
2631 &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.
2632 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
2633 { # Database instance IP Mapping.
2634 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
2635 &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.
2636 &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.
2637 },
2638 ],
2639 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
2640 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
2641 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
2642 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
2643 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
2644 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
2645 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2646 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
2647 &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.
2648 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
2649 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
2650 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
2651 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07002652 &quot;sourceInstance&quot;: { # Reference to another Cloud SQL instance. # The reference to Cloud SQL instance if the source is Cloud SQL.
2653 &quot;name&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance being referenced. This does not include the project ID.
2654 &quot;project&quot;: &quot;A String&quot;, # The project ID of the Cloud SQL instance being referenced. The default is the same project ID as the instance references it.
2655 &quot;region&quot;: &quot;A String&quot;, # The region of the Cloud SQL instance being referenced.
2656 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002657 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
2658 },
2659 &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
2660 &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
2661 &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
2662 },
2663 &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.
2664 &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.
2665 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
2666 &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.
2667 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
2668 &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.
2669 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2670 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
2671 &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.
2672 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
2673 &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.
2674 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#mysqlReplicaConfiguration**.
2675 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
2676 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
2677 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
2678 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
2679 &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.
2680 },
2681 },
2682 &quot;replicaNames&quot;: [ # The replicas of the instance.
2683 &quot;A String&quot;,
2684 ],
2685 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
2686 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
2687 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
2688 &quot;canDefer&quot;: True or False,
2689 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
2690 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
2691 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
2692 },
2693 &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.
2694 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2695 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
2696 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
2697 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
2698 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
2699 &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**
2700 &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**.
2701 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
2702 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sslCert.
2703 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2704 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
2705 },
2706 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
2707 &quot;settings&quot;: { # Database instance settings. # The user settings.
2708 &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.
2709 &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.
2710 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
2711 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
2712 },
2713 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
2714 &quot;A String&quot;,
2715 ],
2716 &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).
2717 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
2718 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
2719 &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.
2720 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
2721 },
2722 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
2723 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
2724 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupConfiguration**.
2725 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
2726 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
2727 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
2728 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - **HH:MM**.
2729 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
2730 },
2731 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
2732 &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.
2733 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
2734 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: **PD_SSD** (default) or **PD_HDD**.
2735 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
2736 { # Database flags for Cloud SQL instances.
2737 &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.
2738 &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.
2739 },
2740 ],
2741 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
2742 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
2743 { # Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
2744 &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
2745 &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
2746 &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
2747 },
2748 ],
2749 &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.
2750 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
2751 &quot;queryPlansPerMinute&quot;: 42, # Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.
2752 &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.
2753 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
2754 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
2755 },
2756 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07002757 &quot;allocatedIpRange&quot;: &quot;A String&quot;, # The name of the allocated ip range for the private ip CloudSQL instance. For example: &quot;google-managed-services-default&quot;. If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.` Reserved for future use.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002758 &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**).
2759 { # An entry for an Access Control list.
2760 &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**.
2761 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#aclEntry**.
2762 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
2763 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
2764 },
2765 ],
2766 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
2767 &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.
2768 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
2769 },
2770 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#settings**.
2771 &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.
2772 &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.
2773 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#locationPreference**.
2774 &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.
2775 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
2776 },
2777 &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.
2778 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
2779 &quot;hour&quot;: 42, # hour of day - 0 to 23.
2780 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#maintenanceWindow**.
2781 &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).
2782 },
2783 &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.
2784 &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.
2785 &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.
2786 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
2787 &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.
2788 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example **db-custom-1-3840**.
2789 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
2790 &quot;a_key&quot;: &quot;A String&quot;,
2791 },
2792 },
2793 &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.
2794 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
2795 &quot;A String&quot;,
2796 ],
2797}
2798
2799 x__xgafv: string, V1 error format.
2800 Allowed values
2801 1 - v1 error format
2802 2 - v2 error format
2803
2804Returns:
2805 An object of the form:
2806
2807 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2808 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2809 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2810 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2811 },
2812 &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**.
2813 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2814 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2815 { # Database instance operation error.
2816 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2817 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2818 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2819 },
2820 ],
2821 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2822 },
2823 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2824 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
2825 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2826 },
2827 &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**.
2828 &quot;A String&quot;,
2829 ],
2830 &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.
2831 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2832 &quot;offload&quot;: True or False, # Option for export offload.
2833 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2834 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2835 &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.
2836 },
2837 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2838 &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.
2839 &quot;A String&quot;,
2840 ],
2841 },
2842 &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.
2843 },
2844 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2845 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2846 &quot;encryptionOptions&quot;: {
2847 &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.
2848 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2849 &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.
2850 },
2851 },
2852 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2853 &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.
2854 &quot;A String&quot;,
2855 ],
2856 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2857 },
2858 &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.
2859 &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.
2860 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2861 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2862 &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.
2863 },
2864 &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**.
2865 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2866 &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.
2867 &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**
2868 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2869 &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**.
2870 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2871 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2872 &quot;targetLink&quot;: &quot;A String&quot;,
2873 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2874 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2875}</pre>
2876</div>
2877
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07002878</body></html>