blob: ea4d41a6cd6f8223a74e04a52fd1d55cb121986b [file] [log] [blame]
Craig Citroe633be12015-03-02 13:40:36 -08001<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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="sqladmin_v1beta4.html">Cloud SQL Admin API</a> . <a href="sqladmin_v1beta4.instances.html">instances</a></h1>
Craig Citroe633be12015-03-02 13:40:36 -080076<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#addServerCa">addServerCa(project, instance, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070079<p class="firstline">Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070080<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#clone">clone(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070082<p class="firstline">Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.</p>
83<p class="toc_element">
84 <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
Craig Citroe633be12015-03-02 13:40:36 -080086<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#delete">delete(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080088<p class="firstline">Deletes a Cloud SQL instance.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070091<p class="firstline">Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#export">export(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070094<p class="firstline">Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.</p>
Craig Citroe633be12015-03-02 13:40:36 -080095<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#failover">failover(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070097<p class="firstline">Failover the instance to its failover replica instance. Using this operation might cause your instance to restart.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080098<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#get">get(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800100<p class="firstline">Retrieves a resource containing information about a Cloud SQL instance.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#import_">import_(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103<p class="firstline">Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#insert">insert(project, body=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800106<p class="firstline">Creates a new Cloud SQL instance.</p>
107<p class="toc_element">
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700108 <code><a href="#list">list(project, pageToken=None, maxResults=None, filter=None, x__xgafv=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700109<p class="firstline">Lists instances under a given project.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#listServerCas">listServerCas(project, instance, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700112<p class="firstline">Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700113<p class="toc_element">
Craig Citroe633be12015-03-02 13:40:36 -0800114 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
115<p class="firstline">Retrieves the next page of results.</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#patch">patch(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700118<p class="firstline">Updates settings of a Cloud SQL instance. This method supports patch semantics.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800119<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code><a href="#promoteReplica">promoteReplica(project, instance, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700121<p class="firstline">Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800122<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700123 <code><a href="#resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700124<p class="firstline">Deletes all client certificates and generates a new server SSL certificate for the instance.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800125<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700126 <code><a href="#restart">restart(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800127<p class="firstline">Restarts a Cloud SQL instance.</p>
128<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700129 <code><a href="#restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700130<p class="firstline">Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800131<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700132 <code><a href="#rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700133<p class="firstline">Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700134<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 <code><a href="#startReplica">startReplica(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800136<p class="firstline">Starts the replication in the read replica instance.</p>
137<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700138 <code><a href="#stopReplica">stopReplica(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800139<p class="firstline">Stops the replication in the read replica instance.</p>
140<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 <code><a href="#truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800142<p class="firstline">Truncate MySQL general and slow query log tables</p>
143<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700144 <code><a href="#update">update(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700145<p class="firstline">Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800146<h3>Method Details</h3>
147<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700148 <code class="details" id="addServerCa">addServerCa(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700149 <pre>Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in.
Craig Citroe633be12015-03-02 13:40:36 -0800150
151Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700152 project: string, Project ID of the project that contains the instance. (required)
153 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700154 x__xgafv: string, V1 error format.
155 Allowed values
156 1 - v1 error format
157 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800158
159Returns:
160 An object of the form:
161
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700162 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700163 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700164 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700165 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
166 &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.
167 &quot;A String&quot;,
168 ],
169 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
170 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700171 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
172 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
173 &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.
174 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700175 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
176 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700177 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700178 &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.
179 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700180 },
181 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700182 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700183 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
184 &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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
185 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
186 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
187 &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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
188 },
189 &quot;schemaOnly&quot;: True or False, # Export only schemas.
190 &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.
191 &quot;A String&quot;,
192 ],
193 },
194 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
195 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
196 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
197 },
198 &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.
199 &quot;offload&quot;: True or False, # Option for export offload.
200 &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.
201 &quot;A String&quot;,
202 ],
203 },
204 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
205 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
206 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
207 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
208 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
209 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
210 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
211 &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*
212 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
213 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
214 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
215 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
216 { # Database instance operation error.
217 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
218 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
219 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
220 },
221 ],
222 },
223 &quot;targetLink&quot;: &quot;A String&quot;,
224 &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.
225 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700226 }</pre>
227</div>
228
229<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700230 <code class="details" id="clone">clone(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700231 <pre>Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700232
233Args:
234 project: string, Project ID of the source as well as the clone Cloud SQL instance. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700235 instance: string, The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700236 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700237 The object takes the form of:
238
239{ # Database instance clone request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700240 &quot;cloneContext&quot;: { # Database instance clone context. # Contains details about the clone operation.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700241 &quot;pointInTime&quot;: &quot;A String&quot;, # Reserved for future use.
Bu Sun Kim65020912020-05-20 12:08:20 -0700242 &quot;destinationInstanceName&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance to be created as a clone.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700243 &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.
244 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#binLogCoordinates*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700245 &quot;binLogPosition&quot;: &quot;A String&quot;, # Position (offset) within the binary log file.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700246 &quot;binLogFileName&quot;: &quot;A String&quot;, # Name of the binary log file for a Cloud SQL instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700247 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700248 &quot;pitrTimestampMs&quot;: &quot;A String&quot;, # Reserved for future use.
249 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#cloneContext*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700250 },
251 }
252
Dan O'Mearadd494642020-05-01 07:42:23 -0700253 x__xgafv: string, V1 error format.
254 Allowed values
255 1 - v1 error format
256 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700257
258Returns:
259 An object of the form:
260
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700261 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700262 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700263 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700264 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
265 &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.
266 &quot;A String&quot;,
267 ],
268 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
269 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700270 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
271 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
272 &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.
273 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700274 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
275 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700276 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700277 &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.
278 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700279 },
280 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700281 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700282 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
283 &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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
284 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
285 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
286 &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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
287 },
288 &quot;schemaOnly&quot;: True or False, # Export only schemas.
289 &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.
290 &quot;A String&quot;,
291 ],
292 },
293 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
294 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
295 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
296 },
297 &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.
298 &quot;offload&quot;: True or False, # Option for export offload.
299 &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.
300 &quot;A String&quot;,
301 ],
302 },
303 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
304 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
305 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
306 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
307 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
308 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
309 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
310 &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*
311 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
312 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
313 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
314 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
315 { # Database instance operation error.
316 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
317 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
318 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
319 },
320 ],
321 },
322 &quot;targetLink&quot;: &quot;A String&quot;,
323 &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.
324 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Craig Citroe633be12015-03-02 13:40:36 -0800325 }</pre>
326</div>
327
328<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700329 <code class="details" id="close">close()</code>
330 <pre>Close httplib2 connections.</pre>
331</div>
332
333<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700334 <code class="details" id="delete">delete(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800335 <pre>Deletes a Cloud SQL instance.
336
337Args:
338 project: string, Project ID of the project that contains the instance to be deleted. (required)
339 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700340 x__xgafv: string, V1 error format.
341 Allowed values
342 1 - v1 error format
343 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800344
345Returns:
346 An object of the form:
347
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700348 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700349 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700350 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700351 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
352 &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.
353 &quot;A String&quot;,
354 ],
355 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
356 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700357 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
358 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
359 &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.
360 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700361 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
362 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700363 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700364 &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.
365 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700366 },
367 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700368 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700369 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
370 &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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
371 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
372 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
373 &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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
374 },
375 &quot;schemaOnly&quot;: True or False, # Export only schemas.
376 &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.
377 &quot;A String&quot;,
378 ],
379 },
380 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
381 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
382 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
383 },
384 &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.
385 &quot;offload&quot;: True or False, # Option for export offload.
386 &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.
387 &quot;A String&quot;,
388 ],
389 },
390 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
391 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
392 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
393 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
394 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
395 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
396 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
397 &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*
398 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
399 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
400 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
401 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
402 { # Database instance operation error.
403 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
404 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
405 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
406 },
407 ],
408 },
409 &quot;targetLink&quot;: &quot;A String&quot;,
410 &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.
411 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700412 }</pre>
413</div>
414
415<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700416 <code class="details" id="demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700417 <pre>Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700418
419Args:
420 project: string, ID of the project that contains the instance. (required)
421 instance: string, Cloud SQL instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700422 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700423 The object takes the form of:
424
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700425{ # Database demote primary instance request.
426 &quot;demoteMasterContext&quot;: { # Database instance demote primary instance context. # Contains details about the demoteMaster operation.
427 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as on-premises primary instance in the replication setup.
428 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#demoteMasterContext*.
429 &quot;verifyGtidConsistency&quot;: True or False, # Verify GTID consistency for demote operation. Default value: *True*. Second Generation instances only. Setting this flag to false enables you to bypass GTID consistency check between on-premises primary instance and Cloud SQL instance during the demotion operation but also exposes you to the risk of future replication failures. Change the value only if you know the reason for the GTID divergence and are confident that doing so will not cause any replication issues.
430 &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.
431 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#demoteMasterConfiguration*.
432 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700433 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700434 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
435 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700436 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
437 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#demoteMasterMysqlReplicaConfiguration*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700438 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
Bu Sun Kim65020912020-05-20 12:08:20 -0700439 },
440 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700441 },
442 }
443
Dan O'Mearadd494642020-05-01 07:42:23 -0700444 x__xgafv: string, V1 error format.
445 Allowed values
446 1 - v1 error format
447 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700448
449Returns:
450 An object of the form:
451
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700452 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700453 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700454 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700455 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
456 &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.
457 &quot;A String&quot;,
458 ],
459 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
460 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700461 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
462 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
463 &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.
464 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700465 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
466 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700467 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700468 &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.
469 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700470 },
471 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700472 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700473 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
474 &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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
475 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
476 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
477 &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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
478 },
479 &quot;schemaOnly&quot;: True or False, # Export only schemas.
480 &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.
481 &quot;A String&quot;,
482 ],
483 },
484 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
485 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
486 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
487 },
488 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
489 &quot;offload&quot;: True or False, # Option for export offload.
490 &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.
491 &quot;A String&quot;,
492 ],
493 },
494 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
495 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
496 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
497 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
498 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
499 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
500 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
501 &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*
502 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
503 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
504 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
505 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
506 { # Database instance operation error.
507 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
508 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
509 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
510 },
511 ],
512 },
513 &quot;targetLink&quot;: &quot;A String&quot;,
514 &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.
515 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Craig Citroe633be12015-03-02 13:40:36 -0800516 }</pre>
517</div>
518
519<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700520 <code class="details" id="export">export(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700521 <pre>Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.
Craig Citroe633be12015-03-02 13:40:36 -0800522
523Args:
524 project: string, Project ID of the project that contains the instance to be exported. (required)
525 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700526 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800527 The object takes the form of:
528
529{ # Database instance export request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700530 &quot;exportContext&quot;: { # Database instance export context. # Contains details about the export operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700531 &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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
Bu Sun Kim65020912020-05-20 12:08:20 -0700532 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700533 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
534 &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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
535 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700536 &quot;schemaOnly&quot;: True or False, # Export only schemas.
537 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700538 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800539 ],
540 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700541 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
542 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
543 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
544 },
545 &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.
546 &quot;offload&quot;: True or False, # Option for export offload.
547 &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.
548 &quot;A String&quot;,
549 ],
Craig Citroe633be12015-03-02 13:40:36 -0800550 },
551 }
552
Dan O'Mearadd494642020-05-01 07:42:23 -0700553 x__xgafv: string, V1 error format.
554 Allowed values
555 1 - v1 error format
556 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800557
558Returns:
559 An object of the form:
560
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700561 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700562 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700563 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700564 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
565 &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.
566 &quot;A String&quot;,
567 ],
568 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
569 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700570 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
571 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
572 &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.
573 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700574 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
575 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700576 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700577 &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.
578 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700579 },
580 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700581 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700582 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
583 &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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
584 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
585 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
586 &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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
587 },
588 &quot;schemaOnly&quot;: True or False, # Export only schemas.
589 &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.
590 &quot;A String&quot;,
591 ],
592 },
593 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
594 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
595 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
596 },
597 &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.
598 &quot;offload&quot;: True or False, # Option for export offload.
599 &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.
600 &quot;A String&quot;,
601 ],
602 },
603 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
604 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
605 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
606 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
607 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
608 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
609 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
610 &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*
611 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
612 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
613 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
614 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
615 { # Database instance operation error.
616 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
617 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
618 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
619 },
620 ],
621 },
622 &quot;targetLink&quot;: &quot;A String&quot;,
623 &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.
624 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800625 }</pre>
626</div>
627
628<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700629 <code class="details" id="failover">failover(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700630 <pre>Failover the instance to its failover replica instance. Using this operation might cause your instance to restart.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800631
632Args:
633 project: string, ID of the project that contains the read replica. (required)
634 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700635 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800636 The object takes the form of:
637
638{ # Instance failover request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700639 &quot;failoverContext&quot;: { # Database instance failover context. # Failover Context.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700640 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#failoverContext*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700641 &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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800642 },
643 }
644
Dan O'Mearadd494642020-05-01 07:42:23 -0700645 x__xgafv: string, V1 error format.
646 Allowed values
647 1 - v1 error format
648 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800649
650Returns:
651 An object of the form:
652
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700653 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700654 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700655 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700656 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
657 &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.
658 &quot;A String&quot;,
659 ],
660 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
661 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700662 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
663 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
664 &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.
665 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700666 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
667 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700668 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700669 &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.
670 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700671 },
672 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700673 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700674 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
675 &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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
676 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
677 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
678 &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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
679 },
680 &quot;schemaOnly&quot;: True or False, # Export only schemas.
681 &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.
682 &quot;A String&quot;,
683 ],
684 },
685 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
686 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
687 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
688 },
689 &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.
690 &quot;offload&quot;: True or False, # Option for export offload.
691 &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.
692 &quot;A String&quot;,
693 ],
694 },
695 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
696 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
697 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
698 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
699 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
700 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
701 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
702 &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*
703 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
704 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
705 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
706 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
707 { # Database instance operation error.
708 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
709 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
710 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
711 },
712 ],
713 },
714 &quot;targetLink&quot;: &quot;A String&quot;,
715 &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.
716 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Craig Citroe633be12015-03-02 13:40:36 -0800717 }</pre>
718</div>
719
720<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700721 <code class="details" id="get">get(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800722 <pre>Retrieves a resource containing information about a Cloud SQL instance.
723
724Args:
725 project: string, Project ID of the project that contains the instance. (required)
726 instance: string, Database instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700727 x__xgafv: string, V1 error format.
728 Allowed values
729 1 - v1 error format
730 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800731
732Returns:
733 An object of the form:
734
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700735 { # A Cloud SQL instance resource. Next field: 36
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700736 &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.
737 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
738 &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.
739 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
740 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
741 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
742 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
743 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
744 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
745 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
746 },
747 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfies physical zone separation. Reserved for future use.
748 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
749 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
750 &quot;canDefer&quot;: True or False,
751 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
752 },
753 &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* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.
754 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
755 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
756 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
757 },
758 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
759 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
760 &quot;A String&quot;,
761 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700762 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700763 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
764 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
765 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
766 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
767 &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.
768 &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.
769 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
770 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
771 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
772 &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.
773 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
774 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
775 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
776 &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.
777 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
778 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
779 },
780 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
781 &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.
782 },
783 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
784 &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.
785 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
786 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
787 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
788 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
789 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
790 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*
791 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
792 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
793 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
794 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
795 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
796 },
797 &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.
798 &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.
799 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
800 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
801 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
802 },
803 &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 has been stopped by owner. It is not currently running, but it&#x27;s ready to be restarted. *SUSPENDED*: The instance is not available, for example due to problems with billing. 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.
804 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
805 &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.
806 &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. This property is applicable only to Second Generation instances.
807 },
808 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
809 { # Database instance IP Mapping.
810 &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.
811 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired.
812 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
813 },
814 ],
815 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700816 &quot;settings&quot;: { # Database instance settings. # The user settings.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700817 &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.
818 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
819 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700820 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700821 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
822 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
823 &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 deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
824 &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
825 &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 deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
826 },
827 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700828 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
829 &quot;A String&quot;,
830 ],
831 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
832 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
833 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
834 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
835 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
836 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
837 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
838 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
839 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
840 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
841 &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.
842 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
843 },
844 },
845 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
846 { # Database flags for Cloud SQL instances.
847 &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.
848 &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 for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation.
849 },
850 ],
851 &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.
852 &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*).
853 { # An entry for an Access Control list.
854 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
855 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
856 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
857 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
858 },
859 ],
860 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
861 &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.
862 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
863 },
864 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances).
865 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
866 &quot;a_key&quot;: &quot;A String&quot;,
867 },
868 &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.
869 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
870 &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.
871 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.
872 &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.
873 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
874 &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.
875 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
876 },
877 &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.
878 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
879 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
880 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
881 &quot;hour&quot;: 42, # hour of day - 0 to 23.
882 },
883 &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.
884 &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.
885 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
886 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
887 &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.
888 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
889 &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.
890 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
891 &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.
892 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700893 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700894 &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;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700896 &quot;replicaNames&quot;: [ # The replicas of the instance.
897 &quot;A String&quot;,
898 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700899 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700900 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700901 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700902 }</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800903</div>
904
905<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700906 <code class="details" id="import_">import_(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700907 <pre>Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.
Craig Citroe633be12015-03-02 13:40:36 -0800908
909Args:
910 project: string, Project ID of the project that contains the instance. (required)
911 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700912 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800913 The object takes the form of:
914
915{ # Database instance import request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700916 &quot;importContext&quot;: { # Database instance import context. # Contains details about the import operation.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700917 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700918 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700919 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700920 &quot;A String&quot;,
921 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700922 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700923 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700924 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
925 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
926 &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.
927 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700928 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
929 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700930 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700931 &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.
932 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700933 },
934 },
Craig Citroe633be12015-03-02 13:40:36 -0800935 },
936 }
937
Dan O'Mearadd494642020-05-01 07:42:23 -0700938 x__xgafv: string, V1 error format.
939 Allowed values
940 1 - v1 error format
941 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800942
943Returns:
944 An object of the form:
945
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700946 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700947 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700948 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700949 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
950 &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.
951 &quot;A String&quot;,
952 ],
953 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
954 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700955 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
956 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
957 &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.
958 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700959 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
960 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700961 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700962 &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.
963 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700964 },
965 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700966 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700967 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
968 &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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
969 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
970 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
971 &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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
972 },
973 &quot;schemaOnly&quot;: True or False, # Export only schemas.
974 &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.
975 &quot;A String&quot;,
976 ],
977 },
978 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
979 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
980 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
981 },
982 &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.
983 &quot;offload&quot;: True or False, # Option for export offload.
984 &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.
985 &quot;A String&quot;,
986 ],
987 },
988 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
989 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
990 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
991 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
992 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
993 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
994 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
995 &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*
996 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
997 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
998 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
999 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1000 { # Database instance operation error.
1001 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1002 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1003 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1004 },
1005 ],
1006 },
1007 &quot;targetLink&quot;: &quot;A String&quot;,
1008 &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.
1009 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Craig Citroe633be12015-03-02 13:40:36 -08001010 }</pre>
1011</div>
1012
1013<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001014 <code class="details" id="insert">insert(project, body=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08001015 <pre>Creates a new Cloud SQL instance.
1016
1017Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001018 project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001019 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08001020 The object takes the form of:
1021
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001022{ # A Cloud SQL instance resource. Next field: 36
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001023 &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.
1024 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1025 &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.
1026 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1027 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1028 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1029 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1030 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1031 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1032 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1033 },
1034 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfies physical zone separation. Reserved for future use.
1035 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1036 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1037 &quot;canDefer&quot;: True or False,
1038 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1039 },
1040 &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* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.
1041 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
1042 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
1043 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1044 },
1045 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1046 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1047 &quot;A String&quot;,
1048 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001049 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001050 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1051 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1052 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
1053 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1054 &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.
1055 &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.
1056 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
1057 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1058 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1059 &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.
1060 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1061 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1062 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1063 &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.
1064 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1065 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1066 },
1067 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1068 &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.
1069 },
1070 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1071 &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.
1072 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1073 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1074 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1075 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1076 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1077 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*
1078 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1079 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1080 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1081 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1082 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1083 },
1084 &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.
1085 &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.
1086 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
1087 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1088 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
1089 },
1090 &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 has been stopped by owner. It is not currently running, but it&#x27;s ready to be restarted. *SUSPENDED*: The instance is not available, for example due to problems with billing. 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.
1091 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
1092 &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.
1093 &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. This property is applicable only to Second Generation instances.
1094 },
1095 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1096 { # Database instance IP Mapping.
1097 &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.
1098 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired.
1099 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1100 },
1101 ],
1102 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001103 &quot;settings&quot;: { # Database instance settings. # The user settings.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001104 &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.
1105 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
1106 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001107 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001108 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1109 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1110 &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 deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1111 &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
1112 &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 deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1113 },
1114 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001115 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
1116 &quot;A String&quot;,
1117 ],
1118 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1119 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
1120 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1121 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
1122 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1123 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
1124 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1125 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1126 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1127 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1128 &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.
1129 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1130 },
1131 },
1132 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1133 { # Database flags for Cloud SQL instances.
1134 &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.
1135 &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 for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation.
1136 },
1137 ],
1138 &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.
1139 &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*).
1140 { # An entry for an Access Control list.
1141 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
1142 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1143 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1144 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1145 },
1146 ],
1147 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1148 &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.
1149 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1150 },
1151 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances).
1152 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1153 &quot;a_key&quot;: &quot;A String&quot;,
1154 },
1155 &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.
1156 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
1157 &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.
1158 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.
1159 &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.
1160 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
1161 &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.
1162 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1163 },
1164 &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.
1165 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
1166 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
1167 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1168 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1169 },
1170 &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.
1171 &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.
1172 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1173 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1174 &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.
1175 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
1176 &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.
1177 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1178 &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.
1179 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001180 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001181 &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.
1182 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001183 &quot;replicaNames&quot;: [ # The replicas of the instance.
1184 &quot;A String&quot;,
1185 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001186 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001187 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001188 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001189}
Craig Citroe633be12015-03-02 13:40:36 -08001190
Dan O'Mearadd494642020-05-01 07:42:23 -07001191 x__xgafv: string, V1 error format.
1192 Allowed values
1193 1 - v1 error format
1194 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001195
1196Returns:
1197 An object of the form:
1198
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001199 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001200 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001201 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001202 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1203 &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.
1204 &quot;A String&quot;,
1205 ],
1206 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1207 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001208 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
1209 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1210 &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.
1211 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001212 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1213 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001214 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001215 &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.
1216 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001217 },
1218 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001219 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001220 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1221 &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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
1222 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1223 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1224 &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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
1225 },
1226 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1227 &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.
1228 &quot;A String&quot;,
1229 ],
1230 },
1231 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1232 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
1233 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1234 },
1235 &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.
1236 &quot;offload&quot;: True or False, # Option for export offload.
1237 &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.
1238 &quot;A String&quot;,
1239 ],
1240 },
1241 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1242 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1243 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1244 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1245 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1246 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1247 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1248 &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*
1249 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1250 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1251 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
1252 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1253 { # Database instance operation error.
1254 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1255 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1256 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1257 },
1258 ],
1259 },
1260 &quot;targetLink&quot;: &quot;A String&quot;,
1261 &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.
1262 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Craig Citroe633be12015-03-02 13:40:36 -08001263 }</pre>
1264</div>
1265
1266<div class="method">
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001267 <code class="details" id="list">list(project, pageToken=None, maxResults=None, filter=None, x__xgafv=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -07001268 <pre>Lists instances under a given project.
Craig Citroe633be12015-03-02 13:40:36 -08001269
1270Args:
1271 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001272 pageToken: string, A previously-returned page token representing part of the larger set of results to view.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001273 maxResults: integer, The maximum number of results to return per response.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001274 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001275 x__xgafv: string, V1 error format.
1276 Allowed values
1277 1 - v1 error format
1278 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001279
1280Returns:
1281 An object of the form:
1282
1283 { # Database instances list response.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001284 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instancesList*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001285 &quot;warnings&quot;: [ # List of warnings that occurred while handling the request.
1286 { # An Admin API warning message.
1287 &quot;code&quot;: &quot;A String&quot;, # Code to uniquely identify the warning type.
1288 &quot;message&quot;: &quot;A String&quot;, # The warning message.
1289 },
1290 ],
1291 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001292 &quot;items&quot;: [ # List of database instance resources.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001293 { # A Cloud SQL instance resource. Next field: 36
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001294 &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.
1295 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1296 &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.
1297 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1298 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1299 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1300 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1301 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1302 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1303 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1304 },
1305 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfies physical zone separation. Reserved for future use.
1306 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1307 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1308 &quot;canDefer&quot;: True or False,
1309 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1310 },
1311 &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* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.
1312 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
1313 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
1314 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1315 },
1316 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1317 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1318 &quot;A String&quot;,
1319 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001320 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001321 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1322 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1323 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
1324 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1325 &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.
1326 &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.
1327 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
1328 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1329 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1330 &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.
1331 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1332 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1333 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1334 &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.
1335 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1336 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1337 },
1338 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1339 &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.
1340 },
1341 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1342 &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.
1343 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1344 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1345 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1346 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1347 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1348 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*
1349 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1350 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1351 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1352 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1353 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1354 },
1355 &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.
1356 &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.
1357 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
1358 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1359 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
1360 },
1361 &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 has been stopped by owner. It is not currently running, but it&#x27;s ready to be restarted. *SUSPENDED*: The instance is not available, for example due to problems with billing. 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.
1362 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
1363 &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.
1364 &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. This property is applicable only to Second Generation instances.
1365 },
1366 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1367 { # Database instance IP Mapping.
1368 &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.
1369 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired.
1370 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1371 },
1372 ],
1373 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001374 &quot;settings&quot;: { # Database instance settings. # The user settings.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001375 &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.
1376 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
1377 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001378 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001379 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1380 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1381 &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 deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1382 &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
1383 &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 deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1384 },
1385 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001386 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
1387 &quot;A String&quot;,
1388 ],
1389 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1390 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
1391 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1392 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
1393 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1394 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
1395 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1396 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1397 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1398 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1399 &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.
1400 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1401 },
1402 },
1403 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1404 { # Database flags for Cloud SQL instances.
1405 &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.
1406 &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 for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation.
1407 },
1408 ],
1409 &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.
1410 &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*).
1411 { # An entry for an Access Control list.
1412 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
1413 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1414 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1415 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1416 },
1417 ],
1418 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1419 &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.
1420 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1421 },
1422 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances).
1423 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1424 &quot;a_key&quot;: &quot;A String&quot;,
1425 },
1426 &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.
1427 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
1428 &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.
1429 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.
1430 &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.
1431 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
1432 &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.
1433 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1434 },
1435 &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.
1436 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
1437 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
1438 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1439 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1440 },
1441 &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.
1442 &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.
1443 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1444 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1445 &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.
1446 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
1447 &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.
1448 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1449 &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.
1450 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
Craig Citroe633be12015-03-02 13:40:36 -08001451 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001452 &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.
1453 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001454 &quot;replicaNames&quot;: [ # The replicas of the instance.
1455 &quot;A String&quot;,
1456 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001457 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001458 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001459 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001460 },
Craig Citroe633be12015-03-02 13:40:36 -08001461 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001462 }</pre>
1463</div>
1464
1465<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001466 <code class="details" id="listServerCas">listServerCas(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001467 <pre>Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001468
1469Args:
1470 project: string, Project ID of the project that contains the instance. (required)
1471 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001472 x__xgafv: string, V1 error format.
1473 Allowed values
1474 1 - v1 error format
1475 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001476
1477Returns:
1478 An object of the form:
1479
1480 { # Instances ListServerCas response.
Bu Sun Kim65020912020-05-20 12:08:20 -07001481 &quot;certs&quot;: [ # List of server CA certificates for the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001482 { # SslCerts Resource
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001483 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001484 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1485 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1486 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*
1487 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001488 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001489 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1490 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1491 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001492 },
1493 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001494 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instancesListServerCas*.
1495 &quot;activeVersion&quot;: &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08001496 }</pre>
1497</div>
1498
1499<div class="method">
1500 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1501 <pre>Retrieves the next page of results.
1502
1503Args:
1504 previous_request: The request for the previous page. (required)
1505 previous_response: The response from the request for the previous page. (required)
1506
1507Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001508 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citroe633be12015-03-02 13:40:36 -08001509 page. Returns None if there are no more items in the collection.
1510 </pre>
1511</div>
1512
1513<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001514 <code class="details" id="patch">patch(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001515 <pre>Updates settings of a Cloud SQL instance. This method supports patch semantics.
Craig Citroe633be12015-03-02 13:40:36 -08001516
1517Args:
1518 project: string, Project ID of the project that contains the instance. (required)
1519 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001520 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08001521 The object takes the form of:
1522
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001523{ # A Cloud SQL instance resource. Next field: 36
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001524 &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.
1525 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1526 &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.
1527 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1528 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1529 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1530 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1531 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1532 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1533 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1534 },
1535 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfies physical zone separation. Reserved for future use.
1536 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1537 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1538 &quot;canDefer&quot;: True or False,
1539 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1540 },
1541 &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* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.
1542 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
1543 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
1544 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1545 },
1546 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1547 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1548 &quot;A String&quot;,
1549 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001550 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001551 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1552 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1553 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
1554 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1555 &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.
1556 &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.
1557 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
1558 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1559 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1560 &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.
1561 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1562 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1563 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1564 &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.
1565 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1566 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1567 },
1568 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1569 &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.
1570 },
1571 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1572 &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.
1573 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1574 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1575 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1576 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1577 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1578 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*
1579 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1580 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1581 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1582 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1583 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1584 },
1585 &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.
1586 &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.
1587 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
1588 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1589 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
1590 },
1591 &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 has been stopped by owner. It is not currently running, but it&#x27;s ready to be restarted. *SUSPENDED*: The instance is not available, for example due to problems with billing. 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.
1592 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
1593 &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.
1594 &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. This property is applicable only to Second Generation instances.
1595 },
1596 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1597 { # Database instance IP Mapping.
1598 &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.
1599 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired.
1600 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1601 },
1602 ],
1603 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001604 &quot;settings&quot;: { # Database instance settings. # The user settings.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001605 &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.
1606 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
1607 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001608 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001609 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1610 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1611 &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 deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1612 &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
1613 &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 deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1614 },
1615 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001616 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
1617 &quot;A String&quot;,
1618 ],
1619 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1620 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
1621 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1622 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
1623 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1624 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
1625 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1626 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1627 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1628 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1629 &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.
1630 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1631 },
1632 },
1633 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1634 { # Database flags for Cloud SQL instances.
1635 &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.
1636 &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 for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation.
1637 },
1638 ],
1639 &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.
1640 &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*).
1641 { # An entry for an Access Control list.
1642 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
1643 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1644 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1645 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1646 },
1647 ],
1648 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1649 &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.
1650 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1651 },
1652 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances).
1653 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1654 &quot;a_key&quot;: &quot;A String&quot;,
1655 },
1656 &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.
1657 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
1658 &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.
1659 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.
1660 &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.
1661 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
1662 &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.
1663 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1664 },
1665 &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.
1666 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
1667 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
1668 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1669 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1670 },
1671 &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.
1672 &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.
1673 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1674 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1675 &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.
1676 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
1677 &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.
1678 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1679 &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.
1680 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001681 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001682 &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.
1683 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001684 &quot;replicaNames&quot;: [ # The replicas of the instance.
1685 &quot;A String&quot;,
1686 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001687 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001688 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001689 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001690}
Craig Citroe633be12015-03-02 13:40:36 -08001691
Dan O'Mearadd494642020-05-01 07:42:23 -07001692 x__xgafv: string, V1 error format.
1693 Allowed values
1694 1 - v1 error format
1695 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001696
1697Returns:
1698 An object of the form:
1699
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001700 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001701 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001702 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001703 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1704 &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.
1705 &quot;A String&quot;,
1706 ],
1707 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1708 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001709 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
1710 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1711 &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.
1712 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001713 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1714 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001715 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001716 &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.
1717 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001718 },
1719 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001720 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001721 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1722 &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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
1723 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1724 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1725 &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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
1726 },
1727 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1728 &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.
1729 &quot;A String&quot;,
1730 ],
1731 },
1732 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1733 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
1734 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1735 },
1736 &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.
1737 &quot;offload&quot;: True or False, # Option for export offload.
1738 &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.
1739 &quot;A String&quot;,
1740 ],
1741 },
1742 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1743 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1744 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1745 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1746 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1747 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1748 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1749 &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*
1750 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1751 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1752 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
1753 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1754 { # Database instance operation error.
1755 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1756 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1757 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1758 },
1759 ],
1760 },
1761 &quot;targetLink&quot;: &quot;A String&quot;,
1762 &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.
1763 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Craig Citroe633be12015-03-02 13:40:36 -08001764 }</pre>
1765</div>
1766
1767<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001768 <code class="details" id="promoteReplica">promoteReplica(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001769 <pre>Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.
Craig Citroe633be12015-03-02 13:40:36 -08001770
1771Args:
1772 project: string, ID of the project that contains the read replica. (required)
1773 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001774 x__xgafv: string, V1 error format.
1775 Allowed values
1776 1 - v1 error format
1777 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001778
1779Returns:
1780 An object of the form:
1781
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001782 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001783 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001784 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001785 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1786 &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.
1787 &quot;A String&quot;,
1788 ],
1789 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1790 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001791 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
1792 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1793 &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.
1794 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001795 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1796 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001797 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001798 &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.
1799 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001800 },
1801 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001802 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001803 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1804 &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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
1805 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1806 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1807 &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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
1808 },
1809 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1810 &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.
1811 &quot;A String&quot;,
1812 ],
1813 },
1814 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1815 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
1816 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1817 },
1818 &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.
1819 &quot;offload&quot;: True or False, # Option for export offload.
1820 &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.
1821 &quot;A String&quot;,
1822 ],
1823 },
1824 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1825 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1826 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1827 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1828 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1829 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1830 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1831 &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*
1832 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1833 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1834 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
1835 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1836 { # Database instance operation error.
1837 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1838 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1839 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1840 },
1841 ],
1842 },
1843 &quot;targetLink&quot;: &quot;A String&quot;,
1844 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1845 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Craig Citroe633be12015-03-02 13:40:36 -08001846 }</pre>
1847</div>
1848
1849<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001850 <code class="details" id="resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001851 <pre>Deletes all client certificates and generates a new server SSL certificate for the instance.
Craig Citroe633be12015-03-02 13:40:36 -08001852
1853Args:
1854 project: string, Project ID of the project that contains the instance. (required)
1855 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001856 x__xgafv: string, V1 error format.
1857 Allowed values
1858 1 - v1 error format
1859 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001860
1861Returns:
1862 An object of the form:
1863
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001864 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001865 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001866 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001867 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1868 &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.
1869 &quot;A String&quot;,
1870 ],
1871 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1872 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001873 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
1874 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1875 &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.
1876 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001877 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1878 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001879 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001880 &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.
1881 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001882 },
1883 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001884 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001885 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1886 &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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
1887 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1888 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1889 &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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
1890 },
1891 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1892 &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.
1893 &quot;A String&quot;,
1894 ],
1895 },
1896 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1897 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
1898 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1899 },
1900 &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.
1901 &quot;offload&quot;: True or False, # Option for export offload.
1902 &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.
1903 &quot;A String&quot;,
1904 ],
1905 },
1906 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1907 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1908 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1909 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1910 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1911 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1912 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1913 &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*
1914 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1915 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1916 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
1917 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1918 { # Database instance operation error.
1919 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1920 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1921 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1922 },
1923 ],
1924 },
1925 &quot;targetLink&quot;: &quot;A String&quot;,
1926 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1927 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Craig Citroe633be12015-03-02 13:40:36 -08001928 }</pre>
1929</div>
1930
1931<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001932 <code class="details" id="restart">restart(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08001933 <pre>Restarts a Cloud SQL instance.
1934
1935Args:
1936 project: string, Project ID of the project that contains the instance to be restarted. (required)
1937 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001938 x__xgafv: string, V1 error format.
1939 Allowed values
1940 1 - v1 error format
1941 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001942
1943Returns:
1944 An object of the form:
1945
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001946 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001947 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001948 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001949 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1950 &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.
1951 &quot;A String&quot;,
1952 ],
1953 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1954 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001955 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
1956 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1957 &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.
1958 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001959 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1960 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001961 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001962 &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.
1963 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001964 },
1965 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001966 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001967 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1968 &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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
1969 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1970 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1971 &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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
1972 },
1973 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1974 &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.
1975 &quot;A String&quot;,
1976 ],
1977 },
1978 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1979 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
1980 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1981 },
1982 &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.
1983 &quot;offload&quot;: True or False, # Option for export offload.
1984 &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.
1985 &quot;A String&quot;,
1986 ],
1987 },
1988 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1989 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1990 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1991 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1992 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1993 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1994 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1995 &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*
1996 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1997 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1998 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
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;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2003 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2004 },
2005 ],
2006 },
2007 &quot;targetLink&quot;: &quot;A String&quot;,
2008 &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.
2009 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Craig Citroe633be12015-03-02 13:40:36 -08002010 }</pre>
2011</div>
2012
2013<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002014 <code class="details" id="restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002015 <pre>Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.
Craig Citroe633be12015-03-02 13:40:36 -08002016
2017Args:
2018 project: string, Project ID of the project that contains the instance. (required)
2019 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002020 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08002021 The object takes the form of:
2022
2023{ # Database instance restore backup request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002024 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002025 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#restoreBackupContext*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002026 &quot;backupRunId&quot;: &quot;A String&quot;, # The ID of the backup run to restore from.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002027 &quot;project&quot;: &quot;A String&quot;, # The full project ID of the source instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002028 &quot;instanceId&quot;: &quot;A String&quot;, # The ID of the instance that the backup was taken from.
Craig Citroe633be12015-03-02 13:40:36 -08002029 },
2030 }
2031
Dan O'Mearadd494642020-05-01 07:42:23 -07002032 x__xgafv: string, V1 error format.
2033 Allowed values
2034 1 - v1 error format
2035 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002036
2037Returns:
2038 An object of the form:
2039
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002040 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002041 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002042 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002043 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2044 &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.
2045 &quot;A String&quot;,
2046 ],
2047 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2048 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002049 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
2050 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2051 &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.
2052 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002053 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2054 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002055 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002056 &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.
2057 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002058 },
2059 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002060 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002061 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2062 &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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
2063 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2064 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2065 &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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
2066 },
2067 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2068 &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.
2069 &quot;A String&quot;,
2070 ],
2071 },
2072 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2073 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
2074 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2075 },
2076 &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.
2077 &quot;offload&quot;: True or False, # Option for export offload.
2078 &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.
2079 &quot;A String&quot;,
2080 ],
2081 },
2082 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2083 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2084 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2085 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2086 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2087 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2088 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2089 &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*
2090 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2091 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2092 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
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;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2097 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2098 },
2099 ],
2100 },
2101 &quot;targetLink&quot;: &quot;A String&quot;,
2102 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
2103 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002104 }</pre>
2105</div>
2106
2107<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002108 <code class="details" id="rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002109 <pre>Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002110
2111Args:
2112 project: string, Project ID of the project that contains the instance. (required)
2113 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002114 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002115 The object takes the form of:
2116
2117{ # Rotate Server CA request.
Bu Sun Kim65020912020-05-20 12:08:20 -07002118 &quot;rotateServerCaContext&quot;: { # Instance rotate server CA context. # Contains details about the rotate server CA operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002119 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#rotateServerCaContext*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002120 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002121 },
2122 }
2123
Dan O'Mearadd494642020-05-01 07:42:23 -07002124 x__xgafv: string, V1 error format.
2125 Allowed values
2126 1 - v1 error format
2127 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002128
2129Returns:
2130 An object of the form:
2131
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002132 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002133 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002134 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002135 &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 ],
2139 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2140 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002141 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
2142 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2143 &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.
2144 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002145 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2146 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002147 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002148 &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.
2149 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002150 },
2151 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002152 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002153 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2154 &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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
2155 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2156 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2157 &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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
2158 },
2159 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2160 &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.
2161 &quot;A String&quot;,
2162 ],
2163 },
2164 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2165 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
2166 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2167 },
2168 &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.
2169 &quot;offload&quot;: True or False, # Option for export offload.
2170 &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.
2171 &quot;A String&quot;,
2172 ],
2173 },
2174 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2175 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2176 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2177 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2178 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2179 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2180 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2181 &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*
2182 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2183 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2184 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2185 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2186 { # Database instance operation error.
2187 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2188 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2189 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2190 },
2191 ],
2192 },
2193 &quot;targetLink&quot;: &quot;A String&quot;,
2194 &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.
2195 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Craig Citroe633be12015-03-02 13:40:36 -08002196 }</pre>
2197</div>
2198
2199<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002200 <code class="details" id="startReplica">startReplica(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08002201 <pre>Starts the replication in the read replica instance.
2202
2203Args:
2204 project: string, ID of the project that contains the read replica. (required)
2205 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002206 x__xgafv: string, V1 error format.
2207 Allowed values
2208 1 - v1 error format
2209 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002210
2211Returns:
2212 An object of the form:
2213
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002214 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002215 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002216 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002217 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2218 &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.
2219 &quot;A String&quot;,
2220 ],
2221 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2222 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002223 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
2224 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2225 &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.
2226 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002227 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2228 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002229 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002230 &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.
2231 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002232 },
2233 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002234 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002235 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2236 &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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
2237 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2238 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2239 &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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
2240 },
2241 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2242 &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.
2243 &quot;A String&quot;,
2244 ],
2245 },
2246 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2247 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
2248 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2249 },
2250 &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.
2251 &quot;offload&quot;: True or False, # Option for export offload.
2252 &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.
2253 &quot;A String&quot;,
2254 ],
2255 },
2256 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2257 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2258 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2259 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2260 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2261 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2262 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2263 &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*
2264 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2265 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2266 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2267 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2268 { # Database instance operation error.
2269 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2270 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2271 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2272 },
2273 ],
2274 },
2275 &quot;targetLink&quot;: &quot;A String&quot;,
2276 &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.
2277 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Craig Citroe633be12015-03-02 13:40:36 -08002278 }</pre>
2279</div>
2280
2281<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002282 <code class="details" id="stopReplica">stopReplica(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08002283 <pre>Stops the replication in the read replica instance.
2284
2285Args:
2286 project: string, ID of the project that contains the read replica. (required)
2287 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002288 x__xgafv: string, V1 error format.
2289 Allowed values
2290 1 - v1 error format
2291 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002292
2293Returns:
2294 An object of the form:
2295
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002296 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002297 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002298 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002299 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2300 &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.
2301 &quot;A String&quot;,
2302 ],
2303 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2304 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002305 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
2306 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2307 &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.
2308 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002309 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2310 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002311 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002312 &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.
2313 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002314 },
2315 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002316 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002317 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2318 &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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
2319 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2320 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2321 &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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
2322 },
2323 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2324 &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.
2325 &quot;A String&quot;,
2326 ],
2327 },
2328 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2329 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
2330 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2331 },
2332 &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.
2333 &quot;offload&quot;: True or False, # Option for export offload.
2334 &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.
2335 &quot;A String&quot;,
2336 ],
2337 },
2338 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2339 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2340 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2341 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2342 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2343 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2344 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2345 &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*
2346 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2347 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2348 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2349 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2350 { # Database instance operation error.
2351 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2352 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2353 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2354 },
2355 ],
2356 },
2357 &quot;targetLink&quot;: &quot;A String&quot;,
2358 &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.
2359 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Craig Citroe633be12015-03-02 13:40:36 -08002360 }</pre>
2361</div>
2362
2363<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002364 <code class="details" id="truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002365 <pre>Truncate MySQL general and slow query log tables
2366
2367Args:
2368 project: string, Project ID of the Cloud SQL project. (required)
2369 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002370 body: object, The request body.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002371 The object takes the form of:
2372
2373{ # Instance truncate log request.
Bu Sun Kim65020912020-05-20 12:08:20 -07002374 &quot;truncateLogContext&quot;: { # Database Instance truncate log context. # Contains details about the truncate log operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002375 &quot;logType&quot;: &quot;A String&quot;, # The type of log to truncate. Valid values are *MYSQL_GENERAL_TABLE* and *MYSQL_SLOW_TABLE*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002376 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#truncateLogContext*.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002377 },
2378 }
2379
Dan O'Mearadd494642020-05-01 07:42:23 -07002380 x__xgafv: string, V1 error format.
2381 Allowed values
2382 1 - v1 error format
2383 2 - v2 error format
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002384
2385Returns:
2386 An object of the form:
2387
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002388 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002389 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002390 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002391 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2392 &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.
2393 &quot;A String&quot;,
2394 ],
2395 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2396 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002397 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
2398 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2399 &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.
2400 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002401 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2402 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002403 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002404 &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.
2405 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002406 },
2407 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002408 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002409 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2410 &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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
2411 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2412 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2413 &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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
2414 },
2415 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2416 &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.
2417 &quot;A String&quot;,
2418 ],
2419 },
2420 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2421 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
2422 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2423 },
2424 &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.
2425 &quot;offload&quot;: True or False, # Option for export offload.
2426 &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.
2427 &quot;A String&quot;,
2428 ],
2429 },
2430 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2431 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2432 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2433 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2434 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2435 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2436 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2437 &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*
2438 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2439 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2440 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2441 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2442 { # Database instance operation error.
2443 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2444 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2445 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2446 },
2447 ],
2448 },
2449 &quot;targetLink&quot;: &quot;A String&quot;,
2450 &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.
2451 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002452 }</pre>
2453</div>
2454
2455<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002456 <code class="details" id="update">update(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002457 <pre>Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.
Craig Citroe633be12015-03-02 13:40:36 -08002458
2459Args:
2460 project: string, Project ID of the project that contains the instance. (required)
2461 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002462 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08002463 The object takes the form of:
2464
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002465{ # A Cloud SQL instance resource. Next field: 36
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002466 &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.
2467 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
2468 &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.
2469 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
2470 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
2471 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
2472 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
2473 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2474 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
2475 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
2476 },
2477 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfies physical zone separation. Reserved for future use.
2478 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
2479 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
2480 &quot;canDefer&quot;: True or False,
2481 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
2482 },
2483 &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* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.
2484 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
2485 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
2486 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
2487 },
2488 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2489 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
2490 &quot;A String&quot;,
2491 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002492 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002493 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
2494 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
2495 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
2496 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
2497 &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.
2498 &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.
2499 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
2500 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2501 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
2502 &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.
2503 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
2504 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
2505 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
2506 &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.
2507 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
2508 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
2509 },
2510 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
2511 &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.
2512 },
2513 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
2514 &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.
2515 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
2516 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
2517 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
2518 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
2519 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
2520 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*
2521 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
2522 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
2523 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2524 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
2525 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2526 },
2527 &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.
2528 &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.
2529 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
2530 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
2531 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
2532 },
2533 &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 has been stopped by owner. It is not currently running, but it&#x27;s ready to be restarted. *SUSPENDED*: The instance is not available, for example due to problems with billing. 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.
2534 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
2535 &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.
2536 &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. This property is applicable only to Second Generation instances.
2537 },
2538 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
2539 { # Database instance IP Mapping.
2540 &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.
2541 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired.
2542 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
2543 },
2544 ],
2545 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002546 &quot;settings&quot;: { # Database instance settings. # The user settings.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002547 &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.
2548 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
2549 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002550 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002551 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
2552 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
2553 &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 deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
2554 &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
2555 &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 deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
2556 },
2557 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002558 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
2559 &quot;A String&quot;,
2560 ],
2561 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
2562 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
2563 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
2564 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
2565 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
2566 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
2567 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
2568 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
2569 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
2570 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
2571 &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.
2572 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
2573 },
2574 },
2575 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
2576 { # Database flags for Cloud SQL instances.
2577 &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.
2578 &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 for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation.
2579 },
2580 ],
2581 &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.
2582 &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*).
2583 { # An entry for an Access Control list.
2584 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
2585 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2586 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
2587 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
2588 },
2589 ],
2590 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
2591 &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.
2592 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
2593 },
2594 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances).
2595 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
2596 &quot;a_key&quot;: &quot;A String&quot;,
2597 },
2598 &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.
2599 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
2600 &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.
2601 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.
2602 &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.
2603 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
2604 &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.
2605 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
2606 },
2607 &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.
2608 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
2609 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
2610 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
2611 &quot;hour&quot;: 42, # hour of day - 0 to 23.
2612 },
2613 &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.
2614 &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.
2615 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
2616 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
2617 &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.
2618 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
2619 &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.
2620 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
2621 &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.
2622 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002623 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002624 &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.
2625 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002626 &quot;replicaNames&quot;: [ # The replicas of the instance.
2627 &quot;A String&quot;,
2628 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002629 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002630 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002631 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002632}
Craig Citroe633be12015-03-02 13:40:36 -08002633
Dan O'Mearadd494642020-05-01 07:42:23 -07002634 x__xgafv: string, V1 error format.
2635 Allowed values
2636 1 - v1 error format
2637 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002638
2639Returns:
2640 An object of the form:
2641
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002642 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002643 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002644 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002645 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2646 &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.
2647 &quot;A String&quot;,
2648 ],
2649 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2650 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002651 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
2652 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2653 &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.
2654 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002655 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2656 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002657 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002658 &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.
2659 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002660 },
2661 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002662 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002663 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2664 &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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
2665 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2666 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2667 &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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
2668 },
2669 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2670 &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.
2671 &quot;A String&quot;,
2672 ],
2673 },
2674 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2675 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
2676 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2677 },
2678 &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.
2679 &quot;offload&quot;: True or False, # Option for export offload.
2680 &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.
2681 &quot;A String&quot;,
2682 ],
2683 },
2684 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2685 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2686 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2687 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2688 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2689 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2690 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2691 &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*
2692 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2693 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2694 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2695 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2696 { # Database instance operation error.
2697 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2698 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2699 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2700 },
2701 ],
2702 },
2703 &quot;targetLink&quot;: &quot;A String&quot;,
2704 &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.
2705 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Craig Citroe633be12015-03-02 13:40:36 -08002706 }</pre>
2707</div>
2708
2709</body></html>