blob: dbd27799876244c6b6e20d0c87a5e4172ca4ae7c [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.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700180 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
181 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
182 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
183 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700184 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
185 },
186 &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**.
187 &quot;A String&quot;,
188 ],
189 &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.
190 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
191 &quot;offload&quot;: True or False, # Option for export offload.
192 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
193 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
194 &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.
195 },
196 &quot;schemaOnly&quot;: True or False, # Export only schemas.
197 &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.
198 &quot;A String&quot;,
199 ],
200 },
201 &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.
202 },
203 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
204 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
205 &quot;encryptionOptions&quot;: {
206 &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.
207 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
208 &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.
209 },
210 },
211 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
212 &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.
213 &quot;A String&quot;,
214 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700215 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
216 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
217 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
218 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700219 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
220 },
221 &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.
222 &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.
223 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
224 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
225 &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.
226 },
227 &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**.
228 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
229 &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.
230 &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**
231 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
232 &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**.
233 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
234 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
235 &quot;targetLink&quot;: &quot;A String&quot;,
236 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
237 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
238}</pre>
239</div>
240
241<div class="method">
242 <code class="details" id="clone">clone(project, instance, body=None, x__xgafv=None)</code>
243 <pre>Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.
244
245Args:
246 project: string, Project ID of the source as well as the clone Cloud SQL instance. (required)
247 instance: string, The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID. (required)
248 body: object, The request body.
249 The object takes the form of:
250
251{ # Database instance clone request.
252 &quot;cloneContext&quot;: { # Database instance clone context. # Contains details about the clone operation.
253 &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.
254 &quot;binLogFileName&quot;: &quot;A String&quot;, # Name of the binary log file for a Cloud SQL instance.
255 &quot;binLogPosition&quot;: &quot;A String&quot;, # Position (offset) within the binary log file.
256 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#binLogCoordinates*.
257 },
258 &quot;destinationInstanceName&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance to be created as a clone.
259 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#cloneContext*.
260 &quot;pitrTimestampMs&quot;: &quot;A String&quot;, # Reserved for future use.
261 &quot;pointInTime&quot;: &quot;A String&quot;, # Timestamp, if specified, identifies the time to which the source instance is cloned.
262 },
263}
264
265 x__xgafv: string, V1 error format.
266 Allowed values
267 1 - v1 error format
268 2 - v2 error format
269
270Returns:
271 An object of the form:
272
273 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
274 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
275 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
276 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
277 },
278 &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**.
279 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
280 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
281 { # Database instance operation error.
282 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
283 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
284 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
285 },
286 ],
287 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
288 },
289 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
290 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700291 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
292 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
293 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
294 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700295 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
296 },
297 &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**.
298 &quot;A String&quot;,
299 ],
300 &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.
301 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
302 &quot;offload&quot;: True or False, # Option for export offload.
303 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
304 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
305 &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.
306 },
307 &quot;schemaOnly&quot;: True or False, # Export only schemas.
308 &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.
309 &quot;A String&quot;,
310 ],
311 },
312 &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.
313 },
314 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
315 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
316 &quot;encryptionOptions&quot;: {
317 &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.
318 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
319 &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.
320 },
321 },
322 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
323 &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.
324 &quot;A String&quot;,
325 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700326 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
327 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
328 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
329 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700330 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
331 },
332 &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.
333 &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.
334 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
335 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
336 &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.
337 },
338 &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**.
339 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
340 &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.
341 &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**
342 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
343 &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**.
344 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
345 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
346 &quot;targetLink&quot;: &quot;A String&quot;,
347 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
348 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
349}</pre>
350</div>
351
352<div class="method">
yoshi-code-bot1a4514d2021-07-13 00:20:24 -0700353 <code class="details" id="close">close()</code>
354 <pre>Close httplib2 connections.</pre>
355</div>
356
357<div class="method">
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700358 <code class="details" id="delete">delete(project, instance, x__xgafv=None)</code>
359 <pre>Deletes a Cloud SQL instance.
360
361Args:
362 project: string, Project ID of the project that contains the instance to be deleted. (required)
363 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
364 x__xgafv: string, V1 error format.
365 Allowed values
366 1 - v1 error format
367 2 - v2 error format
368
369Returns:
370 An object of the form:
371
372 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
373 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
374 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
375 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
376 },
377 &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**.
378 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
379 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
380 { # Database instance operation error.
381 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
382 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
383 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
384 },
385 ],
386 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
387 },
388 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
389 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700390 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
391 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
392 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
393 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700394 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
395 },
396 &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**.
397 &quot;A String&quot;,
398 ],
399 &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.
400 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
401 &quot;offload&quot;: True or False, # Option for export offload.
402 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
403 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
404 &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.
405 },
406 &quot;schemaOnly&quot;: True or False, # Export only schemas.
407 &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.
408 &quot;A String&quot;,
409 ],
410 },
411 &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.
412 },
413 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
414 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
415 &quot;encryptionOptions&quot;: {
416 &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.
417 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
418 &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.
419 },
420 },
421 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
422 &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.
423 &quot;A String&quot;,
424 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700425 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
426 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
427 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
428 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700429 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
430 },
431 &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.
432 &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.
433 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
434 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
435 &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.
436 },
437 &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**.
438 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
439 &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.
440 &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**
441 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
442 &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**.
443 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
444 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
445 &quot;targetLink&quot;: &quot;A String&quot;,
446 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
447 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
448}</pre>
449</div>
450
451<div class="method">
452 <code class="details" id="demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</code>
453 <pre>Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.
454
455Args:
456 project: string, ID of the project that contains the instance. (required)
457 instance: string, Cloud SQL instance name. (required)
458 body: object, The request body.
459 The object takes the form of:
460
461{ # Database demote primary instance request.
462 &quot;demoteMasterContext&quot;: { # Database instance demote primary instance context. # Contains details about the demoteMaster operation.
463 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#demoteMasterContext*.
464 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as on-premises primary instance in the replication setup.
465 &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.
466 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#demoteMasterConfiguration**.
467 &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.
468 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
469 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
470 &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.
471 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#demoteMasterMysqlReplicaConfiguration**.
472 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
473 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
474 },
475 },
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700476 &quot;skipReplicationSetup&quot;: True or False, # Flag to skip replication setup on the instance.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700477 &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.
478 },
479}
480
481 x__xgafv: string, V1 error format.
482 Allowed values
483 1 - v1 error format
484 2 - v2 error format
485
486Returns:
487 An object of the form:
488
489 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
490 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
491 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
492 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
493 },
494 &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**.
495 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
496 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
497 { # Database instance operation error.
498 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
499 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
500 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
501 },
502 ],
503 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
504 },
505 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
506 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700507 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
508 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
509 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
510 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700511 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
512 },
513 &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**.
514 &quot;A String&quot;,
515 ],
516 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. **SQL**: The file contains SQL statements. **CSV**: The file contains CSV data. **BAK**: The file contains backup data for a SQL Server instance.
517 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
518 &quot;offload&quot;: True or False, # Option for export offload.
519 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
520 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
521 &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.
522 },
523 &quot;schemaOnly&quot;: True or False, # Export only schemas.
524 &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.
525 &quot;A String&quot;,
526 ],
527 },
528 &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.
529 },
530 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
531 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
532 &quot;encryptionOptions&quot;: {
533 &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.
534 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
535 &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.
536 },
537 },
538 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
539 &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.
540 &quot;A String&quot;,
541 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700542 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
543 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
544 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
545 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700546 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
547 },
548 &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.
549 &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.
550 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
551 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
552 &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.
553 },
554 &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**.
555 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
556 &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.
557 &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**
558 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
559 &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**.
560 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
561 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
562 &quot;targetLink&quot;: &quot;A String&quot;,
563 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
564 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
565}</pre>
566</div>
567
568<div class="method">
569 <code class="details" id="export">export(project, instance, body=None, x__xgafv=None)</code>
570 <pre>Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.
571
572Args:
573 project: string, Project ID of the project that contains the instance to be exported. (required)
574 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
575 body: object, The request body.
576 The object takes the form of:
577
578{ # Database instance export request.
579 &quot;exportContext&quot;: { # Database instance export context. # Contains details about the export operation.
580 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700581 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
582 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
583 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
584 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700585 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
586 },
587 &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**.
588 &quot;A String&quot;,
589 ],
590 &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.
591 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
592 &quot;offload&quot;: True or False, # Option for export offload.
593 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
594 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
595 &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.
596 },
597 &quot;schemaOnly&quot;: True or False, # Export only schemas.
598 &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.
599 &quot;A String&quot;,
600 ],
601 },
602 &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.
603 },
604}
605
606 x__xgafv: string, V1 error format.
607 Allowed values
608 1 - v1 error format
609 2 - v2 error format
610
611Returns:
612 An object of the form:
613
614 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
615 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
616 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
617 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
618 },
619 &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**.
620 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
621 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
622 { # Database instance operation error.
623 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
624 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
625 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
626 },
627 ],
628 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
629 },
630 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
631 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700632 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
633 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
634 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
635 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700636 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
637 },
638 &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**.
639 &quot;A String&quot;,
640 ],
641 &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.
642 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
643 &quot;offload&quot;: True or False, # Option for export offload.
644 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
645 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
646 &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.
647 },
648 &quot;schemaOnly&quot;: True or False, # Export only schemas.
649 &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.
650 &quot;A String&quot;,
651 ],
652 },
653 &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.
654 },
655 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
656 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
657 &quot;encryptionOptions&quot;: {
658 &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.
659 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
660 &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.
661 },
662 },
663 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
664 &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.
665 &quot;A String&quot;,
666 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700667 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
668 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
669 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
670 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700671 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
672 },
673 &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.
674 &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.
675 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
676 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
677 &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.
678 },
679 &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**.
680 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
681 &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.
682 &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**
683 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
684 &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**.
685 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
686 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
687 &quot;targetLink&quot;: &quot;A String&quot;,
688 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
689 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
690}</pre>
691</div>
692
693<div class="method">
694 <code class="details" id="failover">failover(project, instance, body=None, x__xgafv=None)</code>
695 <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.
696
697Args:
698 project: string, ID of the project that contains the read replica. (required)
699 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
700 body: object, The request body.
701 The object takes the form of:
702
703{ # Instance failover request.
704 &quot;failoverContext&quot;: { # Database instance failover context. # Failover Context.
705 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#failoverContext*.
706 &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.
707 },
708}
709
710 x__xgafv: string, V1 error format.
711 Allowed values
712 1 - v1 error format
713 2 - v2 error format
714
715Returns:
716 An object of the form:
717
718 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
719 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
720 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
721 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
722 },
723 &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**.
724 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
725 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
726 { # Database instance operation error.
727 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
728 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
729 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
730 },
731 ],
732 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
733 },
734 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
735 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700736 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
737 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
738 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
739 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700740 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
741 },
742 &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**.
743 &quot;A String&quot;,
744 ],
745 &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.
746 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
747 &quot;offload&quot;: True or False, # Option for export offload.
748 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
749 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
750 &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.
751 },
752 &quot;schemaOnly&quot;: True or False, # Export only schemas.
753 &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.
754 &quot;A String&quot;,
755 ],
756 },
757 &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.
758 },
759 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
760 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
761 &quot;encryptionOptions&quot;: {
762 &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.
763 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
764 &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.
765 },
766 },
767 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
768 &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.
769 &quot;A String&quot;,
770 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700771 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
772 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
773 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
774 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700775 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
776 },
777 &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.
778 &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.
779 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
780 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
781 &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.
782 },
783 &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**.
784 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
785 &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.
786 &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**
787 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
788 &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**.
789 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
790 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
791 &quot;targetLink&quot;: &quot;A String&quot;,
792 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
793 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
794}</pre>
795</div>
796
797<div class="method">
798 <code class="details" id="get">get(project, instance, x__xgafv=None)</code>
799 <pre>Retrieves a resource containing information about a Cloud SQL instance.
800
801Args:
802 project: string, Project ID of the project that contains the instance. (required)
803 instance: string, Database instance ID. This does not include the project ID. (required)
804 x__xgafv: string, V1 error format.
805 Allowed values
806 1 - v1 error format
807 2 - v2 error format
808
809Returns:
810 An object of the form:
811
812 { # A Cloud SQL instance resource.
813 &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.
814 &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 -0700815 &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 -0700816 &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.
817 &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*.
818 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
819 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionConfiguration**.
820 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
821 },
822 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
823 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionStatus**.
824 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
825 },
826 &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.
827 &quot;failoverReplica&quot;: { # The name and status of the failover replica.
828 &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.
829 &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.
830 },
831 &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.
832 &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.
833 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
834 { # Database instance IP Mapping.
835 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
836 &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.
837 &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.
838 },
839 ],
840 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
841 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
842 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
843 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
844 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
845 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
846 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
847 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
848 &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.
849 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
850 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
851 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
852 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700853 &quot;sourceInstance&quot;: { # Reference to another Cloud SQL instance. # The reference to Cloud SQL instance if the source is Cloud SQL.
854 &quot;name&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance being referenced. This does not include the project ID.
855 &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.
856 &quot;region&quot;: &quot;A String&quot;, # The region of the Cloud SQL instance being referenced.
857 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700858 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
859 },
860 &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
861 &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
862 &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
863 },
864 &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.
865 &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.
866 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
867 &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.
868 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
869 &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.
870 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
871 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
872 &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.
873 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
874 &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.
875 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#mysqlReplicaConfiguration**.
876 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
877 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
878 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
879 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
880 &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.
881 },
882 },
883 &quot;replicaNames&quot;: [ # The replicas of the instance.
884 &quot;A String&quot;,
885 ],
886 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
887 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
888 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
889 &quot;canDefer&quot;: True or False,
890 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
891 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
892 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
893 },
894 &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.
895 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
896 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
897 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
898 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
899 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
900 &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**
901 &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**.
902 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
903 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sslCert.
904 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
905 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
906 },
907 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
908 &quot;settings&quot;: { # Database instance settings. # The user settings.
909 &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.
910 &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.
911 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
912 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
913 },
914 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
915 &quot;A String&quot;,
916 ],
917 &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).
918 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
919 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
920 &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.
921 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
922 },
923 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
924 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
925 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupConfiguration**.
926 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
927 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
928 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
929 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - **HH:MM**.
930 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
931 },
932 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
933 &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.
934 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
935 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: **PD_SSD** (default) or **PD_HDD**.
936 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
937 { # Database flags for Cloud SQL instances.
938 &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.
939 &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.
940 },
941 ],
942 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
943 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
944 { # Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
945 &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
946 &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
947 &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
948 },
949 ],
950 &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.
951 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
952 &quot;queryPlansPerMinute&quot;: 42, # Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.
953 &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.
954 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
955 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
956 },
957 &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 -0700958 &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 -0700959 &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**).
960 { # An entry for an Access Control list.
961 &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**.
962 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#aclEntry**.
963 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
964 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
965 },
966 ],
967 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
968 &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.
969 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
970 },
971 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#settings**.
972 &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.
973 &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.
974 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#locationPreference**.
975 &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.
976 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
977 },
978 &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.
979 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
980 &quot;hour&quot;: 42, # hour of day - 0 to 23.
981 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#maintenanceWindow**.
982 &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).
983 },
984 &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.
985 &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.
986 &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.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700987 &quot;sqlServerAuditConfig&quot;: { # SQL Server specific audit configuration. # SQL Server specific audit configuration.
988 &quot;bucket&quot;: &quot;A String&quot;, # The name of the destination bucket (e.g., gs://mybucket).
989 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sqlServerAuditConfig
990 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700991 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
992 &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.
993 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example **db-custom-1-3840**.
994 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
995 &quot;a_key&quot;: &quot;A String&quot;,
996 },
997 },
998 &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.
999 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1000 &quot;A String&quot;,
1001 ],
1002}</pre>
1003</div>
1004
1005<div class="method">
1006 <code class="details" id="import_">import_(project, instance, body=None, x__xgafv=None)</code>
1007 <pre>Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.
1008
1009Args:
1010 project: string, Project ID of the project that contains the instance. (required)
1011 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1012 body: object, The request body.
1013 The object takes the form of:
1014
1015{ # Database instance import request.
1016 &quot;importContext&quot;: { # Database instance import context. # Contains details about the import operation.
1017 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1018 &quot;encryptionOptions&quot;: {
1019 &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.
1020 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1021 &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.
1022 },
1023 },
1024 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1025 &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.
1026 &quot;A String&quot;,
1027 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07001028 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
1029 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
1030 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
1031 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001032 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1033 },
1034 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If **fileType** is **SQL**, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If **fileType** is **CSV**, one database must be specified.
1035 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. **SQL**: The file contains SQL statements. **CSV**: The file contains CSV data.
1036 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1037 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
1038 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form **gs://bucketName/fileName**. Compressed gzip files (.gz) are supported when **fileType** is **SQL**. The instance must have write permissions to the bucket and read access to the file.
1039 },
1040}
1041
1042 x__xgafv: string, V1 error format.
1043 Allowed values
1044 1 - v1 error format
1045 2 - v2 error format
1046
1047Returns:
1048 An object of the form:
1049
1050 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
1051 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1052 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1053 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
1054 },
1055 &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**.
1056 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1057 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1058 { # Database instance operation error.
1059 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1060 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
1061 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1062 },
1063 ],
1064 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
1065 },
1066 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1067 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07001068 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
1069 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
1070 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
1071 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001072 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1073 },
1074 &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**.
1075 &quot;A String&quot;,
1076 ],
1077 &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.
1078 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
1079 &quot;offload&quot;: True or False, # Option for export offload.
1080 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1081 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1082 &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.
1083 },
1084 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1085 &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.
1086 &quot;A String&quot;,
1087 ],
1088 },
1089 &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.
1090 },
1091 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1092 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1093 &quot;encryptionOptions&quot;: {
1094 &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.
1095 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1096 &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.
1097 },
1098 },
1099 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1100 &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.
1101 &quot;A String&quot;,
1102 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07001103 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
1104 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
1105 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
1106 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001107 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1108 },
1109 &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.
1110 &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.
1111 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1112 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
1113 &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.
1114 },
1115 &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**.
1116 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
1117 &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.
1118 &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**
1119 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1120 &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**.
1121 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
1122 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1123 &quot;targetLink&quot;: &quot;A String&quot;,
1124 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1125 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1126}</pre>
1127</div>
1128
1129<div class="method">
1130 <code class="details" id="insert">insert(project, body=None, x__xgafv=None)</code>
1131 <pre>Creates a new Cloud SQL instance.
1132
1133Args:
1134 project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required)
1135 body: object, The request body.
1136 The object takes the form of:
1137
1138{ # A Cloud SQL instance resource.
1139 &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.
1140 &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 -07001141 &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 -07001142 &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.
1143 &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*.
1144 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
1145 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionConfiguration**.
1146 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1147 },
1148 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
1149 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionStatus**.
1150 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1151 },
1152 &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.
1153 &quot;failoverReplica&quot;: { # The name and status of the failover replica.
1154 &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.
1155 &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.
1156 },
1157 &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.
1158 &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.
1159 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1160 { # Database instance IP Mapping.
1161 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1162 &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.
1163 &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.
1164 },
1165 ],
1166 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1167 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1168 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1169 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1170 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1171 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1172 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1173 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1174 &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.
1175 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1176 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1177 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1178 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001179 &quot;sourceInstance&quot;: { # Reference to another Cloud SQL instance. # The reference to Cloud SQL instance if the source is Cloud SQL.
1180 &quot;name&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance being referenced. This does not include the project ID.
1181 &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.
1182 &quot;region&quot;: &quot;A String&quot;, # The region of the Cloud SQL instance being referenced.
1183 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001184 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1185 },
1186 &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
1187 &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
1188 &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
1189 },
1190 &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.
1191 &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.
1192 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1193 &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.
1194 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1195 &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.
1196 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1197 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1198 &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.
1199 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1200 &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.
1201 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#mysqlReplicaConfiguration**.
1202 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1203 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1204 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1205 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1206 &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.
1207 },
1208 },
1209 &quot;replicaNames&quot;: [ # The replicas of the instance.
1210 &quot;A String&quot;,
1211 ],
1212 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
1213 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
1214 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1215 &quot;canDefer&quot;: True or False,
1216 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1217 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
1218 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1219 },
1220 &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.
1221 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1222 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1223 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1224 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1225 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1226 &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**
1227 &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**.
1228 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1229 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sslCert.
1230 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1231 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1232 },
1233 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
1234 &quot;settings&quot;: { # Database instance settings. # The user settings.
1235 &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.
1236 &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.
1237 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
1238 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
1239 },
1240 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
1241 &quot;A String&quot;,
1242 ],
1243 &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).
1244 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1245 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1246 &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.
1247 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1248 },
1249 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1250 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1251 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupConfiguration**.
1252 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1253 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
1254 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1255 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - **HH:MM**.
1256 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1257 },
1258 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1259 &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.
1260 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1261 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: **PD_SSD** (default) or **PD_HDD**.
1262 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1263 { # Database flags for Cloud SQL instances.
1264 &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.
1265 &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.
1266 },
1267 ],
1268 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1269 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1270 { # Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1271 &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
1272 &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
1273 &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
1274 },
1275 ],
1276 &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.
1277 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
1278 &quot;queryPlansPerMinute&quot;: 42, # Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.
1279 &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.
1280 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1281 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1282 },
1283 &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 -07001284 &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 -07001285 &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**).
1286 { # An entry for an Access Control list.
1287 &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**.
1288 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#aclEntry**.
1289 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1290 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1291 },
1292 ],
1293 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1294 &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.
1295 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1296 },
1297 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#settings**.
1298 &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.
1299 &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.
1300 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#locationPreference**.
1301 &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.
1302 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1303 },
1304 &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.
1305 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1306 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1307 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#maintenanceWindow**.
1308 &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).
1309 },
1310 &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.
1311 &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.
1312 &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.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07001313 &quot;sqlServerAuditConfig&quot;: { # SQL Server specific audit configuration. # SQL Server specific audit configuration.
1314 &quot;bucket&quot;: &quot;A String&quot;, # The name of the destination bucket (e.g., gs://mybucket).
1315 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sqlServerAuditConfig
1316 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001317 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1318 &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.
1319 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example **db-custom-1-3840**.
1320 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1321 &quot;a_key&quot;: &quot;A String&quot;,
1322 },
1323 },
1324 &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.
1325 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1326 &quot;A String&quot;,
1327 ],
1328}
1329
1330 x__xgafv: string, V1 error format.
1331 Allowed values
1332 1 - v1 error format
1333 2 - v2 error format
1334
1335Returns:
1336 An object of the form:
1337
1338 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
1339 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1340 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1341 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
1342 },
1343 &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**.
1344 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1345 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1346 { # Database instance operation error.
1347 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1348 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
1349 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1350 },
1351 ],
1352 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
1353 },
1354 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1355 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07001356 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
1357 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
1358 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
1359 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001360 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1361 },
1362 &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**.
1363 &quot;A String&quot;,
1364 ],
1365 &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.
1366 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
1367 &quot;offload&quot;: True or False, # Option for export offload.
1368 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1369 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1370 &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.
1371 },
1372 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1373 &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.
1374 &quot;A String&quot;,
1375 ],
1376 },
1377 &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.
1378 },
1379 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1380 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1381 &quot;encryptionOptions&quot;: {
1382 &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.
1383 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1384 &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.
1385 },
1386 },
1387 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1388 &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.
1389 &quot;A String&quot;,
1390 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07001391 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
1392 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
1393 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
1394 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001395 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1396 },
1397 &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.
1398 &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.
1399 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1400 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
1401 &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.
1402 },
1403 &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**.
1404 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
1405 &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.
1406 &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**
1407 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1408 &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**.
1409 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
1410 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1411 &quot;targetLink&quot;: &quot;A String&quot;,
1412 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1413 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1414}</pre>
1415</div>
1416
1417<div class="method">
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001418 <code class="details" id="list">list(project, filter=None, maxResults=None, pageToken=None, x__xgafv=None)</code>
1419 <pre>Lists instances under a given project.
1420
1421Args:
1422 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
1423 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.
1424 maxResults: integer, The maximum number of results to return per response.
1425 pageToken: string, A previously-returned page token representing part of the larger set of results to view.
1426 x__xgafv: string, V1 error format.
1427 Allowed values
1428 1 - v1 error format
1429 2 - v2 error format
1430
1431Returns:
1432 An object of the form:
1433
1434 { # Database instances list response.
1435 &quot;items&quot;: [ # List of database instance resources.
1436 { # A Cloud SQL instance resource.
1437 &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.
1438 &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 -07001439 &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 -07001440 &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 -07001441 &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*.
1442 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001443 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionConfiguration**.
1444 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1445 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001446 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001447 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionStatus**.
1448 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1449 },
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001450 &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 -07001451 &quot;failoverReplica&quot;: { # The name and status of the failover replica.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001452 &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 -07001453 &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 -07001454 },
1455 &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 -07001456 &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 -07001457 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1458 { # Database instance IP Mapping.
1459 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1460 &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.
1461 &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.
1462 },
1463 ],
1464 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1465 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001466 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1467 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1468 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1469 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1470 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1471 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1472 &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.
1473 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1474 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1475 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1476 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001477 &quot;sourceInstance&quot;: { # Reference to another Cloud SQL instance. # The reference to Cloud SQL instance if the source is Cloud SQL.
1478 &quot;name&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance being referenced. This does not include the project ID.
1479 &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.
1480 &quot;region&quot;: &quot;A String&quot;, # The region of the Cloud SQL instance being referenced.
1481 },
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001482 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1483 },
1484 &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
1485 &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
1486 &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
1487 },
1488 &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.
1489 &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.
1490 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1491 &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.
1492 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1493 &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.
1494 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1495 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1496 &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.
1497 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1498 &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.
1499 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#mysqlReplicaConfiguration**.
1500 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1501 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1502 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1503 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1504 &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.
1505 },
1506 },
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001507 &quot;replicaNames&quot;: [ # The replicas of the instance.
1508 &quot;A String&quot;,
1509 ],
1510 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
1511 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
1512 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1513 &quot;canDefer&quot;: True or False,
1514 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1515 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
1516 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1517 },
1518 &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.
1519 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1520 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1521 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1522 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1523 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1524 &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**
1525 &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**.
1526 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1527 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sslCert.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001528 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001529 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1530 },
1531 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
1532 &quot;settings&quot;: { # Database instance settings. # The user settings.
1533 &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.
1534 &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.
1535 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
1536 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
1537 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001538 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
1539 &quot;A String&quot;,
1540 ],
1541 &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 -07001542 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1543 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1544 &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.
1545 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1546 },
1547 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1548 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1549 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupConfiguration**.
1550 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1551 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
1552 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1553 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - **HH:MM**.
1554 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1555 },
1556 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1557 &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.
1558 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1559 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: **PD_SSD** (default) or **PD_HDD**.
1560 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1561 { # Database flags for Cloud SQL instances.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001562 &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 -07001563 &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.
1564 },
1565 ],
1566 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1567 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1568 { # Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1569 &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
1570 &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
1571 &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
1572 },
1573 ],
1574 &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.
1575 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001576 &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 -07001577 &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.
1578 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1579 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1580 },
1581 &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 -07001582 &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 -07001583 &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**).
1584 { # An entry for an Access Control list.
1585 &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**.
1586 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#aclEntry**.
1587 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1588 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1589 },
1590 ],
1591 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1592 &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.
1593 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1594 },
1595 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#settings**.
1596 &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 -07001597 &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 -07001598 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#locationPreference**.
1599 &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.
1600 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1601 },
1602 &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.
1603 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1604 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1605 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#maintenanceWindow**.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001606 &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 -07001607 },
1608 &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.
1609 &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.
1610 &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.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07001611 &quot;sqlServerAuditConfig&quot;: { # SQL Server specific audit configuration. # SQL Server specific audit configuration.
1612 &quot;bucket&quot;: &quot;A String&quot;, # The name of the destination bucket (e.g., gs://mybucket).
1613 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sqlServerAuditConfig
1614 },
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001615 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1616 &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.
1617 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example **db-custom-1-3840**.
1618 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1619 &quot;a_key&quot;: &quot;A String&quot;,
1620 },
1621 },
1622 &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.
1623 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1624 &quot;A String&quot;,
1625 ],
1626 },
1627 ],
1628 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instancesList*.
1629 &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.
1630 &quot;warnings&quot;: [ # List of warnings that occurred while handling the request.
1631 { # An Admin API warning message.
1632 &quot;code&quot;: &quot;A String&quot;, # Code to uniquely identify the warning type.
1633 &quot;message&quot;: &quot;A String&quot;, # The warning message.
1634 &quot;region&quot;: &quot;A String&quot;, # The region name for REGION_UNREACHABLE warning.
1635 },
1636 ],
1637}</pre>
1638</div>
1639
1640<div class="method">
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001641 <code class="details" id="listServerCas">listServerCas(project, instance, x__xgafv=None)</code>
1642 <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.
1643
1644Args:
1645 project: string, Project ID of the project that contains the instance. (required)
1646 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1647 x__xgafv: string, V1 error format.
1648 Allowed values
1649 1 - v1 error format
1650 2 - v2 error format
1651
1652Returns:
1653 An object of the form:
1654
1655 { # Instances ListServerCas response.
1656 &quot;activeVersion&quot;: &quot;A String&quot;,
1657 &quot;certs&quot;: [ # List of server CA certificates for the instance.
1658 { # SslCerts Resource
1659 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1660 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1661 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1662 &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**
1663 &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**.
1664 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1665 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sslCert.
1666 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1667 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1668 },
1669 ],
1670 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instancesListServerCas*.
1671}</pre>
1672</div>
1673
1674<div class="method">
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001675 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1676 <pre>Retrieves the next page of results.
1677
1678Args:
1679 previous_request: The request for the previous page. (required)
1680 previous_response: The response from the request for the previous page. (required)
1681
1682Returns:
1683 A request object that you can call &#x27;execute()&#x27; on to request the next
1684 page. Returns None if there are no more items in the collection.
1685 </pre>
1686</div>
1687
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001688<div class="method">
1689 <code class="details" id="patch">patch(project, instance, body=None, x__xgafv=None)</code>
1690 <pre>Updates settings of a Cloud SQL instance. This method supports patch semantics.
1691
1692Args:
1693 project: string, Project ID of the project that contains the instance. (required)
1694 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
1695 body: object, The request body.
1696 The object takes the form of:
1697
1698{ # A Cloud SQL instance resource.
1699 &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.
1700 &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 -07001701 &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 -07001702 &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.
1703 &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*.
1704 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
1705 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionConfiguration**.
1706 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1707 },
1708 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
1709 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionStatus**.
1710 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1711 },
1712 &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.
1713 &quot;failoverReplica&quot;: { # The name and status of the failover replica.
1714 &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.
1715 &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.
1716 },
1717 &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.
1718 &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.
1719 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1720 { # Database instance IP Mapping.
1721 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1722 &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.
1723 &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.
1724 },
1725 ],
1726 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1727 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1728 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1729 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1730 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1731 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1732 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1733 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1734 &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.
1735 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1736 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1737 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1738 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07001739 &quot;sourceInstance&quot;: { # Reference to another Cloud SQL instance. # The reference to Cloud SQL instance if the source is Cloud SQL.
1740 &quot;name&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance being referenced. This does not include the project ID.
1741 &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.
1742 &quot;region&quot;: &quot;A String&quot;, # The region of the Cloud SQL instance being referenced.
1743 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001744 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1745 },
1746 &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
1747 &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
1748 &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
1749 },
1750 &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.
1751 &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.
1752 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1753 &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.
1754 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1755 &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.
1756 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1757 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1758 &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.
1759 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1760 &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.
1761 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#mysqlReplicaConfiguration**.
1762 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1763 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1764 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1765 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1766 &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.
1767 },
1768 },
1769 &quot;replicaNames&quot;: [ # The replicas of the instance.
1770 &quot;A String&quot;,
1771 ],
1772 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
1773 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
1774 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1775 &quot;canDefer&quot;: True or False,
1776 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1777 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
1778 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1779 },
1780 &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.
1781 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1782 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1783 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1784 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1785 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1786 &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**
1787 &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**.
1788 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1789 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sslCert.
1790 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1791 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1792 },
1793 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
1794 &quot;settings&quot;: { # Database instance settings. # The user settings.
1795 &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.
1796 &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.
1797 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
1798 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
1799 },
1800 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
1801 &quot;A String&quot;,
1802 ],
1803 &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).
1804 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1805 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1806 &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.
1807 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1808 },
1809 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1810 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1811 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupConfiguration**.
1812 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1813 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
1814 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1815 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - **HH:MM**.
1816 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1817 },
1818 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1819 &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.
1820 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1821 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: **PD_SSD** (default) or **PD_HDD**.
1822 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1823 { # Database flags for Cloud SQL instances.
1824 &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.
1825 &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.
1826 },
1827 ],
1828 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1829 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1830 { # Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1831 &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
1832 &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
1833 &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
1834 },
1835 ],
1836 &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.
1837 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
1838 &quot;queryPlansPerMinute&quot;: 42, # Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.
1839 &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.
1840 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1841 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1842 },
1843 &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 -07001844 &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 -07001845 &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**).
1846 { # An entry for an Access Control list.
1847 &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**.
1848 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#aclEntry**.
1849 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1850 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1851 },
1852 ],
1853 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1854 &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.
1855 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1856 },
1857 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#settings**.
1858 &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.
1859 &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.
1860 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#locationPreference**.
1861 &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.
1862 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1863 },
1864 &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.
1865 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1866 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1867 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#maintenanceWindow**.
1868 &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).
1869 },
1870 &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.
1871 &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.
1872 &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.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07001873 &quot;sqlServerAuditConfig&quot;: { # SQL Server specific audit configuration. # SQL Server specific audit configuration.
1874 &quot;bucket&quot;: &quot;A String&quot;, # The name of the destination bucket (e.g., gs://mybucket).
1875 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sqlServerAuditConfig
1876 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001877 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1878 &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.
1879 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example **db-custom-1-3840**.
1880 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1881 &quot;a_key&quot;: &quot;A String&quot;,
1882 },
1883 },
1884 &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.
1885 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1886 &quot;A String&quot;,
1887 ],
1888}
1889
1890 x__xgafv: string, V1 error format.
1891 Allowed values
1892 1 - v1 error format
1893 2 - v2 error format
1894
1895Returns:
1896 An object of the form:
1897
1898 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
1899 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1900 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1901 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
1902 },
1903 &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**.
1904 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1905 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1906 { # Database instance operation error.
1907 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1908 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
1909 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1910 },
1911 ],
1912 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
1913 },
1914 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1915 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07001916 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
1917 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
1918 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
1919 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001920 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1921 },
1922 &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**.
1923 &quot;A String&quot;,
1924 ],
1925 &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.
1926 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
1927 &quot;offload&quot;: True or False, # Option for export offload.
1928 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1929 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1930 &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.
1931 },
1932 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1933 &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.
1934 &quot;A String&quot;,
1935 ],
1936 },
1937 &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.
1938 },
1939 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1940 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1941 &quot;encryptionOptions&quot;: {
1942 &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.
1943 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1944 &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.
1945 },
1946 },
1947 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1948 &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.
1949 &quot;A String&quot;,
1950 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07001951 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
1952 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
1953 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
1954 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07001955 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1956 },
1957 &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.
1958 &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.
1959 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1960 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
1961 &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.
1962 },
1963 &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**.
1964 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
1965 &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.
1966 &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**
1967 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1968 &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**.
1969 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
1970 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1971 &quot;targetLink&quot;: &quot;A String&quot;,
1972 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1973 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1974}</pre>
1975</div>
1976
1977<div class="method">
1978 <code class="details" id="promoteReplica">promoteReplica(project, instance, x__xgafv=None)</code>
1979 <pre>Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.
1980
1981Args:
1982 project: string, ID of the project that contains the read replica. (required)
1983 instance: string, Cloud SQL read replica instance name. (required)
1984 x__xgafv: string, V1 error format.
1985 Allowed values
1986 1 - v1 error format
1987 2 - v2 error format
1988
1989Returns:
1990 An object of the form:
1991
1992 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
1993 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1994 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1995 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
1996 },
1997 &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**.
1998 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1999 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2000 { # Database instance operation error.
2001 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2002 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2003 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2004 },
2005 ],
2006 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2007 },
2008 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2009 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07002010 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
2011 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
2012 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
2013 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002014 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2015 },
2016 &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**.
2017 &quot;A String&quot;,
2018 ],
2019 &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.
2020 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2021 &quot;offload&quot;: True or False, # Option for export offload.
2022 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2023 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2024 &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.
2025 },
2026 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2027 &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.
2028 &quot;A String&quot;,
2029 ],
2030 },
2031 &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.
2032 },
2033 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2034 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2035 &quot;encryptionOptions&quot;: {
2036 &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.
2037 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2038 &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.
2039 },
2040 },
2041 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2042 &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.
2043 &quot;A String&quot;,
2044 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07002045 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
2046 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
2047 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
2048 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002049 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2050 },
2051 &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.
2052 &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.
2053 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2054 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2055 &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.
2056 },
2057 &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**.
2058 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2059 &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.
2060 &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**
2061 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2062 &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**.
2063 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2064 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2065 &quot;targetLink&quot;: &quot;A String&quot;,
2066 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2067 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2068}</pre>
2069</div>
2070
2071<div class="method">
2072 <code class="details" id="resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</code>
2073 <pre>Deletes all client certificates and generates a new server SSL certificate for the instance.
2074
2075Args:
2076 project: string, Project ID of the project that contains the instance. (required)
2077 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
2078 x__xgafv: string, V1 error format.
2079 Allowed values
2080 1 - v1 error format
2081 2 - v2 error format
2082
2083Returns:
2084 An object of the form:
2085
2086 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2087 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2088 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2089 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2090 },
2091 &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**.
2092 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2093 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2094 { # Database instance operation error.
2095 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2096 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2097 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2098 },
2099 ],
2100 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2101 },
2102 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2103 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07002104 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
2105 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
2106 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
2107 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002108 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2109 },
2110 &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**.
2111 &quot;A String&quot;,
2112 ],
2113 &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.
2114 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2115 &quot;offload&quot;: True or False, # Option for export offload.
2116 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2117 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2118 &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.
2119 },
2120 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2121 &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.
2122 &quot;A String&quot;,
2123 ],
2124 },
2125 &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.
2126 },
2127 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2128 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2129 &quot;encryptionOptions&quot;: {
2130 &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.
2131 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2132 &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.
2133 },
2134 },
2135 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2136 &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.
2137 &quot;A String&quot;,
2138 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07002139 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
2140 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
2141 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
2142 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002143 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2144 },
2145 &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.
2146 &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.
2147 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2148 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2149 &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.
2150 },
2151 &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**.
2152 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2153 &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.
2154 &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**
2155 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2156 &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**.
2157 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2158 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2159 &quot;targetLink&quot;: &quot;A String&quot;,
2160 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2161 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2162}</pre>
2163</div>
2164
2165<div class="method">
2166 <code class="details" id="restart">restart(project, instance, x__xgafv=None)</code>
2167 <pre>Restarts a Cloud SQL instance.
2168
2169Args:
2170 project: string, Project ID of the project that contains the instance to be restarted. (required)
2171 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
2172 x__xgafv: string, V1 error format.
2173 Allowed values
2174 1 - v1 error format
2175 2 - v2 error format
2176
2177Returns:
2178 An object of the form:
2179
2180 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2181 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2182 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2183 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2184 },
2185 &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**.
2186 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2187 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2188 { # Database instance operation error.
2189 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2190 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2191 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2192 },
2193 ],
2194 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2195 },
2196 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2197 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07002198 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
2199 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
2200 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
2201 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002202 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2203 },
2204 &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**.
2205 &quot;A String&quot;,
2206 ],
2207 &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.
2208 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2209 &quot;offload&quot;: True or False, # Option for export offload.
2210 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2211 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2212 &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.
2213 },
2214 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2215 &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.
2216 &quot;A String&quot;,
2217 ],
2218 },
2219 &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.
2220 },
2221 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2222 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2223 &quot;encryptionOptions&quot;: {
2224 &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.
2225 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2226 &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.
2227 },
2228 },
2229 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2230 &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.
2231 &quot;A String&quot;,
2232 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07002233 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
2234 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
2235 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
2236 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002237 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2238 },
2239 &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.
2240 &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.
2241 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2242 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2243 &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.
2244 },
2245 &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**.
2246 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2247 &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.
2248 &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**
2249 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2250 &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**.
2251 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2252 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2253 &quot;targetLink&quot;: &quot;A String&quot;,
2254 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2255 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2256}</pre>
2257</div>
2258
2259<div class="method">
2260 <code class="details" id="restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</code>
2261 <pre>Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.
2262
2263Args:
2264 project: string, Project ID of the project that contains the instance. (required)
2265 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
2266 body: object, The request body.
2267 The object takes the form of:
2268
2269{ # Database instance restore backup request.
2270 &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.
2271 &quot;backupRunId&quot;: &quot;A String&quot;, # The ID of the backup run to restore from.
2272 &quot;instanceId&quot;: &quot;A String&quot;, # The ID of the instance that the backup was taken from.
2273 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#restoreBackupContext*.
2274 &quot;project&quot;: &quot;A String&quot;, # The full project ID of the source instance.
2275 },
2276}
2277
2278 x__xgafv: string, V1 error format.
2279 Allowed values
2280 1 - v1 error format
2281 2 - v2 error format
2282
2283Returns:
2284 An object of the form:
2285
2286 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2287 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2288 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2289 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2290 },
2291 &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**.
2292 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2293 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2294 { # Database instance operation error.
2295 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2296 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2297 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2298 },
2299 ],
2300 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2301 },
2302 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2303 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07002304 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
2305 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
2306 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
2307 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002308 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2309 },
2310 &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**.
2311 &quot;A String&quot;,
2312 ],
2313 &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.
2314 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2315 &quot;offload&quot;: True or False, # Option for export offload.
2316 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2317 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2318 &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.
2319 },
2320 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2321 &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.
2322 &quot;A String&quot;,
2323 ],
2324 },
2325 &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.
2326 },
2327 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2328 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2329 &quot;encryptionOptions&quot;: {
2330 &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.
2331 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2332 &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.
2333 },
2334 },
2335 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2336 &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.
2337 &quot;A String&quot;,
2338 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07002339 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
2340 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
2341 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
2342 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002343 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2344 },
2345 &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.
2346 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. **SQL**: The file contains SQL statements. **CSV**: The file contains CSV data.
2347 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2348 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2349 &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.
2350 },
2351 &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**.
2352 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2353 &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.
2354 &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**
2355 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2356 &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**.
2357 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2358 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2359 &quot;targetLink&quot;: &quot;A String&quot;,
2360 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2361 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2362}</pre>
2363</div>
2364
2365<div class="method">
2366 <code class="details" id="rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</code>
2367 <pre>Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.
2368
2369Args:
2370 project: string, Project ID of the project that contains the instance. (required)
2371 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
2372 body: object, The request body.
2373 The object takes the form of:
2374
2375{ # Rotate server CA request.
2376 &quot;rotateServerCaContext&quot;: { # Instance rotate server CA context. # Contains details about the rotate server CA operation.
2377 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#rotateServerCaContext*.
2378 &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.
2379 },
2380}
2381
2382 x__xgafv: string, V1 error format.
2383 Allowed values
2384 1 - v1 error format
2385 2 - v2 error format
2386
2387Returns:
2388 An object of the form:
2389
2390 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2391 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2392 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2393 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2394 },
2395 &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**.
2396 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2397 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2398 { # Database instance operation error.
2399 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2400 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2401 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2402 },
2403 ],
2404 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2405 },
2406 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2407 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07002408 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
2409 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
2410 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
2411 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002412 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2413 },
2414 &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**.
2415 &quot;A String&quot;,
2416 ],
2417 &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.
2418 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2419 &quot;offload&quot;: True or False, # Option for export offload.
2420 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2421 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2422 &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.
2423 },
2424 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2425 &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.
2426 &quot;A String&quot;,
2427 ],
2428 },
2429 &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.
2430 },
2431 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2432 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2433 &quot;encryptionOptions&quot;: {
2434 &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.
2435 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2436 &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.
2437 },
2438 },
2439 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2440 &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.
2441 &quot;A String&quot;,
2442 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07002443 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
2444 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
2445 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
2446 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002447 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2448 },
2449 &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.
2450 &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.
2451 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2452 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2453 &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.
2454 },
2455 &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**.
2456 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2457 &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.
2458 &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**
2459 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2460 &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**.
2461 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2462 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2463 &quot;targetLink&quot;: &quot;A String&quot;,
2464 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2465 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2466}</pre>
2467</div>
2468
2469<div class="method">
2470 <code class="details" id="startReplica">startReplica(project, instance, x__xgafv=None)</code>
2471 <pre>Starts the replication in the read replica instance.
2472
2473Args:
2474 project: string, ID of the project that contains the read replica. (required)
2475 instance: string, Cloud SQL read replica instance name. (required)
2476 x__xgafv: string, V1 error format.
2477 Allowed values
2478 1 - v1 error format
2479 2 - v2 error format
2480
2481Returns:
2482 An object of the form:
2483
2484 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2485 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2486 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2487 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2488 },
2489 &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**.
2490 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2491 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2492 { # Database instance operation error.
2493 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2494 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2495 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2496 },
2497 ],
2498 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2499 },
2500 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2501 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07002502 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
2503 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
2504 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
2505 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002506 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2507 },
2508 &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**.
2509 &quot;A String&quot;,
2510 ],
2511 &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.
2512 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2513 &quot;offload&quot;: True or False, # Option for export offload.
2514 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2515 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2516 &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.
2517 },
2518 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2519 &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.
2520 &quot;A String&quot;,
2521 ],
2522 },
2523 &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.
2524 },
2525 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2526 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2527 &quot;encryptionOptions&quot;: {
2528 &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.
2529 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2530 &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.
2531 },
2532 },
2533 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2534 &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.
2535 &quot;A String&quot;,
2536 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07002537 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
2538 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
2539 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
2540 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002541 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2542 },
2543 &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.
2544 &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.
2545 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2546 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2547 &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.
2548 },
2549 &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**.
2550 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2551 &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.
2552 &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**
2553 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2554 &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**.
2555 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2556 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2557 &quot;targetLink&quot;: &quot;A String&quot;,
2558 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2559 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2560}</pre>
2561</div>
2562
2563<div class="method">
2564 <code class="details" id="stopReplica">stopReplica(project, instance, x__xgafv=None)</code>
2565 <pre>Stops the replication in the read replica instance.
2566
2567Args:
2568 project: string, ID of the project that contains the read replica. (required)
2569 instance: string, Cloud SQL read replica instance name. (required)
2570 x__xgafv: string, V1 error format.
2571 Allowed values
2572 1 - v1 error format
2573 2 - v2 error format
2574
2575Returns:
2576 An object of the form:
2577
2578 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2579 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2580 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2581 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2582 },
2583 &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**.
2584 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2585 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2586 { # Database instance operation error.
2587 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2588 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2589 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2590 },
2591 ],
2592 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2593 },
2594 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2595 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07002596 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
2597 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
2598 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
2599 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002600 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2601 },
2602 &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**.
2603 &quot;A String&quot;,
2604 ],
2605 &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.
2606 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2607 &quot;offload&quot;: True or False, # Option for export offload.
2608 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2609 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2610 &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.
2611 },
2612 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2613 &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.
2614 &quot;A String&quot;,
2615 ],
2616 },
2617 &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.
2618 },
2619 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2620 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2621 &quot;encryptionOptions&quot;: {
2622 &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.
2623 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2624 &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.
2625 },
2626 },
2627 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2628 &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.
2629 &quot;A String&quot;,
2630 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07002631 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
2632 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
2633 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
2634 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002635 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2636 },
2637 &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.
2638 &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.
2639 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2640 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2641 &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.
2642 },
2643 &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**.
2644 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2645 &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.
2646 &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**
2647 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2648 &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**.
2649 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2650 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2651 &quot;targetLink&quot;: &quot;A String&quot;,
2652 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2653 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2654}</pre>
2655</div>
2656
2657<div class="method">
2658 <code class="details" id="truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</code>
2659 <pre>Truncate MySQL general and slow query log tables MySQL only.
2660
2661Args:
2662 project: string, Project ID of the Cloud SQL project. (required)
2663 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
2664 body: object, The request body.
2665 The object takes the form of:
2666
2667{ # Instance truncate log request.
2668 &quot;truncateLogContext&quot;: { # Database Instance truncate log context. # Contains details about the truncate log operation.
2669 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#truncateLogContext*.
2670 &quot;logType&quot;: &quot;A String&quot;, # The type of log to truncate. Valid values are *MYSQL_GENERAL_TABLE* and *MYSQL_SLOW_TABLE*.
2671 },
2672}
2673
2674 x__xgafv: string, V1 error format.
2675 Allowed values
2676 1 - v1 error format
2677 2 - v2 error format
2678
2679Returns:
2680 An object of the form:
2681
2682 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2683 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2684 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2685 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2686 },
2687 &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**.
2688 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2689 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2690 { # Database instance operation error.
2691 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2692 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2693 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2694 },
2695 ],
2696 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2697 },
2698 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2699 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07002700 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
2701 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
2702 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
2703 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002704 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2705 },
2706 &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**.
2707 &quot;A String&quot;,
2708 ],
2709 &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.
2710 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
2711 &quot;offload&quot;: True or False, # Option for export offload.
2712 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2713 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2714 &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.
2715 },
2716 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2717 &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.
2718 &quot;A String&quot;,
2719 ],
2720 },
2721 &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.
2722 },
2723 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2724 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2725 &quot;encryptionOptions&quot;: {
2726 &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.
2727 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2728 &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.
2729 },
2730 },
2731 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2732 &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.
2733 &quot;A String&quot;,
2734 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07002735 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
2736 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
2737 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
2738 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002739 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2740 },
2741 &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.
2742 &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.
2743 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2744 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
2745 &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.
2746 },
2747 &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**.
2748 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
2749 &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.
2750 &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**
2751 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2752 &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**.
2753 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
2754 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2755 &quot;targetLink&quot;: &quot;A String&quot;,
2756 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2757 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2758}</pre>
2759</div>
2760
2761<div class="method">
2762 <code class="details" id="update">update(project, instance, body=None, x__xgafv=None)</code>
2763 <pre>Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.
2764
2765Args:
2766 project: string, Project ID of the project that contains the instance. (required)
2767 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
2768 body: object, The request body.
2769 The object takes the form of:
2770
2771{ # A Cloud SQL instance resource.
2772 &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.
2773 &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 -07002774 &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 -07002775 &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.
2776 &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*.
2777 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
2778 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionConfiguration**.
2779 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
2780 },
2781 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
2782 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionStatus**.
2783 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
2784 },
2785 &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.
2786 &quot;failoverReplica&quot;: { # The name and status of the failover replica.
2787 &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.
2788 &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.
2789 },
2790 &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.
2791 &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.
2792 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
2793 { # Database instance IP Mapping.
2794 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
2795 &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.
2796 &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.
2797 },
2798 ],
2799 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
2800 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
2801 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
2802 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
2803 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
2804 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
2805 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2806 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
2807 &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.
2808 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
2809 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
2810 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
2811 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -07002812 &quot;sourceInstance&quot;: { # Reference to another Cloud SQL instance. # The reference to Cloud SQL instance if the source is Cloud SQL.
2813 &quot;name&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance being referenced. This does not include the project ID.
2814 &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.
2815 &quot;region&quot;: &quot;A String&quot;, # The region of the Cloud SQL instance being referenced.
2816 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002817 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
2818 },
2819 &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
2820 &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
2821 &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
2822 },
2823 &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.
2824 &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.
2825 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
2826 &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.
2827 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
2828 &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.
2829 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2830 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
2831 &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.
2832 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
2833 &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.
2834 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#mysqlReplicaConfiguration**.
2835 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
2836 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
2837 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
2838 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
2839 &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.
2840 },
2841 },
2842 &quot;replicaNames&quot;: [ # The replicas of the instance.
2843 &quot;A String&quot;,
2844 ],
2845 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
2846 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
2847 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
2848 &quot;canDefer&quot;: True or False,
2849 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
2850 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
2851 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
2852 },
2853 &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.
2854 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2855 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
2856 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
2857 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
2858 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
2859 &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**
2860 &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**.
2861 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
2862 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sslCert.
2863 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2864 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
2865 },
2866 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
2867 &quot;settings&quot;: { # Database instance settings. # The user settings.
2868 &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.
2869 &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.
2870 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
2871 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
2872 },
2873 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
2874 &quot;A String&quot;,
2875 ],
2876 &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).
2877 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
2878 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
2879 &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.
2880 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
2881 },
2882 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
2883 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
2884 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupConfiguration**.
2885 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
2886 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
2887 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
2888 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - **HH:MM**.
2889 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
2890 },
2891 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
2892 &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.
2893 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
2894 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: **PD_SSD** (default) or **PD_HDD**.
2895 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
2896 { # Database flags for Cloud SQL instances.
2897 &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.
2898 &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.
2899 },
2900 ],
2901 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
2902 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
2903 { # Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
2904 &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
2905 &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
2906 &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
2907 },
2908 ],
2909 &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.
2910 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
2911 &quot;queryPlansPerMinute&quot;: 42, # Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.
2912 &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.
2913 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
2914 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
2915 },
2916 &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 -07002917 &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 -07002918 &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**).
2919 { # An entry for an Access Control list.
2920 &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**.
2921 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#aclEntry**.
2922 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
2923 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
2924 },
2925 ],
2926 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
2927 &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.
2928 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
2929 },
2930 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#settings**.
2931 &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.
2932 &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.
2933 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#locationPreference**.
2934 &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.
2935 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
2936 },
2937 &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.
2938 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
2939 &quot;hour&quot;: 42, # hour of day - 0 to 23.
2940 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#maintenanceWindow**.
2941 &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).
2942 },
2943 &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.
2944 &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.
2945 &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.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07002946 &quot;sqlServerAuditConfig&quot;: { # SQL Server specific audit configuration. # SQL Server specific audit configuration.
2947 &quot;bucket&quot;: &quot;A String&quot;, # The name of the destination bucket (e.g., gs://mybucket).
2948 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#sqlServerAuditConfig
2949 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002950 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
2951 &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.
2952 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example **db-custom-1-3840**.
2953 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
2954 &quot;a_key&quot;: &quot;A String&quot;,
2955 },
2956 },
2957 &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.
2958 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
2959 &quot;A String&quot;,
2960 ],
2961}
2962
2963 x__xgafv: string, V1 error format.
2964 Allowed values
2965 1 - v1 error format
2966 2 - v2 error format
2967
2968Returns:
2969 An object of the form:
2970
2971 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2972 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2973 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2974 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
2975 },
2976 &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**.
2977 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2978 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2979 { # Database instance operation error.
2980 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2981 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
2982 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2983 },
2984 ],
2985 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
2986 },
2987 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2988 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07002989 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
2990 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
2991 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
2992 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07002993 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2994 },
2995 &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**.
2996 &quot;A String&quot;,
2997 ],
2998 &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.
2999 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
3000 &quot;offload&quot;: True or False, # Option for export offload.
3001 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3002 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3003 &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.
3004 },
3005 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3006 &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.
3007 &quot;A String&quot;,
3008 ],
3009 },
3010 &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.
3011 },
3012 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
3013 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3014 &quot;encryptionOptions&quot;: {
3015 &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.
3016 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3017 &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.
3018 },
3019 },
3020 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3021 &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.
3022 &quot;A String&quot;,
3023 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -07003024 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
3025 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
3026 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
3027 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
yoshi-code-bota36e3b12021-07-27 00:20:26 -07003028 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3029 },
3030 &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.
3031 &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.
3032 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3033 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
3034 &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.
3035 },
3036 &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**.
3037 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
3038 &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.
3039 &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**
3040 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3041 &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**.
3042 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**
3043 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
3044 &quot;targetLink&quot;: &quot;A String&quot;,
3045 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3046 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3047}</pre>
3048</div>
3049
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07003050</body></html>