blob: 64644364e268bae33dfb70d9197926d518452636 [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>
79<p class="firstline">Add a new trusted Certificate Authority (CA) version for the specified</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>
82<p class="firstline">Creates a Cloud SQL instance as a clone of the source instance. Using this</p>
Craig Citroe633be12015-03-02 13:40:36 -080083<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#delete">delete(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080085<p class="firstline">Deletes a Cloud SQL instance.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Demotes the stand-alone instance to be a Cloud SQL read replica for an</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070089<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#export">export(project, instance, body=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL</p>
Craig Citroe633be12015-03-02 13:40:36 -080092<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#failover">failover(project, instance, body=None, x__xgafv=None)</a></code></p>
94<p class="firstline">Failover the instance to its failover replica instance. Using this</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080095<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#get">get(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080097<p class="firstline">Retrieves a resource containing information about a Cloud SQL instance.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#import_">import_(project, instance, body=None, x__xgafv=None)</a></code></p>
100<p class="firstline">Imports data into a Cloud SQL instance from a SQL dump or CSV file in</p>
Craig Citroe633be12015-03-02 13:40:36 -0800101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#insert">insert(project, body=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800103<p class="firstline">Creates a new Cloud SQL instance.</p>
104<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700105 <code><a href="#list">list(project, filter=None, pageToken=None, maxResults=None, x__xgafv=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700106<p class="firstline">Lists instances under a given project.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#listServerCas">listServerCas(project, instance, x__xgafv=None)</a></code></p>
109<p class="firstline">Lists all of the trusted Certificate Authorities (CAs) for the specified</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110<p class="toc_element">
Craig Citroe633be12015-03-02 13:40:36 -0800111 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
112<p class="firstline">Retrieves the next page of results.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#patch">patch(project, instance, body=None, x__xgafv=None)</a></code></p>
115<p class="firstline">Updates settings of a Cloud SQL instance.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#promoteReplica">promoteReplica(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800118<p class="firstline">Promotes the read replica instance to be a stand-alone Cloud SQL instance.</p>
119<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code><a href="#resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</a></code></p>
121<p class="firstline">Deletes all client certificates and generates a new server SSL certificate</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="#restart">restart(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800124<p class="firstline">Restarts a Cloud SQL instance.</p>
125<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700126 <code><a href="#restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</a></code></p>
127<p class="firstline">Restores a backup of a Cloud SQL instance. Using this operation might cause</p>
Craig Citroe633be12015-03-02 13:40:36 -0800128<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700129 <code><a href="#rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</a></code></p>
130<p class="firstline">Rotates the server certificate to one signed by the Certificate Authority</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700131<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700132 <code><a href="#startReplica">startReplica(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800133<p class="firstline">Starts the replication in the read replica instance.</p>
134<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 <code><a href="#stopReplica">stopReplica(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800136<p class="firstline">Stops 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="#truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800139<p class="firstline">Truncate MySQL general and slow query log tables</p>
140<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 <code><a href="#update">update(project, instance, body=None, x__xgafv=None)</a></code></p>
142<p class="firstline">Updates settings of a Cloud SQL instance. Using this operation might cause</p>
Craig Citroe633be12015-03-02 13:40:36 -0800143<h3>Method Details</h3>
144<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700145 <code class="details" id="addServerCa">addServerCa(project, instance, x__xgafv=None)</code>
146 <pre>Add a new trusted Certificate Authority (CA) version for the specified
147instance. Required to prepare for a certificate rotation. If a CA version
148was previously added but never used in a certificate rotation, this
149operation replaces that version. There cannot be more than one CA version
150waiting to be rotated in.
Craig Citroe633be12015-03-02 13:40:36 -0800151
152Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 project: string, Project ID of the project that contains the instance. (required)
154 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700155 x__xgafv: string, V1 error format.
156 Allowed values
157 1 - v1 error format
158 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800159
160Returns:
161 An object of the form:
162
Dan O'Mearadd494642020-05-01 07:42:23 -0700163 { # An Operation resource.&amp;nbsp;For successful operations that return an
164 # Operation resource, only the fields relevant to the operation are populated
165 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700166 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
167 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
168 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
169 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
170 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
171 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
172 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
173 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
174 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
175 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
176 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
177 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
178 &quot;targetLink&quot;: &quot;A String&quot;,
179 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
180 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
181 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
182 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
183 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
184 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
185 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
186 # populated.
187 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
188 { # Database instance operation error.
189 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
190 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
191 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700192 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700193 ],
194 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
195 },
196 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
197 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
198 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
199 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
200 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
201 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
202 # of the database table are loaded with CSV data.
203 &quot;A String&quot;,
204 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700205 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700206 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -0700207 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
208 # specify a database, and is overridden by any database specification in the
209 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
210 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -0700211 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
212 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
213 &quot;encryptionOptions&quot;: {
214 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
215 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
216 # write permissions to the bucket and read access to the file.
217 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
218 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
219 # write permissions to the bucket and read access to the file.
220 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
221 },
222 },
223 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700224 # &lt;code&gt;gs:
225 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
226 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
227 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700228 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
229 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Craig Citroe633be12015-03-02 13:40:36 -0800230 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700231 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
232 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
233 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
234 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -0700235 # identifier to retrieve the Operations resource that has information about
236 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700237 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
238 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -0700239 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
240 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
241 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
242 # either by using this property or by using the
243 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
244 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
245 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
246 # this database must match the one specified in the
247 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700248 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800249 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700250 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
251 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -0700252 # you specify tables, specify one and only one database. For PostgreSQL
253 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700254 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800255 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700256 &quot;schemaOnly&quot;: True or False, # Export only schemas.
257 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
258 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -0700259 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
260 # a CHANGE MASTER TO statement with the binary log coordinates.
261 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
262 # a SQL comment, and has no effect.
263 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700264 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700265 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700266 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
267 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
268 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
269 # stored. The URI is in the form &lt;code&gt;gs:
270 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
271 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
272 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
273 # // compressed.
274 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
275 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
276 },
277 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700278 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700279 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700280 }</pre>
281</div>
282
283<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700284 <code class="details" id="clone">clone(project, instance, body=None, x__xgafv=None)</code>
285 <pre>Creates a Cloud SQL instance as a clone of the source instance. Using this
286operation might cause your instance to restart.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700287
288Args:
289 project: string, Project ID of the source as well as the clone Cloud SQL instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700290 instance: string, The ID of the Cloud SQL instance to be cloned (source). This does not
291include the project ID. (required)
292 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700293 The object takes the form of:
294
295{ # Database instance clone request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700296 &quot;cloneContext&quot;: { # Database instance clone context. # Contains details about the clone operation.
297 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#cloneContext&lt;/code&gt;.
298 &quot;pointInTime&quot;: &quot;A String&quot;, # Reserved for future use.
299 &quot;destinationInstanceName&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance to be created as a clone.
300 &quot;pitrTimestampMs&quot;: &quot;A String&quot;, # Reserved for future use.
301 &quot;binLogCoordinates&quot;: { # Binary log coordinates. # Binary log coordinates, if specified, identify the position up to which the
Dan O'Mearadd494642020-05-01 07:42:23 -0700302 # source instance should be cloned. If not specified, the source instance is
303 # cloned up to the most recent binary log coordinates.
Bu Sun Kim65020912020-05-20 12:08:20 -0700304 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#binLogCoordinates&lt;/code&gt;.
305 &quot;binLogFileName&quot;: &quot;A String&quot;, # Name of the binary log file for a Cloud SQL instance.
306 &quot;binLogPosition&quot;: &quot;A String&quot;, # Position (offset) within the binary log file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700307 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700308 },
309 }
310
Dan O'Mearadd494642020-05-01 07:42:23 -0700311 x__xgafv: string, V1 error format.
312 Allowed values
313 1 - v1 error format
314 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700315
316Returns:
317 An object of the form:
318
Dan O'Mearadd494642020-05-01 07:42:23 -0700319 { # An Operation resource.&amp;nbsp;For successful operations that return an
320 # Operation resource, only the fields relevant to the operation are populated
321 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700322 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
323 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
324 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
325 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
326 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
327 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
328 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
329 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
330 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
331 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
332 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
333 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
334 &quot;targetLink&quot;: &quot;A String&quot;,
335 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
336 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
337 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
338 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
339 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
340 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
341 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
342 # populated.
343 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
344 { # Database instance operation error.
345 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
346 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
347 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700348 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700349 ],
350 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
351 },
352 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
353 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
354 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
355 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
356 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
357 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
358 # of the database table are loaded with CSV data.
359 &quot;A String&quot;,
360 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700361 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700362 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -0700363 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
364 # specify a database, and is overridden by any database specification in the
365 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
366 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -0700367 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
368 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
369 &quot;encryptionOptions&quot;: {
370 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
371 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
372 # write permissions to the bucket and read access to the file.
373 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
374 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
375 # write permissions to the bucket and read access to the file.
376 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
377 },
378 },
379 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700380 # &lt;code&gt;gs:
381 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
382 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
383 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700384 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
385 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700386 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700387 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
388 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
389 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
390 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -0700391 # identifier to retrieve the Operations resource that has information about
392 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700393 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
394 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -0700395 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
396 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
397 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
398 # either by using this property or by using the
399 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
400 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
401 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
402 # this database must match the one specified in the
403 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700404 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700405 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700406 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
407 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -0700408 # you specify tables, specify one and only one database. For PostgreSQL
409 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700410 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700411 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700412 &quot;schemaOnly&quot;: True or False, # Export only schemas.
413 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
414 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -0700415 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
416 # a CHANGE MASTER TO statement with the binary log coordinates.
417 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
418 # a SQL comment, and has no effect.
419 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700420 },
Craig Citroe633be12015-03-02 13:40:36 -0800421 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700422 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
423 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
424 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
425 # stored. The URI is in the form &lt;code&gt;gs:
426 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
427 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
428 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
429 # // compressed.
430 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
431 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
432 },
433 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800434 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700435 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -0800436 }</pre>
437</div>
438
439<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700440 <code class="details" id="delete">delete(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800441 <pre>Deletes a Cloud SQL instance.
442
443Args:
444 project: string, Project ID of the project that contains the instance to be deleted. (required)
445 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700446 x__xgafv: string, V1 error format.
447 Allowed values
448 1 - v1 error format
449 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800450
451Returns:
452 An object of the form:
453
Dan O'Mearadd494642020-05-01 07:42:23 -0700454 { # An Operation resource.&amp;nbsp;For successful operations that return an
455 # Operation resource, only the fields relevant to the operation are populated
456 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700457 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
458 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
459 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
460 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
461 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
462 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
463 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
464 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
465 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
466 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
467 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
468 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
469 &quot;targetLink&quot;: &quot;A String&quot;,
470 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
471 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
472 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
473 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
474 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
475 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
476 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
477 # populated.
478 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
479 { # Database instance operation error.
480 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
481 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
482 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700483 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700484 ],
485 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
486 },
487 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
488 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
489 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
490 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
491 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
492 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
493 # of the database table are loaded with CSV data.
494 &quot;A String&quot;,
495 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700496 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700497 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -0700498 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
499 # specify a database, and is overridden by any database specification in the
500 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
501 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -0700502 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
503 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
504 &quot;encryptionOptions&quot;: {
505 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
506 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
507 # write permissions to the bucket and read access to the file.
508 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
509 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
510 # write permissions to the bucket and read access to the file.
511 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
512 },
513 },
514 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700515 # &lt;code&gt;gs:
516 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
517 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
518 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700519 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
520 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Craig Citroe633be12015-03-02 13:40:36 -0800521 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700522 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
523 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
524 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
525 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -0700526 # identifier to retrieve the Operations resource that has information about
527 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700528 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
529 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -0700530 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
531 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
532 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
533 # either by using this property or by using the
534 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
535 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
536 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
537 # this database must match the one specified in the
538 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700539 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800540 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700541 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
542 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -0700543 # you specify tables, specify one and only one database. For PostgreSQL
544 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700545 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800546 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700547 &quot;schemaOnly&quot;: True or False, # Export only schemas.
548 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
549 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -0700550 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
551 # a CHANGE MASTER TO statement with the binary log coordinates.
552 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
553 # a SQL comment, and has no effect.
554 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700555 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700556 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700557 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
558 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
559 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
560 # stored. The URI is in the form &lt;code&gt;gs:
561 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
562 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
563 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
564 # // compressed.
565 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
566 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
567 },
568 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700569 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700570 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700571 }</pre>
572</div>
573
574<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700575 <code class="details" id="demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</code>
576 <pre>Demotes the stand-alone instance to be a Cloud SQL read replica for an
577external database server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700578
579Args:
580 project: string, ID of the project that contains the instance. (required)
581 instance: string, Cloud SQL instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700582 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700583 The object takes the form of:
584
585{ # Database demote master request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700586 &quot;demoteMasterContext&quot;: { # Database instance demote master context. # Contains details about the demoteMaster operation.
587 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the on-premises master. # Configuration specific to read-replicas replicating from the on-premises
588 # master.
589 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#demoteMasterConfiguration&lt;/code&gt;.
590 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
591 # master. Replication configuration information such as the username,
592 # password, certificates, and keys are not stored in the instance metadata.
593 # The configuration information is used only to set up the replication
594 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
595 # in the data directory.
596 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#demoteMasterMysqlReplicaConfiguration&lt;/code&gt;.
597 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
598 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
599 # is encoded in the client&#x27;s certificate. The format of the slave&#x27;s private
600 # key can be either PKCS #1 or PKCS #8.
601 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
602 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
603 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
604 },
605 },
606 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#demoteMasterContext&lt;/code&gt;.
607 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as on-premises master in the
Dan O'Mearadd494642020-05-01 07:42:23 -0700608 # replication setup.
Bu Sun Kim65020912020-05-20 12:08:20 -0700609 &quot;verifyGtidConsistency&quot;: True or False, # Verify GTID consistency for demote operation. Default value:
Dan O'Mearadd494642020-05-01 07:42:23 -0700610 # &lt;code&gt;True&lt;/code&gt;. Second Generation instances only. Setting this flag to
611 # false enables you to bypass GTID consistency check between on-premises
612 # master and Cloud SQL instance during the demotion operation but also
613 # exposes you to the risk of future replication failures. Change the value
614 # only if you know the reason for the GTID divergence and are confident that
615 # doing so will not cause any replication issues.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700616 },
617 }
618
Dan O'Mearadd494642020-05-01 07:42:23 -0700619 x__xgafv: string, V1 error format.
620 Allowed values
621 1 - v1 error format
622 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700623
624Returns:
625 An object of the form:
626
Dan O'Mearadd494642020-05-01 07:42:23 -0700627 { # An Operation resource.&amp;nbsp;For successful operations that return an
628 # Operation resource, only the fields relevant to the operation are populated
629 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700630 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
631 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
632 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
633 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
634 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
635 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
636 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
637 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
638 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
639 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
640 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
641 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
642 &quot;targetLink&quot;: &quot;A String&quot;,
643 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
644 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
645 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
646 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
647 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
648 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
649 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
650 # populated.
651 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
652 { # Database instance operation error.
653 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
654 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
655 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700656 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700657 ],
658 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
659 },
660 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
661 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
662 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
663 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
664 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
665 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
666 # of the database table are loaded with CSV data.
667 &quot;A String&quot;,
668 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700669 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700670 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -0700671 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
672 # specify a database, and is overridden by any database specification in the
673 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
674 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -0700675 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
676 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
677 &quot;encryptionOptions&quot;: {
678 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
679 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
680 # write permissions to the bucket and read access to the file.
681 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
682 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
683 # write permissions to the bucket and read access to the file.
684 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
685 },
686 },
687 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700688 # &lt;code&gt;gs:
689 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
690 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
691 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700692 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
693 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700694 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700695 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
696 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
697 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
698 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -0700699 # identifier to retrieve the Operations resource that has information about
700 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700701 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
702 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -0700703 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
704 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
705 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
706 # either by using this property or by using the
707 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
708 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
709 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
710 # this database must match the one specified in the
711 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700712 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700713 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700714 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
715 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -0700716 # you specify tables, specify one and only one database. For PostgreSQL
717 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700718 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700719 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700720 &quot;schemaOnly&quot;: True or False, # Export only schemas.
721 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
722 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -0700723 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
724 # a CHANGE MASTER TO statement with the binary log coordinates.
725 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
726 # a SQL comment, and has no effect.
727 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700728 },
Craig Citroe633be12015-03-02 13:40:36 -0800729 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700730 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
731 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
732 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
733 # stored. The URI is in the form &lt;code&gt;gs:
734 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
735 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
736 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
737 # // compressed.
738 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
739 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
740 },
741 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800742 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700743 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -0800744 }</pre>
745</div>
746
747<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700748 <code class="details" id="export">export(project, instance, body=None, x__xgafv=None)</code>
749 <pre>Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL
750dump or CSV file.
Craig Citroe633be12015-03-02 13:40:36 -0800751
752Args:
753 project: string, Project ID of the project that contains the instance to be exported. (required)
754 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700755 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800756 The object takes the form of:
757
758{ # Database instance export request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700759 &quot;exportContext&quot;: { # Database instance export context. # Contains details about the export operation.
760 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -0700761 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
762 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
763 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
764 # either by using this property or by using the
765 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
766 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
767 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
768 # this database must match the one specified in the
769 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700770 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800771 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700772 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
773 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -0700774 # you specify tables, specify one and only one database. For PostgreSQL
775 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700776 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800777 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700778 &quot;schemaOnly&quot;: True or False, # Export only schemas.
779 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
780 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -0700781 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
782 # a CHANGE MASTER TO statement with the binary log coordinates.
783 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
784 # a SQL comment, and has no effect.
785 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700786 },
Craig Citroe633be12015-03-02 13:40:36 -0800787 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700788 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
789 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
790 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
791 # stored. The URI is in the form &lt;code&gt;gs:
792 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
793 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
794 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
795 # // compressed.
796 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
797 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
798 },
799 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800800 },
801 }
802
Dan O'Mearadd494642020-05-01 07:42:23 -0700803 x__xgafv: string, V1 error format.
804 Allowed values
805 1 - v1 error format
806 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800807
808Returns:
809 An object of the form:
810
Dan O'Mearadd494642020-05-01 07:42:23 -0700811 { # An Operation resource.&amp;nbsp;For successful operations that return an
812 # Operation resource, only the fields relevant to the operation are populated
813 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700814 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
815 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
816 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
817 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
818 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
819 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
820 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
821 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
822 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
823 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
824 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
825 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
826 &quot;targetLink&quot;: &quot;A String&quot;,
827 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
828 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
829 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
830 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
831 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
832 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
833 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
834 # populated.
835 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
836 { # Database instance operation error.
837 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
838 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
839 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700840 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700841 ],
842 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
843 },
844 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
845 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
846 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
847 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
848 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
849 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
850 # of the database table are loaded with CSV data.
851 &quot;A String&quot;,
852 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700853 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700854 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -0700855 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
856 # specify a database, and is overridden by any database specification in the
857 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
858 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -0700859 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
860 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
861 &quot;encryptionOptions&quot;: {
862 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
863 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
864 # write permissions to the bucket and read access to the file.
865 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
866 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
867 # write permissions to the bucket and read access to the file.
868 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
869 },
870 },
871 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700872 # &lt;code&gt;gs:
873 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
874 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
875 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700876 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
877 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Craig Citroe633be12015-03-02 13:40:36 -0800878 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700879 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
880 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
881 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
882 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -0700883 # identifier to retrieve the Operations resource that has information about
884 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700885 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
886 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -0700887 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
888 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
889 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
890 # either by using this property or by using the
891 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
892 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
893 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
894 # this database must match the one specified in the
895 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700896 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800897 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700898 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
899 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -0700900 # you specify tables, specify one and only one database. For PostgreSQL
901 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700902 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800903 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700904 &quot;schemaOnly&quot;: True or False, # Export only schemas.
905 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
906 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -0700907 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
908 # a CHANGE MASTER TO statement with the binary log coordinates.
909 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
910 # a SQL comment, and has no effect.
911 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700912 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800913 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700914 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
915 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
916 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
917 # stored. The URI is in the form &lt;code&gt;gs:
918 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
919 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
920 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
921 # // compressed.
922 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
923 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
924 },
925 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800926 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700927 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800928 }</pre>
929</div>
930
931<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700932 <code class="details" id="failover">failover(project, instance, body=None, x__xgafv=None)</code>
933 <pre>Failover the instance to its failover replica instance. Using this
934operation might cause your instance to restart.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800935
936Args:
937 project: string, ID of the project that contains the read replica. (required)
938 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700939 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800940 The object takes the form of:
941
942{ # Instance failover request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700943 &quot;failoverContext&quot;: { # Database instance failover context. # Failover Context.
944 &quot;settingsVersion&quot;: &quot;A String&quot;, # The current settings version of this instance. Request will be rejected if
945 # this version doesn&#x27;t match the current settings version.
946 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#failoverContext&lt;/code&gt;.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800947 },
948 }
949
Dan O'Mearadd494642020-05-01 07:42:23 -0700950 x__xgafv: string, V1 error format.
951 Allowed values
952 1 - v1 error format
953 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800954
955Returns:
956 An object of the form:
957
Dan O'Mearadd494642020-05-01 07:42:23 -0700958 { # An Operation resource.&amp;nbsp;For successful operations that return an
959 # Operation resource, only the fields relevant to the operation are populated
960 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700961 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
962 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
963 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
964 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
965 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
966 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
967 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
968 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
969 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
970 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
971 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
972 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
973 &quot;targetLink&quot;: &quot;A String&quot;,
974 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
975 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
976 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
977 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
978 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
979 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
980 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
981 # populated.
982 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
983 { # Database instance operation error.
984 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
985 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
986 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700987 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700988 ],
989 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
990 },
991 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
992 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
993 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
994 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
995 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
996 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
997 # of the database table are loaded with CSV data.
998 &quot;A String&quot;,
999 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001000 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001001 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -07001002 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
1003 # specify a database, and is overridden by any database specification in the
1004 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
1005 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -07001006 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1007 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1008 &quot;encryptionOptions&quot;: {
1009 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
1010 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1011 # write permissions to the bucket and read access to the file.
1012 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
1013 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1014 # write permissions to the bucket and read access to the file.
1015 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1016 },
1017 },
1018 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -07001019 # &lt;code&gt;gs:
1020 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
1021 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
1022 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001023 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1024 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001025 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001026 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
1027 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
1028 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
1029 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -07001030 # identifier to retrieve the Operations resource that has information about
1031 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001032 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1033 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -07001034 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
1035 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
1036 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
1037 # either by using this property or by using the
1038 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
1039 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
1040 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
1041 # this database must match the one specified in the
1042 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -07001043 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001044 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001045 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1046 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -07001047 # you specify tables, specify one and only one database. For PostgreSQL
1048 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07001049 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001050 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001051 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1052 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1053 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -07001054 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
1055 # a CHANGE MASTER TO statement with the binary log coordinates.
1056 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
1057 # a SQL comment, and has no effect.
1058 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001059 },
Craig Citroe633be12015-03-02 13:40:36 -08001060 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001061 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1062 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1063 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
1064 # stored. The URI is in the form &lt;code&gt;gs:
1065 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
1066 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
1067 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
1068 # // compressed.
1069 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
1070 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1071 },
1072 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08001073 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001074 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08001075 }</pre>
1076</div>
1077
1078<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001079 <code class="details" id="get">get(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08001080 <pre>Retrieves a resource containing information about a Cloud SQL instance.
1081
1082Args:
1083 project: string, Project ID of the project that contains the instance. (required)
1084 instance: string, Database instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001085 x__xgafv: string, V1 error format.
1086 Allowed values
1087 1 - v1 error format
1088 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001089
1090Returns:
1091 An object of the form:
1092
1093 { # A Cloud SQL instance resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001094 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1095 &quot;A String&quot;,
1096 ],
1097 &quot;settings&quot;: { # Database instance settings. # The user settings.
1098 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
1099 # instance IP and manage which external networks can connect to the instance.
1100 # The IPv4 address cannot be disabled for Second Generation instances.
1101 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP should be enforced or not.
1102 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is
1103 # accessible for private IP. For example,
1104 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
1105 # be updated, but it cannot be removed after it is set.
1106 &quot;ipv4Enabled&quot;: True or False, # Whether the instance should be assigned an IP address or not.
1107 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance
1108 # using the IP. In &lt;a
1109 # href=&quot;http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation&quot;&gt;CIDR
1110 # notation&lt;/a&gt;, also known as &#x27;slash&#x27; notation (e.g.
1111 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
1112 { # An entry for an Access Control list.
1113 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1114 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
1115 &quot;value&quot;: &quot;A String&quot;, # The whitelisted value for the access control list.
1116 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in &lt;a
1117 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1118 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1119 },
1120 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001121 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001122 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type (PostgreSQL and MySQL instances only). Potential values:
Dan O'Mearadd494642020-05-01 07:42:23 -07001123 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
1124 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
1125 # The instance can serve data from more than one zone in a region (it is
1126 # highly available). &lt;br&gt;For more information, see &lt;a
Bu Sun Kim65020912020-05-20 12:08:20 -07001127 # href=&quot;https://cloud.google.com/sql/docs/postgres/high-availability&quot;&gt;Overview
Dan O'Mearadd494642020-05-01 07:42:23 -07001128 # of the High Availability Configuration&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001129 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update
1130 # method to make sure concurrent updates are handled properly. During update,
1131 # use the most recent settingsVersion value for this instance and do not try
1132 # to update this value.
1133 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1134 { # Database flags for Cloud SQL instances.
1135 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so
1136 # include both server options and system variables for MySQL. Flags should be
1137 # specified with underscores, not hyphens. For more information, see &lt;a
1138 # href=&quot;/sql/docs/mysql/flags&quot;&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
1139 # SQL documentation.
1140 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans should be set to &lt;code&gt;on&lt;/code&gt; for true
1141 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
1142 # doesn&#x27;t take a value.
1143 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001144 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001145 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance
1146 # can be restarted for maintenance purposes. Not used for First Generation
1147 # instances.
1148 # preferably be restarted for system maintenance purposes.
1149 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1150 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1151 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
1152 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: &lt;code&gt;canary&lt;/code&gt; (Earlier) or
1153 # &lt;code&gt;stable&lt;/code&gt; (Later). &lt;br /&gt;&lt;a
1154 # href=&quot;/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen&quot;&gt;
1155 # Learn more&lt;/a&gt;.
1156 },
1157 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either &lt;code&gt;PER_USE&lt;/code&gt;
1158 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
1159 # Generation instances.
1160 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is
1161 # true. Not used for First Generation instances.
1162 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased.
1163 # The default value is 0, which specifies that there is no limit. Not used
1164 # for First Generation instances.
1165 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. First Generation
1166 # instances only.
1167 &quot;A String&quot;,
1168 ],
1169 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example
1170 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
1171 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
1172 # this property determines whether the instance is First or Second
1173 # Generation. For more information, see &lt;a
1174 # href=&quot;/sql/docs/db_path/instance-settings&quot;&gt;Instance Settings&lt;/a&gt;.
1175 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
1176 # for First Generation instances.
1177 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
1178 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
1179 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
1180 # replication is enabled or not.
1181 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
1182 # database flags for crash-safe replication are enabled. This property is
1183 # only applicable to First Generation instances.
1184 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1185 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
1186 # disabled, binarylog must be disabled as well.
1187 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1188 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1189 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
1190 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24
1191 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
1192 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
1193 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1194 },
1195 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a
1196 # single key value pair.
1197 &quot;a_key&quot;: &quot;A String&quot;,
1198 },
1199 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as
1200 # near as possible to either an App Engine app or Compute Engine zone for
1201 # better performance. App Engine co-location is only applicable to First
1202 # Generation instances.
1203 # preferably be located, either in a specific Compute Engine zone, or
1204 # co-located with an App Engine application. Note that if the preferred
1205 # location is not available, the instance will be located as close as possible
1206 # within the region. Only one location may be specified.
1207 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
1208 # etc.).
1209 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The AppEngine application to follow, it must be in the same region as the
1210 # Cloud SQL instance.
1211 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
1212 },
1213 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
1214 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either
1215 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
1216 # only applicable to First Generation instances.
1217 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is
Dan O'Mearadd494642020-05-01 07:42:23 -07001218 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
1219 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
1220 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
1221 # off; it is not activated, even if a connection request arrives.
1222 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
1223 # responds to incoming requests, and turns itself off when not in use.
1224 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
1225 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
1226 # 12 hours of inactivity.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001227 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001228 &quot;replicaNames&quot;: [ # The replicas of the instance.
1229 &quot;A String&quot;,
1230 ],
1231 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
1232 # Applies only to Second Generation instances.
1233 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
1234 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1235 },
1236 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1237 &quot;canDefer&quot;: True or False,
1238 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1239 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1240 },
1241 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
1242 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
1243 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
1244 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1245 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1246 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1247 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1248 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
1249 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1250 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in &lt;a
1251 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1252 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
1253 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1254 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1255 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in &lt;a
1256 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1257 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1258 },
1259 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1260 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1261 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as master in the replication setup.
1262 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following.
1263 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
1264 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
1265 # instance running on the
1266 # customer&#x27;s premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
1267 # instance configured as a read-replica.
1268 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This
1269 # value could be different from the zone that was specified when the instance
1270 # was created if the instance has failed over to its secondary zone.
1271 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been
1272 # deprecated. Users should use the
1273 # &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud
1274 # Monitoring API instead. Please see &lt;a
1275 # href=&quot;https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ&quot;&gt;this
1276 # announcement&lt;/a&gt; for details.
1277 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
1278 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to
Dan O'Mearadd494642020-05-01 07:42:23 -07001279 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
1280 # case the master instance fails, the replica instance will be promoted as
1281 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
1282 # target, and the replica has to be in different zone with the master
1283 # instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07001284 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
1285 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
Dan O'Mearadd494642020-05-01 07:42:23 -07001286 # master. Replication configuration information such as the username,
1287 # password, certificates, and keys are not stored in the instance metadata.
1288 # The configuration information is used only to set up the replication
1289 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
1290 # in the data directory.
Bu Sun Kim65020912020-05-20 12:08:20 -07001291 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
1292 # is encoded in the client&#x27;s certificate.
1293 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1294 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1295 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1296 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the slave
Dan O'Mearadd494642020-05-01 07:42:23 -07001297 # instance is to be created. The URI is in the form gs:
1298 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
1299 # // Dumps should have the binlog co-ordinates from which replication should
1300 # // begin. This can be accomplished by setting --master-data to 1 when using
1301 # // mysqldump.
Bu Sun Kim65020912020-05-20 12:08:20 -07001302 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
1303 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1304 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1305 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
1306 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1307 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the master&#x27;s Common Name value in the certificate
1308 # that it sends during the SSL handshake.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001309 },
1310 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001311 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
1312 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable
1313 # only to Second Generation instances.
1314 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates
1315 # that the failover replica is out of sync. The master can only failover to
1316 # the failover replica when the status is true.
1317 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a
1318 # failover replica is created for the instance. The name
1319 # doesn&#x27;t include the project ID. This property is applicable only to
1320 # Second Generation instances.
1321 },
1322 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1323 { # Database instance IP Mapping.
1324 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in &lt;a
1325 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1326 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
1327 # the IP is scheduled to be retired.
1328 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A &lt;code&gt;PRIMARY&lt;/code&gt; address is a public
1329 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
1330 # address is a private address that can accept incoming connections. An
1331 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
1332 # originating from the instance, if supported.
1333 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1334 },
1335 ],
1336 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. This property is applicable only
1337 # to First Generation instances.
1338 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1339 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
1340 # Applies only to Second Generation instances.
1341 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1342 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
1343 },
1344 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
1345 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
1346 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
1347 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
1348 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
1349 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
1350 # or Second Generation). The region can not be changed after instance
1351 # creation.
1352 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the
1353 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
1354 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
1355 # available, for example due to problems with billing.
1356 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
1357 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
1358 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
1359 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
1360 &quot;backendType&quot;: &quot;A String&quot;, # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
1361 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
1362 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
1363 # managed by Google. &lt;br&gt;This property is read-only; use the
1364 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
1365 # the database type and Second or First Generation.
1366 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1367 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
1368 # is encoded in the client&#x27;s certificate.
1369 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1370 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1371 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
1372 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1373 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1374 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
1375 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1376 },
1377 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google
1378 # apps domain is prefixed if applicable.
1379 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property
1380 # is applicable only to Second Generation instances.
1381 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
1382 # field can not be changed after instance creation. MySQL Second Generation
1383 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
1384 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
1385 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
1386 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
Craig Citroe633be12015-03-02 13:40:36 -08001387 }</pre>
1388</div>
1389
1390<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001391 <code class="details" id="import_">import_(project, instance, body=None, x__xgafv=None)</code>
1392 <pre>Imports data into a Cloud SQL instance from a SQL dump or CSV file in
1393Cloud Storage.
Craig Citroe633be12015-03-02 13:40:36 -08001394
1395Args:
1396 project: string, Project ID of the project that contains the instance. (required)
1397 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001398 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08001399 The object takes the form of:
1400
1401{ # Database instance import request.
Bu Sun Kim65020912020-05-20 12:08:20 -07001402 &quot;importContext&quot;: { # Database instance import context. # Contains details about the import operation.
1403 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
1404 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1405 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1406 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
1407 # of the database table are loaded with CSV data.
1408 &quot;A String&quot;,
1409 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001410 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001411 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -07001412 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
1413 # specify a database, and is overridden by any database specification in the
1414 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
1415 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -07001416 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1417 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1418 &quot;encryptionOptions&quot;: {
1419 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
1420 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1421 # write permissions to the bucket and read access to the file.
1422 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
1423 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1424 # write permissions to the bucket and read access to the file.
1425 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1426 },
1427 },
1428 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -07001429 # &lt;code&gt;gs:
1430 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
1431 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
1432 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001433 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1434 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08001435 },
1436 }
1437
Dan O'Mearadd494642020-05-01 07:42:23 -07001438 x__xgafv: string, V1 error format.
1439 Allowed values
1440 1 - v1 error format
1441 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001442
1443Returns:
1444 An object of the form:
1445
Dan O'Mearadd494642020-05-01 07:42:23 -07001446 { # An Operation resource.&amp;nbsp;For successful operations that return an
1447 # Operation resource, only the fields relevant to the operation are populated
1448 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001449 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
1450 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1451 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1452 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
1453 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1454 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1455 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
1456 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1457 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1458 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1459 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1460 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1461 &quot;targetLink&quot;: &quot;A String&quot;,
1462 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
1463 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
1464 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
1465 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
1466 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
1467 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
1468 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
1469 # populated.
1470 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1471 { # Database instance operation error.
1472 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
1473 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1474 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07001475 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001476 ],
1477 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
1478 },
1479 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
1480 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1481 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
1482 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1483 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1484 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
1485 # of the database table are loaded with CSV data.
1486 &quot;A String&quot;,
1487 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001488 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001489 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -07001490 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
1491 # specify a database, and is overridden by any database specification in the
1492 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
1493 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -07001494 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1495 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1496 &quot;encryptionOptions&quot;: {
1497 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
1498 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1499 # write permissions to the bucket and read access to the file.
1500 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
1501 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1502 # write permissions to the bucket and read access to the file.
1503 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1504 },
1505 },
1506 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -07001507 # &lt;code&gt;gs:
1508 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
1509 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
1510 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001511 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1512 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08001513 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001514 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
1515 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
1516 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
1517 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -07001518 # identifier to retrieve the Operations resource that has information about
1519 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001520 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1521 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -07001522 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
1523 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
1524 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
1525 # either by using this property or by using the
1526 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
1527 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
1528 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
1529 # this database must match the one specified in the
1530 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -07001531 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08001532 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001533 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1534 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -07001535 # you specify tables, specify one and only one database. For PostgreSQL
1536 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07001537 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08001538 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001539 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1540 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1541 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -07001542 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
1543 # a CHANGE MASTER TO statement with the binary log coordinates.
1544 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
1545 # a SQL comment, and has no effect.
1546 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001547 },
Craig Citroe633be12015-03-02 13:40:36 -08001548 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001549 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1550 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1551 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
1552 # stored. The URI is in the form &lt;code&gt;gs:
1553 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
1554 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
1555 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
1556 # // compressed.
1557 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
1558 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1559 },
1560 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08001561 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001562 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08001563 }</pre>
1564</div>
1565
1566<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001567 <code class="details" id="insert">insert(project, body=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08001568 <pre>Creates a new Cloud SQL instance.
1569
1570Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001571 project: string, Project ID of the project to which the newly created Cloud SQL instances
1572should belong. (required)
1573 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08001574 The object takes the form of:
1575
1576{ # A Cloud SQL instance resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001577 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1578 &quot;A String&quot;,
1579 ],
1580 &quot;settings&quot;: { # Database instance settings. # The user settings.
1581 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
1582 # instance IP and manage which external networks can connect to the instance.
1583 # The IPv4 address cannot be disabled for Second Generation instances.
1584 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP should be enforced or not.
1585 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is
1586 # accessible for private IP. For example,
1587 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
1588 # be updated, but it cannot be removed after it is set.
1589 &quot;ipv4Enabled&quot;: True or False, # Whether the instance should be assigned an IP address or not.
1590 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance
1591 # using the IP. In &lt;a
1592 # href=&quot;http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation&quot;&gt;CIDR
1593 # notation&lt;/a&gt;, also known as &#x27;slash&#x27; notation (e.g.
1594 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
1595 { # An entry for an Access Control list.
1596 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1597 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
1598 &quot;value&quot;: &quot;A String&quot;, # The whitelisted value for the access control list.
1599 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in &lt;a
1600 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1601 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1602 },
1603 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001604 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001605 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type (PostgreSQL and MySQL instances only). Potential values:
Dan O'Mearadd494642020-05-01 07:42:23 -07001606 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
1607 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
1608 # The instance can serve data from more than one zone in a region (it is
1609 # highly available). &lt;br&gt;For more information, see &lt;a
Bu Sun Kim65020912020-05-20 12:08:20 -07001610 # href=&quot;https://cloud.google.com/sql/docs/postgres/high-availability&quot;&gt;Overview
Dan O'Mearadd494642020-05-01 07:42:23 -07001611 # of the High Availability Configuration&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001612 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update
1613 # method to make sure concurrent updates are handled properly. During update,
1614 # use the most recent settingsVersion value for this instance and do not try
1615 # to update this value.
1616 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1617 { # Database flags for Cloud SQL instances.
1618 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so
1619 # include both server options and system variables for MySQL. Flags should be
1620 # specified with underscores, not hyphens. For more information, see &lt;a
1621 # href=&quot;/sql/docs/mysql/flags&quot;&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
1622 # SQL documentation.
1623 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans should be set to &lt;code&gt;on&lt;/code&gt; for true
1624 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
1625 # doesn&#x27;t take a value.
1626 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001627 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001628 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance
1629 # can be restarted for maintenance purposes. Not used for First Generation
1630 # instances.
1631 # preferably be restarted for system maintenance purposes.
1632 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1633 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1634 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
1635 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: &lt;code&gt;canary&lt;/code&gt; (Earlier) or
1636 # &lt;code&gt;stable&lt;/code&gt; (Later). &lt;br /&gt;&lt;a
1637 # href=&quot;/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen&quot;&gt;
1638 # Learn more&lt;/a&gt;.
1639 },
1640 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either &lt;code&gt;PER_USE&lt;/code&gt;
1641 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
1642 # Generation instances.
1643 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is
1644 # true. Not used for First Generation instances.
1645 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased.
1646 # The default value is 0, which specifies that there is no limit. Not used
1647 # for First Generation instances.
1648 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. First Generation
1649 # instances only.
1650 &quot;A String&quot;,
1651 ],
1652 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example
1653 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
1654 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
1655 # this property determines whether the instance is First or Second
1656 # Generation. For more information, see &lt;a
1657 # href=&quot;/sql/docs/db_path/instance-settings&quot;&gt;Instance Settings&lt;/a&gt;.
1658 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
1659 # for First Generation instances.
1660 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
1661 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
1662 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
1663 # replication is enabled or not.
1664 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
1665 # database flags for crash-safe replication are enabled. This property is
1666 # only applicable to First Generation instances.
1667 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1668 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
1669 # disabled, binarylog must be disabled as well.
1670 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1671 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1672 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
1673 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24
1674 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
1675 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
1676 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1677 },
1678 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a
1679 # single key value pair.
1680 &quot;a_key&quot;: &quot;A String&quot;,
1681 },
1682 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as
1683 # near as possible to either an App Engine app or Compute Engine zone for
1684 # better performance. App Engine co-location is only applicable to First
1685 # Generation instances.
1686 # preferably be located, either in a specific Compute Engine zone, or
1687 # co-located with an App Engine application. Note that if the preferred
1688 # location is not available, the instance will be located as close as possible
1689 # within the region. Only one location may be specified.
1690 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
1691 # etc.).
1692 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The AppEngine application to follow, it must be in the same region as the
1693 # Cloud SQL instance.
1694 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
1695 },
1696 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
1697 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either
1698 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
1699 # only applicable to First Generation instances.
1700 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is
Dan O'Mearadd494642020-05-01 07:42:23 -07001701 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
1702 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
1703 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
1704 # off; it is not activated, even if a connection request arrives.
1705 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
1706 # responds to incoming requests, and turns itself off when not in use.
1707 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
1708 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
1709 # 12 hours of inactivity.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001710 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001711 &quot;replicaNames&quot;: [ # The replicas of the instance.
1712 &quot;A String&quot;,
1713 ],
1714 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
1715 # Applies only to Second Generation instances.
1716 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
1717 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1718 },
1719 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1720 &quot;canDefer&quot;: True or False,
1721 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1722 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1723 },
1724 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
1725 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
1726 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
1727 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1728 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1729 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1730 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1731 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
1732 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1733 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in &lt;a
1734 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1735 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
1736 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1737 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1738 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in &lt;a
1739 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1740 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1741 },
1742 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1743 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1744 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as master in the replication setup.
1745 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following.
1746 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
1747 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
1748 # instance running on the
1749 # customer&#x27;s premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
1750 # instance configured as a read-replica.
1751 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This
1752 # value could be different from the zone that was specified when the instance
1753 # was created if the instance has failed over to its secondary zone.
1754 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been
1755 # deprecated. Users should use the
1756 # &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud
1757 # Monitoring API instead. Please see &lt;a
1758 # href=&quot;https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ&quot;&gt;this
1759 # announcement&lt;/a&gt; for details.
1760 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
1761 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to
Dan O'Mearadd494642020-05-01 07:42:23 -07001762 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
1763 # case the master instance fails, the replica instance will be promoted as
1764 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
1765 # target, and the replica has to be in different zone with the master
1766 # instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07001767 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
1768 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
Dan O'Mearadd494642020-05-01 07:42:23 -07001769 # master. Replication configuration information such as the username,
1770 # password, certificates, and keys are not stored in the instance metadata.
1771 # The configuration information is used only to set up the replication
1772 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
1773 # in the data directory.
Bu Sun Kim65020912020-05-20 12:08:20 -07001774 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
1775 # is encoded in the client&#x27;s certificate.
1776 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1777 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1778 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1779 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the slave
Dan O'Mearadd494642020-05-01 07:42:23 -07001780 # instance is to be created. The URI is in the form gs:
1781 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
1782 # // Dumps should have the binlog co-ordinates from which replication should
1783 # // begin. This can be accomplished by setting --master-data to 1 when using
1784 # // mysqldump.
Bu Sun Kim65020912020-05-20 12:08:20 -07001785 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
1786 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1787 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1788 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
1789 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1790 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the master&#x27;s Common Name value in the certificate
1791 # that it sends during the SSL handshake.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001792 },
1793 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001794 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
1795 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable
1796 # only to Second Generation instances.
1797 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates
1798 # that the failover replica is out of sync. The master can only failover to
1799 # the failover replica when the status is true.
1800 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a
1801 # failover replica is created for the instance. The name
1802 # doesn&#x27;t include the project ID. This property is applicable only to
1803 # Second Generation instances.
1804 },
1805 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1806 { # Database instance IP Mapping.
1807 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in &lt;a
1808 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1809 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
1810 # the IP is scheduled to be retired.
1811 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A &lt;code&gt;PRIMARY&lt;/code&gt; address is a public
1812 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
1813 # address is a private address that can accept incoming connections. An
1814 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
1815 # originating from the instance, if supported.
1816 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1817 },
1818 ],
1819 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. This property is applicable only
1820 # to First Generation instances.
1821 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1822 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
1823 # Applies only to Second Generation instances.
1824 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1825 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
1826 },
1827 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
1828 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
1829 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
1830 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
1831 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
1832 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
1833 # or Second Generation). The region can not be changed after instance
1834 # creation.
1835 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the
1836 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
1837 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
1838 # available, for example due to problems with billing.
1839 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
1840 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
1841 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
1842 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
1843 &quot;backendType&quot;: &quot;A String&quot;, # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
1844 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
1845 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
1846 # managed by Google. &lt;br&gt;This property is read-only; use the
1847 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
1848 # the database type and Second or First Generation.
1849 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1850 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
1851 # is encoded in the client&#x27;s certificate.
1852 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1853 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1854 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
1855 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1856 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1857 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
1858 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1859 },
1860 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google
1861 # apps domain is prefixed if applicable.
1862 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property
1863 # is applicable only to Second Generation instances.
1864 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
1865 # field can not be changed after instance creation. MySQL Second Generation
1866 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
1867 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
1868 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
1869 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
Craig Citroe633be12015-03-02 13:40:36 -08001870 }
1871
Dan O'Mearadd494642020-05-01 07:42:23 -07001872 x__xgafv: string, V1 error format.
1873 Allowed values
1874 1 - v1 error format
1875 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001876
1877Returns:
1878 An object of the form:
1879
Dan O'Mearadd494642020-05-01 07:42:23 -07001880 { # An Operation resource.&amp;nbsp;For successful operations that return an
1881 # Operation resource, only the fields relevant to the operation are populated
1882 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001883 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
1884 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1885 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1886 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
1887 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1888 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1889 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
1890 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
1891 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1892 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1893 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1894 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1895 &quot;targetLink&quot;: &quot;A String&quot;,
1896 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
1897 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
1898 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
1899 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
1900 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
1901 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
1902 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
1903 # populated.
1904 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1905 { # Database instance operation error.
1906 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
1907 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1908 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07001909 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001910 ],
1911 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
1912 },
1913 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
1914 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1915 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
1916 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1917 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1918 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
1919 # of the database table are loaded with CSV data.
1920 &quot;A String&quot;,
1921 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001922 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001923 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -07001924 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
1925 # specify a database, and is overridden by any database specification in the
1926 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
1927 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -07001928 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1929 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1930 &quot;encryptionOptions&quot;: {
1931 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
1932 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1933 # write permissions to the bucket and read access to the file.
1934 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
1935 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1936 # write permissions to the bucket and read access to the file.
1937 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1938 },
1939 },
1940 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -07001941 # &lt;code&gt;gs:
1942 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
1943 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
1944 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001945 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1946 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08001947 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001948 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
1949 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
1950 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
1951 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -07001952 # identifier to retrieve the Operations resource that has information about
1953 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001954 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1955 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -07001956 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
1957 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
1958 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
1959 # either by using this property or by using the
1960 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
1961 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
1962 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
1963 # this database must match the one specified in the
1964 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -07001965 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08001966 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001967 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1968 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -07001969 # you specify tables, specify one and only one database. For PostgreSQL
1970 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07001971 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08001972 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001973 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1974 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1975 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -07001976 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
1977 # a CHANGE MASTER TO statement with the binary log coordinates.
1978 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
1979 # a SQL comment, and has no effect.
1980 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001981 },
Craig Citroe633be12015-03-02 13:40:36 -08001982 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001983 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1984 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1985 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
1986 # stored. The URI is in the form &lt;code&gt;gs:
1987 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
1988 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
1989 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
1990 # // compressed.
1991 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
1992 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1993 },
1994 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08001995 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001996 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08001997 }</pre>
1998</div>
1999
2000<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002001 <code class="details" id="list">list(project, filter=None, pageToken=None, maxResults=None, x__xgafv=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -07002002 <pre>Lists instances under a given project.
Craig Citroe633be12015-03-02 13:40:36 -08002003
2004Args:
2005 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -07002006 filter: string, A filter expression that filters resources listed in the response.
2007The expression is in the form of field:value. For example,
2008&#x27;instanceType:CLOUD_SQL_INSTANCE&#x27;. Fields can be nested as needed as per
2009their JSON representation, such as &#x27;settings.userLabels.auto_start:true&#x27;.
2010
2011Multiple filter queries are space-separated. For example.
2012&#x27;state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE&#x27;. By default, each
2013expression is an AND expression. However, you can include AND and OR
2014expressions explicitly.
Dan O'Mearadd494642020-05-01 07:42:23 -07002015 pageToken: string, A previously-returned page token representing part of the larger set of
2016results to view.
Craig Citroe633be12015-03-02 13:40:36 -08002017 maxResults: integer, The maximum number of results to return per response.
Dan O'Mearadd494642020-05-01 07:42:23 -07002018 x__xgafv: string, V1 error format.
2019 Allowed values
2020 1 - v1 error format
2021 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002022
2023Returns:
2024 An object of the form:
2025
2026 { # Database instances list response.
Bu Sun Kim65020912020-05-20 12:08:20 -07002027 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instancesList&lt;/code&gt;.
2028 &quot;items&quot;: [ # List of database instance resources.
Craig Citroe633be12015-03-02 13:40:36 -08002029 { # A Cloud SQL instance resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002030 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
2031 &quot;A String&quot;,
2032 ],
2033 &quot;settings&quot;: { # Database instance settings. # The user settings.
2034 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
2035 # instance IP and manage which external networks can connect to the instance.
2036 # The IPv4 address cannot be disabled for Second Generation instances.
2037 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP should be enforced or not.
2038 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is
2039 # accessible for private IP. For example,
2040 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
2041 # be updated, but it cannot be removed after it is set.
2042 &quot;ipv4Enabled&quot;: True or False, # Whether the instance should be assigned an IP address or not.
2043 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance
2044 # using the IP. In &lt;a
2045 # href=&quot;http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation&quot;&gt;CIDR
2046 # notation&lt;/a&gt;, also known as &#x27;slash&#x27; notation (e.g.
2047 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
2048 { # An entry for an Access Control list.
2049 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
2050 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
2051 &quot;value&quot;: &quot;A String&quot;, # The whitelisted value for the access control list.
2052 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in &lt;a
2053 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2054 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2055 },
2056 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002057 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002058 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type (PostgreSQL and MySQL instances only). Potential values:
Dan O'Mearadd494642020-05-01 07:42:23 -07002059 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
2060 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
2061 # The instance can serve data from more than one zone in a region (it is
2062 # highly available). &lt;br&gt;For more information, see &lt;a
Bu Sun Kim65020912020-05-20 12:08:20 -07002063 # href=&quot;https://cloud.google.com/sql/docs/postgres/high-availability&quot;&gt;Overview
Dan O'Mearadd494642020-05-01 07:42:23 -07002064 # of the High Availability Configuration&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002065 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update
2066 # method to make sure concurrent updates are handled properly. During update,
2067 # use the most recent settingsVersion value for this instance and do not try
2068 # to update this value.
2069 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
2070 { # Database flags for Cloud SQL instances.
2071 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so
2072 # include both server options and system variables for MySQL. Flags should be
2073 # specified with underscores, not hyphens. For more information, see &lt;a
2074 # href=&quot;/sql/docs/mysql/flags&quot;&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
2075 # SQL documentation.
2076 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans should be set to &lt;code&gt;on&lt;/code&gt; for true
2077 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
2078 # doesn&#x27;t take a value.
2079 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002080 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002081 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance
2082 # can be restarted for maintenance purposes. Not used for First Generation
2083 # instances.
2084 # preferably be restarted for system maintenance purposes.
2085 &quot;hour&quot;: 42, # hour of day - 0 to 23.
2086 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
2087 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
2088 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: &lt;code&gt;canary&lt;/code&gt; (Earlier) or
2089 # &lt;code&gt;stable&lt;/code&gt; (Later). &lt;br /&gt;&lt;a
2090 # href=&quot;/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen&quot;&gt;
2091 # Learn more&lt;/a&gt;.
2092 },
2093 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either &lt;code&gt;PER_USE&lt;/code&gt;
2094 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
2095 # Generation instances.
2096 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is
2097 # true. Not used for First Generation instances.
2098 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased.
2099 # The default value is 0, which specifies that there is no limit. Not used
2100 # for First Generation instances.
2101 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. First Generation
2102 # instances only.
2103 &quot;A String&quot;,
2104 ],
2105 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example
2106 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
2107 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
2108 # this property determines whether the instance is First or Second
2109 # Generation. For more information, see &lt;a
2110 # href=&quot;/sql/docs/db_path/instance-settings&quot;&gt;Instance Settings&lt;/a&gt;.
2111 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
2112 # for First Generation instances.
2113 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
2114 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
2115 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
2116 # replication is enabled or not.
2117 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
2118 # database flags for crash-safe replication are enabled. This property is
2119 # only applicable to First Generation instances.
2120 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
2121 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
2122 # disabled, binarylog must be disabled as well.
2123 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
2124 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
2125 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
2126 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24
2127 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
2128 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
2129 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
2130 },
2131 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a
2132 # single key value pair.
2133 &quot;a_key&quot;: &quot;A String&quot;,
2134 },
2135 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as
2136 # near as possible to either an App Engine app or Compute Engine zone for
2137 # better performance. App Engine co-location is only applicable to First
2138 # Generation instances.
2139 # preferably be located, either in a specific Compute Engine zone, or
2140 # co-located with an App Engine application. Note that if the preferred
2141 # location is not available, the instance will be located as close as possible
2142 # within the region. Only one location may be specified.
2143 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
2144 # etc.).
2145 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The AppEngine application to follow, it must be in the same region as the
2146 # Cloud SQL instance.
2147 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
2148 },
2149 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
2150 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either
2151 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
2152 # only applicable to First Generation instances.
2153 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is
Dan O'Mearadd494642020-05-01 07:42:23 -07002154 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
2155 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
2156 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
2157 # off; it is not activated, even if a connection request arrives.
2158 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
2159 # responds to incoming requests, and turns itself off when not in use.
2160 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
2161 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
2162 # 12 hours of inactivity.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002163 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002164 &quot;replicaNames&quot;: [ # The replicas of the instance.
2165 &quot;A String&quot;,
2166 ],
2167 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
2168 # Applies only to Second Generation instances.
2169 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
2170 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
2171 },
2172 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
2173 &quot;canDefer&quot;: True or False,
2174 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
2175 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
2176 },
2177 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
2178 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
2179 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
2180 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
2181 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
2182 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
2183 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
2184 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
2185 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
2186 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in &lt;a
2187 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2188 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
2189 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
2190 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2191 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in &lt;a
2192 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2193 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2194 },
2195 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
2196 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
2197 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as master in the replication setup.
2198 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following.
2199 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
2200 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
2201 # instance running on the
2202 # customer&#x27;s premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
2203 # instance configured as a read-replica.
2204 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This
2205 # value could be different from the zone that was specified when the instance
2206 # was created if the instance has failed over to its secondary zone.
2207 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been
2208 # deprecated. Users should use the
2209 # &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud
2210 # Monitoring API instead. Please see &lt;a
2211 # href=&quot;https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ&quot;&gt;this
2212 # announcement&lt;/a&gt; for details.
2213 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
2214 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to
Dan O'Mearadd494642020-05-01 07:42:23 -07002215 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
2216 # case the master instance fails, the replica instance will be promoted as
2217 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
2218 # target, and the replica has to be in different zone with the master
2219 # instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002220 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
2221 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
Dan O'Mearadd494642020-05-01 07:42:23 -07002222 # master. Replication configuration information such as the username,
2223 # password, certificates, and keys are not stored in the instance metadata.
2224 # The configuration information is used only to set up the replication
2225 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
2226 # in the data directory.
Bu Sun Kim65020912020-05-20 12:08:20 -07002227 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
2228 # is encoded in the client&#x27;s certificate.
2229 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
2230 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
2231 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
2232 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the slave
Dan O'Mearadd494642020-05-01 07:42:23 -07002233 # instance is to be created. The URI is in the form gs:
2234 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
2235 # // Dumps should have the binlog co-ordinates from which replication should
2236 # // begin. This can be accomplished by setting --master-data to 1 when using
2237 # // mysqldump.
Bu Sun Kim65020912020-05-20 12:08:20 -07002238 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
2239 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
2240 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2241 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
2242 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
2243 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the master&#x27;s Common Name value in the certificate
2244 # that it sends during the SSL handshake.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002245 },
2246 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002247 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
2248 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable
2249 # only to Second Generation instances.
2250 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates
2251 # that the failover replica is out of sync. The master can only failover to
2252 # the failover replica when the status is true.
2253 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a
2254 # failover replica is created for the instance. The name
2255 # doesn&#x27;t include the project ID. This property is applicable only to
2256 # Second Generation instances.
2257 },
2258 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
2259 { # Database instance IP Mapping.
2260 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in &lt;a
2261 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2262 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
2263 # the IP is scheduled to be retired.
2264 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A &lt;code&gt;PRIMARY&lt;/code&gt; address is a public
2265 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
2266 # address is a private address that can accept incoming connections. An
2267 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
2268 # originating from the instance, if supported.
2269 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
2270 },
2271 ],
2272 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. This property is applicable only
2273 # to First Generation instances.
2274 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2275 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
2276 # Applies only to Second Generation instances.
2277 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
2278 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
2279 },
2280 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
2281 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
2282 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
2283 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
2284 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
2285 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
2286 # or Second Generation). The region can not be changed after instance
2287 # creation.
2288 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the
2289 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
2290 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
2291 # available, for example due to problems with billing.
2292 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
2293 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
2294 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
2295 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
2296 &quot;backendType&quot;: &quot;A String&quot;, # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
2297 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
2298 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
2299 # managed by Google. &lt;br&gt;This property is read-only; use the
2300 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
2301 # the database type and Second or First Generation.
2302 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
2303 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
2304 # is encoded in the client&#x27;s certificate.
2305 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
2306 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
2307 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
2308 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
2309 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2310 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
2311 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
2312 },
2313 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google
2314 # apps domain is prefixed if applicable.
2315 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property
2316 # is applicable only to Second Generation instances.
2317 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
2318 # field can not be changed after instance creation. MySQL Second Generation
2319 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
2320 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
2321 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
2322 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
Craig Citroe633be12015-03-02 13:40:36 -08002323 },
2324 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002325 &quot;warnings&quot;: [ # List of warnings that occurred while handling the request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002326 { # An Admin API warning message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002327 &quot;code&quot;: &quot;A String&quot;, # Code to uniquely identify the warning type.
2328 &quot;message&quot;: &quot;A String&quot;, # The warning message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002329 },
2330 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002331 &quot;nextPageToken&quot;: &quot;A String&quot;, # The continuation token, used to page through large result sets. Provide
2332 # this value in a subsequent request to return the next page of results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002333 }</pre>
2334</div>
2335
2336<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002337 <code class="details" id="listServerCas">listServerCas(project, instance, x__xgafv=None)</code>
2338 <pre>Lists all of the trusted Certificate Authorities (CAs) for the specified
2339instance. There can be up to three CAs listed: the CA that was used to sign
2340the certificate that is currently in use, a CA that has been added but not
2341yet used to sign a certificate, and a CA used to sign a certificate that
2342has previously rotated out.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002343
2344Args:
2345 project: string, Project ID of the project that contains the instance. (required)
2346 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002347 x__xgafv: string, V1 error format.
2348 Allowed values
2349 1 - v1 error format
2350 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002351
2352Returns:
2353 An object of the form:
2354
2355 { # Instances ListServerCas response.
Bu Sun Kim65020912020-05-20 12:08:20 -07002356 &quot;activeVersion&quot;: &quot;A String&quot;,
2357 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instancesListServerCas&lt;/code&gt;.
2358 &quot;certs&quot;: [ # List of server CA certificates for the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002359 { # SslCerts Resource
Bu Sun Kim65020912020-05-20 12:08:20 -07002360 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
2361 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
2362 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
2363 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
2364 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
2365 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in &lt;a
2366 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
Dan O'Mearadd494642020-05-01 07:42:23 -07002367 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
Bu Sun Kim65020912020-05-20 12:08:20 -07002368 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
2369 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2370 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in &lt;a
2371 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2372 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002373 },
2374 ],
Craig Citroe633be12015-03-02 13:40:36 -08002375 }</pre>
2376</div>
2377
2378<div class="method">
2379 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2380 <pre>Retrieves the next page of results.
2381
2382Args:
2383 previous_request: The request for the previous page. (required)
2384 previous_response: The response from the request for the previous page. (required)
2385
2386Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002387 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citroe633be12015-03-02 13:40:36 -08002388 page. Returns None if there are no more items in the collection.
2389 </pre>
2390</div>
2391
2392<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002393 <code class="details" id="patch">patch(project, instance, body=None, x__xgafv=None)</code>
2394 <pre>Updates settings of a Cloud SQL instance.
2395This method supports patch semantics.
Craig Citroe633be12015-03-02 13:40:36 -08002396
2397Args:
2398 project: string, Project ID of the project that contains the instance. (required)
2399 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002400 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08002401 The object takes the form of:
2402
2403{ # A Cloud SQL instance resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002404 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
2405 &quot;A String&quot;,
2406 ],
2407 &quot;settings&quot;: { # Database instance settings. # The user settings.
2408 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
2409 # instance IP and manage which external networks can connect to the instance.
2410 # The IPv4 address cannot be disabled for Second Generation instances.
2411 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP should be enforced or not.
2412 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is
2413 # accessible for private IP. For example,
2414 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
2415 # be updated, but it cannot be removed after it is set.
2416 &quot;ipv4Enabled&quot;: True or False, # Whether the instance should be assigned an IP address or not.
2417 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance
2418 # using the IP. In &lt;a
2419 # href=&quot;http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation&quot;&gt;CIDR
2420 # notation&lt;/a&gt;, also known as &#x27;slash&#x27; notation (e.g.
2421 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
2422 { # An entry for an Access Control list.
2423 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
2424 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
2425 &quot;value&quot;: &quot;A String&quot;, # The whitelisted value for the access control list.
2426 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in &lt;a
2427 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2428 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2429 },
2430 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002431 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002432 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type (PostgreSQL and MySQL instances only). Potential values:
Dan O'Mearadd494642020-05-01 07:42:23 -07002433 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
2434 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
2435 # The instance can serve data from more than one zone in a region (it is
2436 # highly available). &lt;br&gt;For more information, see &lt;a
Bu Sun Kim65020912020-05-20 12:08:20 -07002437 # href=&quot;https://cloud.google.com/sql/docs/postgres/high-availability&quot;&gt;Overview
Dan O'Mearadd494642020-05-01 07:42:23 -07002438 # of the High Availability Configuration&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07002439 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update
2440 # method to make sure concurrent updates are handled properly. During update,
2441 # use the most recent settingsVersion value for this instance and do not try
2442 # to update this value.
2443 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
2444 { # Database flags for Cloud SQL instances.
2445 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so
2446 # include both server options and system variables for MySQL. Flags should be
2447 # specified with underscores, not hyphens. For more information, see &lt;a
2448 # href=&quot;/sql/docs/mysql/flags&quot;&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
2449 # SQL documentation.
2450 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans should be set to &lt;code&gt;on&lt;/code&gt; for true
2451 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
2452 # doesn&#x27;t take a value.
2453 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002454 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002455 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance
2456 # can be restarted for maintenance purposes. Not used for First Generation
2457 # instances.
2458 # preferably be restarted for system maintenance purposes.
2459 &quot;hour&quot;: 42, # hour of day - 0 to 23.
2460 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
2461 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
2462 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: &lt;code&gt;canary&lt;/code&gt; (Earlier) or
2463 # &lt;code&gt;stable&lt;/code&gt; (Later). &lt;br /&gt;&lt;a
2464 # href=&quot;/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen&quot;&gt;
2465 # Learn more&lt;/a&gt;.
2466 },
2467 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either &lt;code&gt;PER_USE&lt;/code&gt;
2468 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
2469 # Generation instances.
2470 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is
2471 # true. Not used for First Generation instances.
2472 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased.
2473 # The default value is 0, which specifies that there is no limit. Not used
2474 # for First Generation instances.
2475 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. First Generation
2476 # instances only.
2477 &quot;A String&quot;,
2478 ],
2479 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example
2480 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
2481 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
2482 # this property determines whether the instance is First or Second
2483 # Generation. For more information, see &lt;a
2484 # href=&quot;/sql/docs/db_path/instance-settings&quot;&gt;Instance Settings&lt;/a&gt;.
2485 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
2486 # for First Generation instances.
2487 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
2488 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
2489 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
2490 # replication is enabled or not.
2491 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
2492 # database flags for crash-safe replication are enabled. This property is
2493 # only applicable to First Generation instances.
2494 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
2495 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
2496 # disabled, binarylog must be disabled as well.
2497 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
2498 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
2499 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
2500 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24
2501 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
2502 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
2503 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
2504 },
2505 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a
2506 # single key value pair.
2507 &quot;a_key&quot;: &quot;A String&quot;,
2508 },
2509 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as
2510 # near as possible to either an App Engine app or Compute Engine zone for
2511 # better performance. App Engine co-location is only applicable to First
2512 # Generation instances.
2513 # preferably be located, either in a specific Compute Engine zone, or
2514 # co-located with an App Engine application. Note that if the preferred
2515 # location is not available, the instance will be located as close as possible
2516 # within the region. Only one location may be specified.
2517 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
2518 # etc.).
2519 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The AppEngine application to follow, it must be in the same region as the
2520 # Cloud SQL instance.
2521 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
2522 },
2523 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
2524 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either
2525 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
2526 # only applicable to First Generation instances.
2527 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is
Dan O'Mearadd494642020-05-01 07:42:23 -07002528 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
2529 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
2530 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
2531 # off; it is not activated, even if a connection request arrives.
2532 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
2533 # responds to incoming requests, and turns itself off when not in use.
2534 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
2535 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
2536 # 12 hours of inactivity.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002537 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002538 &quot;replicaNames&quot;: [ # The replicas of the instance.
2539 &quot;A String&quot;,
2540 ],
2541 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
2542 # Applies only to Second Generation instances.
2543 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
2544 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
2545 },
2546 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
2547 &quot;canDefer&quot;: True or False,
2548 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
2549 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
2550 },
2551 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
2552 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
2553 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
2554 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
2555 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
2556 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
2557 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
2558 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
2559 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
2560 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in &lt;a
2561 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2562 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
2563 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
2564 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2565 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in &lt;a
2566 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2567 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2568 },
2569 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
2570 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
2571 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as master in the replication setup.
2572 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following.
2573 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
2574 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
2575 # instance running on the
2576 # customer&#x27;s premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
2577 # instance configured as a read-replica.
2578 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This
2579 # value could be different from the zone that was specified when the instance
2580 # was created if the instance has failed over to its secondary zone.
2581 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been
2582 # deprecated. Users should use the
2583 # &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud
2584 # Monitoring API instead. Please see &lt;a
2585 # href=&quot;https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ&quot;&gt;this
2586 # announcement&lt;/a&gt; for details.
2587 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
2588 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to
Dan O'Mearadd494642020-05-01 07:42:23 -07002589 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
2590 # case the master instance fails, the replica instance will be promoted as
2591 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
2592 # target, and the replica has to be in different zone with the master
2593 # instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002594 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
2595 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
Dan O'Mearadd494642020-05-01 07:42:23 -07002596 # master. Replication configuration information such as the username,
2597 # password, certificates, and keys are not stored in the instance metadata.
2598 # The configuration information is used only to set up the replication
2599 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
2600 # in the data directory.
Bu Sun Kim65020912020-05-20 12:08:20 -07002601 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
2602 # is encoded in the client&#x27;s certificate.
2603 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
2604 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
2605 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
2606 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the slave
Dan O'Mearadd494642020-05-01 07:42:23 -07002607 # instance is to be created. The URI is in the form gs:
2608 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
2609 # // Dumps should have the binlog co-ordinates from which replication should
2610 # // begin. This can be accomplished by setting --master-data to 1 when using
2611 # // mysqldump.
Bu Sun Kim65020912020-05-20 12:08:20 -07002612 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
2613 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
2614 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2615 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
2616 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
2617 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the master&#x27;s Common Name value in the certificate
2618 # that it sends during the SSL handshake.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002619 },
2620 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002621 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
2622 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable
2623 # only to Second Generation instances.
2624 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates
2625 # that the failover replica is out of sync. The master can only failover to
2626 # the failover replica when the status is true.
2627 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a
2628 # failover replica is created for the instance. The name
2629 # doesn&#x27;t include the project ID. This property is applicable only to
2630 # Second Generation instances.
2631 },
2632 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
2633 { # Database instance IP Mapping.
2634 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in &lt;a
2635 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2636 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
2637 # the IP is scheduled to be retired.
2638 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A &lt;code&gt;PRIMARY&lt;/code&gt; address is a public
2639 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
2640 # address is a private address that can accept incoming connections. An
2641 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
2642 # originating from the instance, if supported.
2643 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
2644 },
2645 ],
2646 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. This property is applicable only
2647 # to First Generation instances.
2648 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2649 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
2650 # Applies only to Second Generation instances.
2651 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
2652 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
2653 },
2654 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
2655 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
2656 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
2657 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
2658 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
2659 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
2660 # or Second Generation). The region can not be changed after instance
2661 # creation.
2662 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the
2663 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
2664 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
2665 # available, for example due to problems with billing.
2666 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
2667 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
2668 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
2669 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
2670 &quot;backendType&quot;: &quot;A String&quot;, # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
2671 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
2672 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
2673 # managed by Google. &lt;br&gt;This property is read-only; use the
2674 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
2675 # the database type and Second or First Generation.
2676 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
2677 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
2678 # is encoded in the client&#x27;s certificate.
2679 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
2680 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
2681 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
2682 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
2683 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2684 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
2685 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
2686 },
2687 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google
2688 # apps domain is prefixed if applicable.
2689 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property
2690 # is applicable only to Second Generation instances.
2691 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
2692 # field can not be changed after instance creation. MySQL Second Generation
2693 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
2694 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
2695 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
2696 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
Craig Citroe633be12015-03-02 13:40:36 -08002697 }
2698
Dan O'Mearadd494642020-05-01 07:42:23 -07002699 x__xgafv: string, V1 error format.
2700 Allowed values
2701 1 - v1 error format
2702 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002703
2704Returns:
2705 An object of the form:
2706
Dan O'Mearadd494642020-05-01 07:42:23 -07002707 { # An Operation resource.&amp;nbsp;For successful operations that return an
2708 # Operation resource, only the fields relevant to the operation are populated
2709 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002710 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
2711 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2712 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2713 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
2714 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2715 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2716 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
2717 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2718 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2719 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2720 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2721 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2722 &quot;targetLink&quot;: &quot;A String&quot;,
2723 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
2724 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
2725 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
2726 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
2727 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
2728 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
2729 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
2730 # populated.
2731 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2732 { # Database instance operation error.
2733 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
2734 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2735 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07002736 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002737 ],
2738 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
2739 },
2740 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
2741 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2742 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
2743 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2744 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2745 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
2746 # of the database table are loaded with CSV data.
2747 &quot;A String&quot;,
2748 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002749 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002750 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -07002751 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
2752 # specify a database, and is overridden by any database specification in the
2753 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
2754 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -07002755 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2756 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2757 &quot;encryptionOptions&quot;: {
2758 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
2759 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
2760 # write permissions to the bucket and read access to the file.
2761 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
2762 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
2763 # write permissions to the bucket and read access to the file.
2764 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2765 },
2766 },
2767 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -07002768 # &lt;code&gt;gs:
2769 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
2770 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
2771 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002772 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
2773 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08002774 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002775 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
2776 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
2777 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
2778 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -07002779 # identifier to retrieve the Operations resource that has information about
2780 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002781 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2782 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -07002783 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
2784 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
2785 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
2786 # either by using this property or by using the
2787 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
2788 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
2789 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
2790 # this database must match the one specified in the
2791 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -07002792 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08002793 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002794 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2795 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -07002796 # you specify tables, specify one and only one database. For PostgreSQL
2797 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07002798 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08002799 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002800 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2801 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2802 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -07002803 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
2804 # a CHANGE MASTER TO statement with the binary log coordinates.
2805 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
2806 # a SQL comment, and has no effect.
2807 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002808 },
Craig Citroe633be12015-03-02 13:40:36 -08002809 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002810 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
2811 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
2812 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
2813 # stored. The URI is in the form &lt;code&gt;gs:
2814 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
2815 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
2816 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
2817 # // compressed.
2818 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
2819 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2820 },
2821 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08002822 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002823 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08002824 }</pre>
2825</div>
2826
2827<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002828 <code class="details" id="promoteReplica">promoteReplica(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08002829 <pre>Promotes the read replica instance to be a stand-alone Cloud SQL instance.
Dan O'Mearadd494642020-05-01 07:42:23 -07002830Using this operation might cause your instance to restart.
Craig Citroe633be12015-03-02 13:40:36 -08002831
2832Args:
2833 project: string, ID of the project that contains the read replica. (required)
2834 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002835 x__xgafv: string, V1 error format.
2836 Allowed values
2837 1 - v1 error format
2838 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002839
2840Returns:
2841 An object of the form:
2842
Dan O'Mearadd494642020-05-01 07:42:23 -07002843 { # An Operation resource.&amp;nbsp;For successful operations that return an
2844 # Operation resource, only the fields relevant to the operation are populated
2845 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002846 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
2847 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2848 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2849 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
2850 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2851 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2852 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
2853 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2854 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2855 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2856 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2857 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2858 &quot;targetLink&quot;: &quot;A String&quot;,
2859 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
2860 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
2861 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
2862 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
2863 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
2864 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
2865 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
2866 # populated.
2867 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2868 { # Database instance operation error.
2869 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
2870 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2871 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07002872 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002873 ],
2874 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
2875 },
2876 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
2877 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2878 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
2879 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2880 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2881 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
2882 # of the database table are loaded with CSV data.
2883 &quot;A String&quot;,
2884 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002885 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002886 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -07002887 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
2888 # specify a database, and is overridden by any database specification in the
2889 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
2890 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -07002891 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2892 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2893 &quot;encryptionOptions&quot;: {
2894 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
2895 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
2896 # write permissions to the bucket and read access to the file.
2897 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
2898 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
2899 # write permissions to the bucket and read access to the file.
2900 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2901 },
2902 },
2903 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -07002904 # &lt;code&gt;gs:
2905 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
2906 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
2907 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002908 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
2909 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08002910 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002911 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
2912 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
2913 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
2914 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -07002915 # identifier to retrieve the Operations resource that has information about
2916 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002917 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2918 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -07002919 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
2920 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
2921 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
2922 # either by using this property or by using the
2923 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
2924 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
2925 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
2926 # this database must match the one specified in the
2927 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -07002928 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08002929 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002930 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2931 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -07002932 # you specify tables, specify one and only one database. For PostgreSQL
2933 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07002934 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08002935 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002936 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2937 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2938 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -07002939 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
2940 # a CHANGE MASTER TO statement with the binary log coordinates.
2941 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
2942 # a SQL comment, and has no effect.
2943 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002944 },
Craig Citroe633be12015-03-02 13:40:36 -08002945 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002946 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
2947 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
2948 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
2949 # stored. The URI is in the form &lt;code&gt;gs:
2950 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
2951 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
2952 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
2953 # // compressed.
2954 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
2955 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2956 },
2957 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08002958 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002959 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08002960 }</pre>
2961</div>
2962
2963<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002964 <code class="details" id="resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</code>
2965 <pre>Deletes all client certificates and generates a new server SSL certificate
2966for the instance.
Craig Citroe633be12015-03-02 13:40:36 -08002967
2968Args:
2969 project: string, Project ID of the project that contains the instance. (required)
2970 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002971 x__xgafv: string, V1 error format.
2972 Allowed values
2973 1 - v1 error format
2974 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002975
2976Returns:
2977 An object of the form:
2978
Dan O'Mearadd494642020-05-01 07:42:23 -07002979 { # An Operation resource.&amp;nbsp;For successful operations that return an
2980 # Operation resource, only the fields relevant to the operation are populated
2981 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002982 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
2983 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2984 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2985 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
2986 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2987 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2988 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
2989 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
2990 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2991 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2992 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2993 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2994 &quot;targetLink&quot;: &quot;A String&quot;,
2995 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
2996 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
2997 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
2998 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
2999 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3000 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3001 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3002 # populated.
3003 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3004 { # Database instance operation error.
3005 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
3006 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3007 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07003008 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003009 ],
3010 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3011 },
3012 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3013 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
3014 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3015 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3016 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3017 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3018 # of the database table are loaded with CSV data.
3019 &quot;A String&quot;,
3020 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003021 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003022 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -07003023 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3024 # specify a database, and is overridden by any database specification in the
3025 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3026 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -07003027 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3028 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3029 &quot;encryptionOptions&quot;: {
3030 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3031 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3032 # write permissions to the bucket and read access to the file.
3033 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3034 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3035 # write permissions to the bucket and read access to the file.
3036 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3037 },
3038 },
3039 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -07003040 # &lt;code&gt;gs:
3041 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3042 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3043 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07003044 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3045 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08003046 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003047 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3048 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3049 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
3050 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -07003051 # identifier to retrieve the Operations resource that has information about
3052 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07003053 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3054 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -07003055 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3056 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3057 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3058 # either by using this property or by using the
3059 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3060 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3061 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3062 # this database must match the one specified in the
3063 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -07003064 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08003065 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003066 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3067 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -07003068 # you specify tables, specify one and only one database. For PostgreSQL
3069 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07003070 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08003071 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003072 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3073 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3074 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -07003075 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3076 # a CHANGE MASTER TO statement with the binary log coordinates.
3077 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3078 # a SQL comment, and has no effect.
3079 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003080 },
Craig Citroe633be12015-03-02 13:40:36 -08003081 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003082 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3083 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3084 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3085 # stored. The URI is in the form &lt;code&gt;gs:
3086 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3087 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3088 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3089 # // compressed.
3090 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3091 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3092 },
3093 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003094 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003095 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08003096 }</pre>
3097</div>
3098
3099<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003100 <code class="details" id="restart">restart(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08003101 <pre>Restarts a Cloud SQL instance.
3102
3103Args:
3104 project: string, Project ID of the project that contains the instance to be restarted. (required)
3105 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003106 x__xgafv: string, V1 error format.
3107 Allowed values
3108 1 - v1 error format
3109 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08003110
3111Returns:
3112 An object of the form:
3113
Dan O'Mearadd494642020-05-01 07:42:23 -07003114 { # An Operation resource.&amp;nbsp;For successful operations that return an
3115 # Operation resource, only the fields relevant to the operation are populated
3116 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003117 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3118 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3119 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3120 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3121 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3122 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3123 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3124 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3125 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3126 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3127 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3128 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3129 &quot;targetLink&quot;: &quot;A String&quot;,
3130 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3131 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3132 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3133 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3134 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3135 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3136 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3137 # populated.
3138 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3139 { # Database instance operation error.
3140 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
3141 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3142 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07003143 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003144 ],
3145 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3146 },
3147 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3148 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
3149 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3150 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3151 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3152 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3153 # of the database table are loaded with CSV data.
3154 &quot;A String&quot;,
3155 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003156 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003157 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -07003158 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3159 # specify a database, and is overridden by any database specification in the
3160 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3161 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -07003162 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3163 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3164 &quot;encryptionOptions&quot;: {
3165 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3166 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3167 # write permissions to the bucket and read access to the file.
3168 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3169 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3170 # write permissions to the bucket and read access to the file.
3171 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3172 },
3173 },
3174 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -07003175 # &lt;code&gt;gs:
3176 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3177 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3178 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07003179 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3180 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08003181 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003182 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3183 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3184 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
3185 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -07003186 # identifier to retrieve the Operations resource that has information about
3187 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07003188 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3189 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -07003190 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3191 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3192 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3193 # either by using this property or by using the
3194 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3195 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3196 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3197 # this database must match the one specified in the
3198 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -07003199 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08003200 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003201 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3202 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -07003203 # you specify tables, specify one and only one database. For PostgreSQL
3204 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07003205 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08003206 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003207 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3208 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3209 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -07003210 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3211 # a CHANGE MASTER TO statement with the binary log coordinates.
3212 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3213 # a SQL comment, and has no effect.
3214 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003215 },
Craig Citroe633be12015-03-02 13:40:36 -08003216 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003217 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3218 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3219 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3220 # stored. The URI is in the form &lt;code&gt;gs:
3221 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3222 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3223 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3224 # // compressed.
3225 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3226 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3227 },
3228 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003229 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003230 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08003231 }</pre>
3232</div>
3233
3234<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003235 <code class="details" id="restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</code>
3236 <pre>Restores a backup of a Cloud SQL instance. Using this operation might cause
3237your instance to restart.
Craig Citroe633be12015-03-02 13:40:36 -08003238
3239Args:
3240 project: string, Project ID of the project that contains the instance. (required)
3241 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003242 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08003243 The object takes the form of:
3244
3245{ # Database instance restore backup request.
Bu Sun Kim65020912020-05-20 12:08:20 -07003246 &quot;restoreBackupContext&quot;: { # Database instance restore from backup context. # Parameters required to perform the restore backup operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003247 # Backup context contains source instance id and project id.
Bu Sun Kim65020912020-05-20 12:08:20 -07003248 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#restoreBackupContext&lt;/code&gt;.
3249 &quot;project&quot;: &quot;A String&quot;, # The full project ID of the source instance.
3250 &quot;backupRunId&quot;: &quot;A String&quot;, # The ID of the backup run to restore from.
3251 &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 -08003252 },
3253 }
3254
Dan O'Mearadd494642020-05-01 07:42:23 -07003255 x__xgafv: string, V1 error format.
3256 Allowed values
3257 1 - v1 error format
3258 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08003259
3260Returns:
3261 An object of the form:
3262
Dan O'Mearadd494642020-05-01 07:42:23 -07003263 { # An Operation resource.&amp;nbsp;For successful operations that return an
3264 # Operation resource, only the fields relevant to the operation are populated
3265 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003266 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3267 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3268 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3269 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3270 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3271 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3272 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3273 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3274 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3275 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3276 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3277 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3278 &quot;targetLink&quot;: &quot;A String&quot;,
3279 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3280 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3281 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3282 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3283 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3284 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3285 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3286 # populated.
3287 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3288 { # Database instance operation error.
3289 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
3290 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3291 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07003292 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003293 ],
3294 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3295 },
3296 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3297 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
3298 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3299 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3300 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3301 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3302 # of the database table are loaded with CSV data.
3303 &quot;A String&quot;,
3304 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003305 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003306 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -07003307 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3308 # specify a database, and is overridden by any database specification in the
3309 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3310 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -07003311 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3312 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3313 &quot;encryptionOptions&quot;: {
3314 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3315 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3316 # write permissions to the bucket and read access to the file.
3317 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3318 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3319 # write permissions to the bucket and read access to the file.
3320 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3321 },
3322 },
3323 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -07003324 # &lt;code&gt;gs:
3325 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3326 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3327 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07003328 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3329 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08003330 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003331 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3332 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3333 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
3334 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -07003335 # identifier to retrieve the Operations resource that has information about
3336 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07003337 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3338 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -07003339 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3340 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3341 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3342 # either by using this property or by using the
3343 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3344 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3345 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3346 # this database must match the one specified in the
3347 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -07003348 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08003349 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003350 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3351 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -07003352 # you specify tables, specify one and only one database. For PostgreSQL
3353 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07003354 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08003355 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003356 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3357 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3358 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -07003359 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3360 # a CHANGE MASTER TO statement with the binary log coordinates.
3361 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3362 # a SQL comment, and has no effect.
3363 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003364 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003365 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003366 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3367 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3368 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3369 # stored. The URI is in the form &lt;code&gt;gs:
3370 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3371 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3372 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3373 # // compressed.
3374 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3375 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3376 },
3377 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003378 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003379 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003380 }</pre>
3381</div>
3382
3383<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003384 <code class="details" id="rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</code>
3385 <pre>Rotates the server certificate to one signed by the Certificate Authority
3386(CA) version previously added with the addServerCA method.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003387
3388Args:
3389 project: string, Project ID of the project that contains the instance. (required)
3390 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003391 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003392 The object takes the form of:
3393
3394{ # Rotate Server CA request.
Bu Sun Kim65020912020-05-20 12:08:20 -07003395 &quot;rotateServerCaContext&quot;: { # Instance rotate server CA context. # Contains details about the rotate server CA operation.
3396 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#rotateServerCaContext&lt;/code&gt;.
3397 &quot;nextVersion&quot;: &quot;A String&quot;, # The fingerprint of the next version to be rotated to. If left unspecified,
Dan O'Mearadd494642020-05-01 07:42:23 -07003398 # will be rotated to the most recently added server CA version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003399 },
3400 }
3401
Dan O'Mearadd494642020-05-01 07:42:23 -07003402 x__xgafv: string, V1 error format.
3403 Allowed values
3404 1 - v1 error format
3405 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003406
3407Returns:
3408 An object of the form:
3409
Dan O'Mearadd494642020-05-01 07:42:23 -07003410 { # An Operation resource.&amp;nbsp;For successful operations that return an
3411 # Operation resource, only the fields relevant to the operation are populated
3412 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003413 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3414 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3415 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3416 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3417 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3418 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3419 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3420 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3421 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3422 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3423 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3424 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3425 &quot;targetLink&quot;: &quot;A String&quot;,
3426 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3427 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3428 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3429 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3430 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3431 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3432 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3433 # populated.
3434 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3435 { # Database instance operation error.
3436 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
3437 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3438 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07003439 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003440 ],
3441 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3442 },
3443 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3444 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
3445 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3446 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3447 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3448 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3449 # of the database table are loaded with CSV data.
3450 &quot;A String&quot;,
3451 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003452 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003453 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -07003454 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3455 # specify a database, and is overridden by any database specification in the
3456 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3457 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -07003458 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3459 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3460 &quot;encryptionOptions&quot;: {
3461 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3462 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3463 # write permissions to the bucket and read access to the file.
3464 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3465 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3466 # write permissions to the bucket and read access to the file.
3467 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3468 },
3469 },
3470 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -07003471 # &lt;code&gt;gs:
3472 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3473 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3474 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07003475 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3476 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003477 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003478 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3479 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3480 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
3481 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -07003482 # identifier to retrieve the Operations resource that has information about
3483 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07003484 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3485 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -07003486 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3487 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3488 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3489 # either by using this property or by using the
3490 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3491 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3492 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3493 # this database must match the one specified in the
3494 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -07003495 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003496 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003497 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3498 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -07003499 # you specify tables, specify one and only one database. For PostgreSQL
3500 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07003501 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003502 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003503 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3504 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3505 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -07003506 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3507 # a CHANGE MASTER TO statement with the binary log coordinates.
3508 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3509 # a SQL comment, and has no effect.
3510 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003511 },
Craig Citroe633be12015-03-02 13:40:36 -08003512 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003513 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3514 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3515 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3516 # stored. The URI is in the form &lt;code&gt;gs:
3517 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3518 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3519 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3520 # // compressed.
3521 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3522 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3523 },
3524 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003525 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003526 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08003527 }</pre>
3528</div>
3529
3530<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003531 <code class="details" id="startReplica">startReplica(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08003532 <pre>Starts the replication in the read replica instance.
3533
3534Args:
3535 project: string, ID of the project that contains the read replica. (required)
3536 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003537 x__xgafv: string, V1 error format.
3538 Allowed values
3539 1 - v1 error format
3540 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08003541
3542Returns:
3543 An object of the form:
3544
Dan O'Mearadd494642020-05-01 07:42:23 -07003545 { # An Operation resource.&amp;nbsp;For successful operations that return an
3546 # Operation resource, only the fields relevant to the operation are populated
3547 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003548 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3549 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3550 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3551 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3552 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3553 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3554 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3555 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3556 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3557 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3558 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3559 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3560 &quot;targetLink&quot;: &quot;A String&quot;,
3561 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3562 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3563 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3564 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3565 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3566 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3567 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3568 # populated.
3569 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3570 { # Database instance operation error.
3571 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
3572 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3573 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07003574 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003575 ],
3576 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3577 },
3578 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3579 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
3580 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3581 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3582 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3583 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3584 # of the database table are loaded with CSV data.
3585 &quot;A String&quot;,
3586 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003587 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003588 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -07003589 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3590 # specify a database, and is overridden by any database specification in the
3591 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3592 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -07003593 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3594 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3595 &quot;encryptionOptions&quot;: {
3596 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3597 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3598 # write permissions to the bucket and read access to the file.
3599 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3600 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3601 # write permissions to the bucket and read access to the file.
3602 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3603 },
3604 },
3605 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -07003606 # &lt;code&gt;gs:
3607 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3608 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3609 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07003610 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3611 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08003612 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003613 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3614 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3615 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
3616 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -07003617 # identifier to retrieve the Operations resource that has information about
3618 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07003619 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3620 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -07003621 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3622 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3623 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3624 # either by using this property or by using the
3625 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3626 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3627 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3628 # this database must match the one specified in the
3629 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -07003630 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08003631 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003632 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3633 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -07003634 # you specify tables, specify one and only one database. For PostgreSQL
3635 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07003636 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08003637 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003638 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3639 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3640 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -07003641 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3642 # a CHANGE MASTER TO statement with the binary log coordinates.
3643 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3644 # a SQL comment, and has no effect.
3645 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003646 },
Craig Citroe633be12015-03-02 13:40:36 -08003647 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003648 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3649 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3650 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3651 # stored. The URI is in the form &lt;code&gt;gs:
3652 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3653 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3654 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3655 # // compressed.
3656 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3657 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3658 },
3659 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003660 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003661 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08003662 }</pre>
3663</div>
3664
3665<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003666 <code class="details" id="stopReplica">stopReplica(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08003667 <pre>Stops the replication in the read replica instance.
3668
3669Args:
3670 project: string, ID of the project that contains the read replica. (required)
3671 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003672 x__xgafv: string, V1 error format.
3673 Allowed values
3674 1 - v1 error format
3675 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08003676
3677Returns:
3678 An object of the form:
3679
Dan O'Mearadd494642020-05-01 07:42:23 -07003680 { # An Operation resource.&amp;nbsp;For successful operations that return an
3681 # Operation resource, only the fields relevant to the operation are populated
3682 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003683 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3684 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3685 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3686 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3687 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3688 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3689 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3690 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3691 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3692 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3693 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3694 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3695 &quot;targetLink&quot;: &quot;A String&quot;,
3696 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3697 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3698 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3699 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3700 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3701 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3702 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3703 # populated.
3704 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3705 { # Database instance operation error.
3706 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
3707 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3708 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07003709 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003710 ],
3711 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3712 },
3713 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3714 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
3715 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3716 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3717 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3718 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3719 # of the database table are loaded with CSV data.
3720 &quot;A String&quot;,
3721 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003722 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003723 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -07003724 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3725 # specify a database, and is overridden by any database specification in the
3726 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3727 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -07003728 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3729 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3730 &quot;encryptionOptions&quot;: {
3731 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3732 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3733 # write permissions to the bucket and read access to the file.
3734 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3735 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3736 # write permissions to the bucket and read access to the file.
3737 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3738 },
3739 },
3740 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -07003741 # &lt;code&gt;gs:
3742 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3743 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3744 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07003745 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3746 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08003747 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003748 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3749 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3750 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
3751 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -07003752 # identifier to retrieve the Operations resource that has information about
3753 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07003754 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3755 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -07003756 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3757 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3758 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3759 # either by using this property or by using the
3760 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3761 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3762 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3763 # this database must match the one specified in the
3764 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -07003765 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08003766 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003767 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3768 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -07003769 # you specify tables, specify one and only one database. For PostgreSQL
3770 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07003771 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08003772 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003773 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3774 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3775 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -07003776 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3777 # a CHANGE MASTER TO statement with the binary log coordinates.
3778 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3779 # a SQL comment, and has no effect.
3780 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003781 },
Craig Citroe633be12015-03-02 13:40:36 -08003782 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003783 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3784 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3785 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3786 # stored. The URI is in the form &lt;code&gt;gs:
3787 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3788 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3789 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3790 # // compressed.
3791 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3792 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3793 },
3794 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003795 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003796 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08003797 }</pre>
3798</div>
3799
3800<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003801 <code class="details" id="truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003802 <pre>Truncate MySQL general and slow query log tables
3803
3804Args:
3805 project: string, Project ID of the Cloud SQL project. (required)
3806 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003807 body: object, The request body.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003808 The object takes the form of:
3809
3810{ # Instance truncate log request.
Bu Sun Kim65020912020-05-20 12:08:20 -07003811 &quot;truncateLogContext&quot;: { # Database Instance truncate log context. # Contains details about the truncate log operation.
3812 &quot;logType&quot;: &quot;A String&quot;, # The type of log to truncate. Valid values are
Dan O'Mearadd494642020-05-01 07:42:23 -07003813 # &lt;code&gt;MYSQL_GENERAL_TABLE&lt;/code&gt; and &lt;code&gt;MYSQL_SLOW_TABLE&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003814 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#truncateLogContext&lt;/code&gt;.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003815 },
3816 }
3817
Dan O'Mearadd494642020-05-01 07:42:23 -07003818 x__xgafv: string, V1 error format.
3819 Allowed values
3820 1 - v1 error format
3821 2 - v2 error format
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003822
3823Returns:
3824 An object of the form:
3825
Dan O'Mearadd494642020-05-01 07:42:23 -07003826 { # An Operation resource.&amp;nbsp;For successful operations that return an
3827 # Operation resource, only the fields relevant to the operation are populated
3828 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003829 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
3830 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3831 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3832 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
3833 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3834 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3835 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
3836 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3837 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3838 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
3839 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
3840 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
3841 &quot;targetLink&quot;: &quot;A String&quot;,
3842 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3843 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3844 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3845 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3846 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3847 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3848 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3849 # populated.
3850 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
3851 { # Database instance operation error.
3852 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
3853 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
3854 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07003855 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003856 ],
3857 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
3858 },
3859 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3860 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
3861 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3862 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
3863 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
3864 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
3865 # of the database table are loaded with CSV data.
3866 &quot;A String&quot;,
3867 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003868 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003869 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -07003870 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3871 # specify a database, and is overridden by any database specification in the
3872 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3873 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -07003874 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
3875 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
3876 &quot;encryptionOptions&quot;: {
3877 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
3878 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3879 # write permissions to the bucket and read access to the file.
3880 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3881 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3882 # write permissions to the bucket and read access to the file.
3883 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
3884 },
3885 },
3886 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -07003887 # &lt;code&gt;gs:
3888 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3889 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3890 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07003891 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3892 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003893 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003894 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3895 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3896 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
3897 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -07003898 # identifier to retrieve the Operations resource that has information about
3899 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07003900 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
3901 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -07003902 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3903 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3904 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3905 # either by using this property or by using the
3906 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3907 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3908 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3909 # this database must match the one specified in the
3910 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -07003911 &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003912 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003913 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
3914 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -07003915 # you specify tables, specify one and only one database. For PostgreSQL
3916 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07003917 &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003918 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003919 &quot;schemaOnly&quot;: True or False, # Export only schemas.
3920 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
3921 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -07003922 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3923 # a CHANGE MASTER TO statement with the binary log coordinates.
3924 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3925 # a SQL comment, and has no effect.
3926 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003927 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003928 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003929 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3930 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3931 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
3932 # stored. The URI is in the form &lt;code&gt;gs:
3933 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3934 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3935 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3936 # // compressed.
3937 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
3938 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
3939 },
3940 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003941 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003942 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003943 }</pre>
3944</div>
3945
3946<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003947 <code class="details" id="update">update(project, instance, body=None, x__xgafv=None)</code>
3948 <pre>Updates settings of a Cloud SQL instance. Using this operation might cause
3949your instance to restart.
Craig Citroe633be12015-03-02 13:40:36 -08003950
3951Args:
3952 project: string, Project ID of the project that contains the instance. (required)
3953 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003954 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08003955 The object takes the form of:
3956
3957{ # A Cloud SQL instance resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003958 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
3959 &quot;A String&quot;,
3960 ],
3961 &quot;settings&quot;: { # Database instance settings. # The user settings.
3962 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
3963 # instance IP and manage which external networks can connect to the instance.
3964 # The IPv4 address cannot be disabled for Second Generation instances.
3965 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP should be enforced or not.
3966 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is
3967 # accessible for private IP. For example,
3968 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
3969 # be updated, but it cannot be removed after it is set.
3970 &quot;ipv4Enabled&quot;: True or False, # Whether the instance should be assigned an IP address or not.
3971 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance
3972 # using the IP. In &lt;a
3973 # href=&quot;http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation&quot;&gt;CIDR
3974 # notation&lt;/a&gt;, also known as &#x27;slash&#x27; notation (e.g.
3975 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
3976 { # An entry for an Access Control list.
3977 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
3978 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
3979 &quot;value&quot;: &quot;A String&quot;, # The whitelisted value for the access control list.
3980 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in &lt;a
3981 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
3982 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3983 },
3984 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003985 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003986 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type (PostgreSQL and MySQL instances only). Potential values:
Dan O'Mearadd494642020-05-01 07:42:23 -07003987 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
3988 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
3989 # The instance can serve data from more than one zone in a region (it is
3990 # highly available). &lt;br&gt;For more information, see &lt;a
Bu Sun Kim65020912020-05-20 12:08:20 -07003991 # href=&quot;https://cloud.google.com/sql/docs/postgres/high-availability&quot;&gt;Overview
Dan O'Mearadd494642020-05-01 07:42:23 -07003992 # of the High Availability Configuration&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -07003993 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update
3994 # method to make sure concurrent updates are handled properly. During update,
3995 # use the most recent settingsVersion value for this instance and do not try
3996 # to update this value.
3997 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
3998 { # Database flags for Cloud SQL instances.
3999 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so
4000 # include both server options and system variables for MySQL. Flags should be
4001 # specified with underscores, not hyphens. For more information, see &lt;a
4002 # href=&quot;/sql/docs/mysql/flags&quot;&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
4003 # SQL documentation.
4004 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans should be set to &lt;code&gt;on&lt;/code&gt; for true
4005 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
4006 # doesn&#x27;t take a value.
4007 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004008 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004009 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance
4010 # can be restarted for maintenance purposes. Not used for First Generation
4011 # instances.
4012 # preferably be restarted for system maintenance purposes.
4013 &quot;hour&quot;: 42, # hour of day - 0 to 23.
4014 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
4015 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
4016 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: &lt;code&gt;canary&lt;/code&gt; (Earlier) or
4017 # &lt;code&gt;stable&lt;/code&gt; (Later). &lt;br /&gt;&lt;a
4018 # href=&quot;/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen&quot;&gt;
4019 # Learn more&lt;/a&gt;.
4020 },
4021 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either &lt;code&gt;PER_USE&lt;/code&gt;
4022 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
4023 # Generation instances.
4024 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is
4025 # true. Not used for First Generation instances.
4026 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased.
4027 # The default value is 0, which specifies that there is no limit. Not used
4028 # for First Generation instances.
4029 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. First Generation
4030 # instances only.
4031 &quot;A String&quot;,
4032 ],
4033 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example
4034 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
4035 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
4036 # this property determines whether the instance is First or Second
4037 # Generation. For more information, see &lt;a
4038 # href=&quot;/sql/docs/db_path/instance-settings&quot;&gt;Instance Settings&lt;/a&gt;.
4039 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
4040 # for First Generation instances.
4041 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
4042 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
4043 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
4044 # replication is enabled or not.
4045 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether
4046 # database flags for crash-safe replication are enabled. This property is
4047 # only applicable to First Generation instances.
4048 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
4049 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
4050 # disabled, binarylog must be disabled as well.
4051 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
4052 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
4053 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
4054 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24
4055 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
4056 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
4057 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
4058 },
4059 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a
4060 # single key value pair.
4061 &quot;a_key&quot;: &quot;A String&quot;,
4062 },
4063 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as
4064 # near as possible to either an App Engine app or Compute Engine zone for
4065 # better performance. App Engine co-location is only applicable to First
4066 # Generation instances.
4067 # preferably be located, either in a specific Compute Engine zone, or
4068 # co-located with an App Engine application. Note that if the preferred
4069 # location is not available, the instance will be located as close as possible
4070 # within the region. Only one location may be specified.
4071 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
4072 # etc.).
4073 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The AppEngine application to follow, it must be in the same region as the
4074 # Cloud SQL instance.
4075 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
4076 },
4077 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
4078 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either
4079 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
4080 # only applicable to First Generation instances.
4081 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is
Dan O'Mearadd494642020-05-01 07:42:23 -07004082 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
4083 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
4084 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
4085 # off; it is not activated, even if a connection request arrives.
4086 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
4087 # responds to incoming requests, and turns itself off when not in use.
4088 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
4089 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
4090 # 12 hours of inactivity.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004091 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004092 &quot;replicaNames&quot;: [ # The replicas of the instance.
4093 &quot;A String&quot;,
4094 ],
4095 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
4096 # Applies only to Second Generation instances.
4097 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
4098 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
4099 },
4100 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
4101 &quot;canDefer&quot;: True or False,
4102 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
4103 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
4104 },
4105 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
4106 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
4107 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
4108 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
4109 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
4110 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
4111 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
4112 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
4113 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
4114 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in &lt;a
4115 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4116 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
4117 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
4118 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
4119 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in &lt;a
4120 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4121 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
4122 },
4123 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
4124 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
4125 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as master in the replication setup.
4126 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following.
4127 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
4128 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
4129 # instance running on the
4130 # customer&#x27;s premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
4131 # instance configured as a read-replica.
4132 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This
4133 # value could be different from the zone that was specified when the instance
4134 # was created if the instance has failed over to its secondary zone.
4135 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been
4136 # deprecated. Users should use the
4137 # &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud
4138 # Monitoring API instead. Please see &lt;a
4139 # href=&quot;https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ&quot;&gt;this
4140 # announcement&lt;/a&gt; for details.
4141 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
4142 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to
Dan O'Mearadd494642020-05-01 07:42:23 -07004143 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
4144 # case the master instance fails, the replica instance will be promoted as
4145 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
4146 # target, and the replica has to be in different zone with the master
4147 # instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07004148 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
4149 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
Dan O'Mearadd494642020-05-01 07:42:23 -07004150 # master. Replication configuration information such as the username,
4151 # password, certificates, and keys are not stored in the instance metadata.
4152 # The configuration information is used only to set up the replication
4153 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
4154 # in the data directory.
Bu Sun Kim65020912020-05-20 12:08:20 -07004155 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
4156 # is encoded in the client&#x27;s certificate.
4157 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
4158 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
4159 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
4160 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the slave
Dan O'Mearadd494642020-05-01 07:42:23 -07004161 # instance is to be created. The URI is in the form gs:
4162 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
4163 # // Dumps should have the binlog co-ordinates from which replication should
4164 # // begin. This can be accomplished by setting --master-data to 1 when using
4165 # // mysqldump.
Bu Sun Kim65020912020-05-20 12:08:20 -07004166 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
4167 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
4168 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
4169 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
4170 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
4171 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the master&#x27;s Common Name value in the certificate
4172 # that it sends during the SSL handshake.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004173 },
4174 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004175 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
4176 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable
4177 # only to Second Generation instances.
4178 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates
4179 # that the failover replica is out of sync. The master can only failover to
4180 # the failover replica when the status is true.
4181 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a
4182 # failover replica is created for the instance. The name
4183 # doesn&#x27;t include the project ID. This property is applicable only to
4184 # Second Generation instances.
4185 },
4186 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
4187 { # Database instance IP Mapping.
4188 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in &lt;a
4189 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4190 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
4191 # the IP is scheduled to be retired.
4192 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A &lt;code&gt;PRIMARY&lt;/code&gt; address is a public
4193 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
4194 # address is a private address that can accept incoming connections. An
4195 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
4196 # originating from the instance, if supported.
4197 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
4198 },
4199 ],
4200 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. This property is applicable only
4201 # to First Generation instances.
4202 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
4203 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
4204 # Applies only to Second Generation instances.
4205 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
4206 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
4207 },
4208 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
4209 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
4210 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
4211 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
4212 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
4213 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
4214 # or Second Generation). The region can not be changed after instance
4215 # creation.
4216 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the
4217 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
4218 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
4219 # available, for example due to problems with billing.
4220 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
4221 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
4222 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
4223 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
4224 &quot;backendType&quot;: &quot;A String&quot;, # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
4225 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
4226 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
4227 # managed by Google. &lt;br&gt;This property is read-only; use the
4228 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
4229 # the database type and Second or First Generation.
4230 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
4231 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s private key. The corresponsing public key
4232 # is encoded in the client&#x27;s certificate.
4233 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
4234 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
4235 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the slave&#x27;s x509 certificate.
4236 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
4237 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
4238 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
4239 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
4240 },
4241 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google
4242 # apps domain is prefixed if applicable.
4243 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property
4244 # is applicable only to Second Generation instances.
4245 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
4246 # field can not be changed after instance creation. MySQL Second Generation
4247 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
4248 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
4249 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
4250 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
Craig Citroe633be12015-03-02 13:40:36 -08004251 }
4252
Dan O'Mearadd494642020-05-01 07:42:23 -07004253 x__xgafv: string, V1 error format.
4254 Allowed values
4255 1 - v1 error format
4256 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08004257
4258Returns:
4259 An object of the form:
4260
Dan O'Mearadd494642020-05-01 07:42:23 -07004261 { # An Operation resource.&amp;nbsp;For successful operations that return an
4262 # Operation resource, only the fields relevant to the operation are populated
4263 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07004264 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
4265 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4266 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
4267 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
4268 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4269 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
4270 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
4271 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
4272 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
4273 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
4274 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
4275 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
4276 &quot;targetLink&quot;: &quot;A String&quot;,
4277 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
4278 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
4279 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
4280 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
4281 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
4282 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
4283 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
4284 # populated.
4285 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
4286 { # Database instance operation error.
4287 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
4288 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
4289 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07004290 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004291 ],
4292 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
4293 },
4294 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
4295 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
4296 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
4297 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
4298 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
4299 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
4300 # of the database table are loaded with CSV data.
4301 &quot;A String&quot;,
4302 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004303 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004304 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -07004305 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
4306 # specify a database, and is overridden by any database specification in the
4307 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
4308 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -07004309 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
4310 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
4311 &quot;encryptionOptions&quot;: {
4312 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
4313 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
4314 # write permissions to the bucket and read access to the file.
4315 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
4316 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
4317 # write permissions to the bucket and read access to the file.
4318 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
4319 },
4320 },
4321 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -07004322 # &lt;code&gt;gs:
4323 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
4324 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
4325 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07004326 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
4327 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08004328 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004329 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
4330 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
4331 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
4332 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -07004333 # identifier to retrieve the Operations resource that has information about
4334 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07004335 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
4336 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -07004337 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
4338 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
4339 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
4340 # either by using this property or by using the
4341 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
4342 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
4343 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
4344 # this database must match the one specified in the
4345 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -07004346 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08004347 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004348 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
4349 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -07004350 # you specify tables, specify one and only one database. For PostgreSQL
4351 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07004352 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08004353 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004354 &quot;schemaOnly&quot;: True or False, # Export only schemas.
4355 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
4356 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -07004357 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
4358 # a CHANGE MASTER TO statement with the binary log coordinates.
4359 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
4360 # a SQL comment, and has no effect.
4361 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004362 },
Craig Citroe633be12015-03-02 13:40:36 -08004363 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004364 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
4365 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
4366 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
4367 # stored. The URI is in the form &lt;code&gt;gs:
4368 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
4369 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
4370 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
4371 # // compressed.
4372 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
4373 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
4374 },
4375 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08004376 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004377 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08004378 }</pre>
4379</div>
4380
4381</body></html>