blob: 21d6bc239dbf3293f30bfcfc30c2d901cb7eabda [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">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#list">list(project, pageToken=None, maxResults=None, filter=None, x__xgafv=None)</a></code></p>
106<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.
166 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
167 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
168 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800169 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700170 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
171 "encryptionOptions": {
172 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
173 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
174 # write permissions to the bucket and read access to the file.
175 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
176 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
177 # write permissions to the bucket and read access to the file.
178 "pvkPassword": "A String", # Password that encrypts the private key
179 },
180 },
181 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
182 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
183 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
184 # specify a database, and is overridden by any database specification in the
185 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
186 # must be specified.
187 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
188 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
189 "uri": "A String", # Path to the import file in Cloud Storage, in the form
190 # &lt;code&gt;gs:
191 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
192 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
193 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700194 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -0800195 "csvImportOptions": { # Options for importing data as CSV.
196 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -0700197 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
198 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -0800199 "A String",
200 ],
201 },
202 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700203 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
204 "targetProject": "A String", # The project ID of the target instance related to this operation.
205 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
206 # identifier to retrieve the Operations resource that has information about
207 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -0800208 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700209 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
210 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
211 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
212 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
213 # stored. The URI is in the form &lt;code&gt;gs:
214 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
215 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
216 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
217 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -0800218 "csvExportOptions": { # Options for exporting data as CSV.
219 "selectQuery": "A String", # The select query used to extract the data.
220 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700221 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
222 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
223 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
224 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
225 # either by using this property or by using the
226 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
227 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
228 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
229 # this database must match the one specified in the
230 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -0800231 "A String",
232 ],
233 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -0700234 "tables": [ # Tables to export, or that were exported, from the specified database. If
235 # you specify tables, specify one and only one database. For PostgreSQL
236 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -0800237 "A String",
238 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700239 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700240 "masterData": 42, # Option to include SQL statement required to set up replication.
241 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
242 # a CHANGE MASTER TO statement with the binary log coordinates.
243 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
244 # a SQL comment, and has no effect.
245 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700246 },
247 "schemaOnly": True or False, # Export only schemas.
248 },
249 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700250 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
251 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
252 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700253 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700254 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
255 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
256 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
257 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
258 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
259 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
260 "user": "A String", # The email address of the user who initiated this operation.
261 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
262 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
263 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
264 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
265 # populated.
266 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700267 "errors": [ # The list of errors encountered while processing this operation.
268 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700269 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700270 "code": "A String", # Identifies the specific error that occurred.
271 "message": "A String", # Additional information about the error encountered.
272 },
273 ],
274 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700275 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
276 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
277 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700278 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700279 "targetLink": "A String",
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.
296 "cloneContext": { # Database instance clone context. # Contains details about the clone operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700297 "binLogCoordinates": { # Binary log coordinates. # Binary log coordinates, if specified, identify the position up to which the
298 # source instance should be cloned. If not specified, the source instance is
299 # cloned up to the most recent binary log coordinates.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700300 "binLogPosition": "A String", # Position (offset) within the binary log file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700301 "kind": "A String", # This is always &lt;code&gt;sql#binLogCoordinates&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700302 "binLogFileName": "A String", # Name of the binary log file for a Cloud SQL instance.
303 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700304 "kind": "A String", # This is always &lt;code&gt;sql#cloneContext&lt;/code&gt;.
305 "pointInTime": "A String", # Reserved for future use.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700306 "pitrTimestampMs": "A String", # Reserved for future use.
307 "destinationInstanceName": "A String", # Name of the Cloud SQL instance to be created as a clone.
308 },
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.
322 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
323 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
324 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700325 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700326 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
327 "encryptionOptions": {
328 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
329 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
330 # write permissions to the bucket and read access to the file.
331 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
332 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
333 # write permissions to the bucket and read access to the file.
334 "pvkPassword": "A String", # Password that encrypts the private key
335 },
336 },
337 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
338 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
339 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
340 # specify a database, and is overridden by any database specification in the
341 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
342 # must be specified.
343 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
344 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
345 "uri": "A String", # Path to the import file in Cloud Storage, in the form
346 # &lt;code&gt;gs:
347 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
348 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
349 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700350 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
351 "csvImportOptions": { # Options for importing data as CSV.
352 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -0700353 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
354 # of the database table are loaded with CSV data.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700355 "A String",
356 ],
357 },
358 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700359 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
360 "targetProject": "A String", # The project ID of the target instance related to this operation.
361 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
362 # identifier to retrieve the Operations resource that has information about
363 # the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700364 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700365 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
366 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
367 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
368 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
369 # stored. The URI is in the form &lt;code&gt;gs:
370 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
371 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
372 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
373 # // compressed.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700374 "csvExportOptions": { # Options for exporting data as CSV.
375 "selectQuery": "A String", # The select query used to extract the data.
376 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700377 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
378 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
379 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
380 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
381 # either by using this property or by using the
382 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
383 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
384 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
385 # this database must match the one specified in the
386 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700387 "A String",
388 ],
389 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -0700390 "tables": [ # Tables to export, or that were exported, from the specified database. If
391 # you specify tables, specify one and only one database. For PostgreSQL
392 # instances, you can specify only one table.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700393 "A String",
394 ],
395 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700396 "masterData": 42, # Option to include SQL statement required to set up replication.
397 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
398 # a CHANGE MASTER TO statement with the binary log coordinates.
399 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
400 # a SQL comment, and has no effect.
401 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700402 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800403 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800404 },
405 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700406 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
407 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
408 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800409 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700410 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
411 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
412 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
413 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
414 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
415 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
416 "user": "A String", # The email address of the user who initiated this operation.
417 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
418 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
419 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
420 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
421 # populated.
422 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800423 "errors": [ # The list of errors encountered while processing this operation.
424 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700425 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800426 "code": "A String", # Identifies the specific error that occurred.
427 "message": "A String", # Additional information about the error encountered.
428 },
429 ],
430 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700431 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
432 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
433 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800434 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700435 "targetLink": "A String",
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.
457 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
458 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
459 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800460 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700461 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
462 "encryptionOptions": {
463 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
464 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
465 # write permissions to the bucket and read access to the file.
466 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
467 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
468 # write permissions to the bucket and read access to the file.
469 "pvkPassword": "A String", # Password that encrypts the private key
470 },
471 },
472 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
473 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
474 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
475 # specify a database, and is overridden by any database specification in the
476 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
477 # must be specified.
478 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
479 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
480 "uri": "A String", # Path to the import file in Cloud Storage, in the form
481 # &lt;code&gt;gs:
482 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
483 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
484 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700485 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -0800486 "csvImportOptions": { # Options for importing data as CSV.
487 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -0700488 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
489 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -0800490 "A String",
491 ],
492 },
493 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700494 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
495 "targetProject": "A String", # The project ID of the target instance related to this operation.
496 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
497 # identifier to retrieve the Operations resource that has information about
498 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -0800499 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700500 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
501 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
502 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
503 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
504 # stored. The URI is in the form &lt;code&gt;gs:
505 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
506 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
507 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
508 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -0800509 "csvExportOptions": { # Options for exporting data as CSV.
510 "selectQuery": "A String", # The select query used to extract the data.
511 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700512 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
513 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
514 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
515 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
516 # either by using this property or by using the
517 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
518 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
519 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
520 # this database must match the one specified in the
521 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -0800522 "A String",
523 ],
524 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -0700525 "tables": [ # Tables to export, or that were exported, from the specified database. If
526 # you specify tables, specify one and only one database. For PostgreSQL
527 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -0800528 "A String",
529 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700530 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700531 "masterData": 42, # Option to include SQL statement required to set up replication.
532 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
533 # a CHANGE MASTER TO statement with the binary log coordinates.
534 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
535 # a SQL comment, and has no effect.
536 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700537 },
538 "schemaOnly": True or False, # Export only schemas.
539 },
540 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700541 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
542 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
543 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700544 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700545 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
546 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
547 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
548 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
549 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
550 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
551 "user": "A String", # The email address of the user who initiated this operation.
552 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
553 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
554 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
555 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
556 # populated.
557 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700558 "errors": [ # The list of errors encountered while processing this operation.
559 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700560 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700561 "code": "A String", # Identifies the specific error that occurred.
562 "message": "A String", # Additional information about the error encountered.
563 },
564 ],
565 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700566 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
567 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
568 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700569 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700570 "targetLink": "A String",
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.
586 "demoteMasterContext": { # Database instance demote master context. # Contains details about the demoteMaster operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700587 "kind": "A String", # This is always &lt;code&gt;sql#demoteMasterContext&lt;/code&gt;.
588 "masterInstanceName": "A String", # The name of the instance which will act as on-premises master in the
589 # replication setup.
590 "verifyGtidConsistency": True or False, # Verify GTID consistency for demote operation. Default value:
591 # &lt;code&gt;True&lt;/code&gt;. Second Generation instances only. Setting this flag to
592 # false enables you to bypass GTID consistency check between on-premises
593 # master and Cloud SQL instance during the demotion operation but also
594 # exposes you to the risk of future replication failures. Change the value
595 # only if you know the reason for the GTID divergence and are confident that
596 # doing so will not cause any replication issues.
597 "replicaConfiguration": { # Read-replica configuration for connecting to the on-premises master. # Configuration specific to read-replicas replicating from the on-premises
598 # master.
599 "kind": "A String", # This is always &lt;code&gt;sql#demoteMasterConfiguration&lt;/code&gt;.
600 "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
601 # master. Replication configuration information such as the username,
602 # password, certificates, and keys are not stored in the instance metadata.
603 # The configuration information is used only to set up the replication
604 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
605 # in the data directory.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700606 "username": "A String", # The username for the replication connection.
Dan O'Mearadd494642020-05-01 07:42:23 -0700607 "kind": "A String", # This is always &lt;code&gt;sql#demoteMasterMysqlReplicaConfiguration&lt;/code&gt;.
608 "password": "A String", # The password for the replication connection.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700609 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
610 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
Dan O'Mearadd494642020-05-01 07:42:23 -0700611 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key
612 # is encoded in the client's certificate. The format of the slave's private
613 # key can be either PKCS #1 or PKCS #8.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700614 },
615 },
616 },
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.
630 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
631 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
632 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700633 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700634 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
635 "encryptionOptions": {
636 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
637 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
638 # write permissions to the bucket and read access to the file.
639 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
640 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
641 # write permissions to the bucket and read access to the file.
642 "pvkPassword": "A String", # Password that encrypts the private key
643 },
644 },
645 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
646 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
647 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
648 # specify a database, and is overridden by any database specification in the
649 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
650 # must be specified.
651 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
652 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
653 "uri": "A String", # Path to the import file in Cloud Storage, in the form
654 # &lt;code&gt;gs:
655 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
656 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
657 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700658 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
659 "csvImportOptions": { # Options for importing data as CSV.
660 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -0700661 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
662 # of the database table are loaded with CSV data.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700663 "A String",
664 ],
665 },
666 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700667 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
668 "targetProject": "A String", # The project ID of the target instance related to this operation.
669 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
670 # identifier to retrieve the Operations resource that has information about
671 # the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700672 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700673 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
674 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
675 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
676 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
677 # stored. The URI is in the form &lt;code&gt;gs:
678 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
679 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
680 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
681 # // compressed.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700682 "csvExportOptions": { # Options for exporting data as CSV.
683 "selectQuery": "A String", # The select query used to extract the data.
684 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700685 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
686 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
687 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
688 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
689 # either by using this property or by using the
690 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
691 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
692 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
693 # this database must match the one specified in the
694 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700695 "A String",
696 ],
697 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -0700698 "tables": [ # Tables to export, or that were exported, from the specified database. If
699 # you specify tables, specify one and only one database. For PostgreSQL
700 # instances, you can specify only one table.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700701 "A String",
702 ],
703 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700704 "masterData": 42, # Option to include SQL statement required to set up replication.
705 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
706 # a CHANGE MASTER TO statement with the binary log coordinates.
707 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
708 # a SQL comment, and has no effect.
709 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700710 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800711 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800712 },
713 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700714 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
715 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
716 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800717 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700718 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
719 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
720 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
721 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
722 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
723 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
724 "user": "A String", # The email address of the user who initiated this operation.
725 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
726 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
727 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
728 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
729 # populated.
730 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800731 "errors": [ # The list of errors encountered while processing this operation.
732 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700733 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800734 "code": "A String", # Identifies the specific error that occurred.
735 "message": "A String", # Additional information about the error encountered.
736 },
737 ],
738 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700739 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
740 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
741 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800742 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700743 "targetLink": "A String",
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.
759 "exportContext": { # Database instance export context. # Contains details about the export operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700760 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
761 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
762 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
763 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
764 # stored. The URI is in the form &lt;code&gt;gs:
765 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
766 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
767 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
768 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -0800769 "csvExportOptions": { # Options for exporting data as CSV.
770 "selectQuery": "A String", # The select query used to extract the data.
771 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700772 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
773 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
774 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
775 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
776 # either by using this property or by using the
777 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
778 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
779 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
780 # this database must match the one specified in the
781 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -0800782 "A String",
783 ],
784 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -0700785 "tables": [ # Tables to export, or that were exported, from the specified database. If
786 # you specify tables, specify one and only one database. For PostgreSQL
787 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -0800788 "A String",
789 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700790 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700791 "masterData": 42, # Option to include SQL statement required to set up replication.
792 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
793 # a CHANGE MASTER TO statement with the binary log coordinates.
794 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
795 # a SQL comment, and has no effect.
796 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700797 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800798 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800799 },
800 },
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.
814 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
815 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
816 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800817 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700818 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
819 "encryptionOptions": {
820 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
821 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
822 # write permissions to the bucket and read access to the file.
823 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
824 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
825 # write permissions to the bucket and read access to the file.
826 "pvkPassword": "A String", # Password that encrypts the private key
827 },
828 },
829 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
830 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
831 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
832 # specify a database, and is overridden by any database specification in the
833 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
834 # must be specified.
835 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
836 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
837 "uri": "A String", # Path to the import file in Cloud Storage, in the form
838 # &lt;code&gt;gs:
839 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
840 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
841 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700842 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -0800843 "csvImportOptions": { # Options for importing data as CSV.
844 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -0700845 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
846 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -0800847 "A String",
848 ],
849 },
850 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700851 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
852 "targetProject": "A String", # The project ID of the target instance related to this operation.
853 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
854 # identifier to retrieve the Operations resource that has information about
855 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -0800856 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700857 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
858 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
859 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
860 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
861 # stored. The URI is in the form &lt;code&gt;gs:
862 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
863 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
864 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
865 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -0800866 "csvExportOptions": { # Options for exporting data as CSV.
867 "selectQuery": "A String", # The select query used to extract the data.
868 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700869 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
870 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
871 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
872 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
873 # either by using this property or by using the
874 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
875 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
876 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
877 # this database must match the one specified in the
878 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -0800879 "A String",
880 ],
881 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -0700882 "tables": [ # Tables to export, or that were exported, from the specified database. If
883 # you specify tables, specify one and only one database. For PostgreSQL
884 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -0800885 "A String",
886 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700887 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700888 "masterData": 42, # Option to include SQL statement required to set up replication.
889 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
890 # a CHANGE MASTER TO statement with the binary log coordinates.
891 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
892 # a SQL comment, and has no effect.
893 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700894 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800895 "schemaOnly": True or False, # Export only schemas.
896 },
897 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700898 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
899 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
900 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800901 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700902 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
903 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
904 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
905 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
906 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
907 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
908 "user": "A String", # The email address of the user who initiated this operation.
909 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
910 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
911 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
912 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
913 # populated.
914 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800915 "errors": [ # The list of errors encountered while processing this operation.
916 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700917 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800918 "code": "A String", # Identifies the specific error that occurred.
919 "message": "A String", # Additional information about the error encountered.
920 },
921 ],
922 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700923 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
924 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
925 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800926 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700927 "targetLink": "A String",
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.
943 "failoverContext": { # Database instance failover context. # Failover Context.
Dan O'Mearadd494642020-05-01 07:42:23 -0700944 "settingsVersion": "A String", # The current settings version of this instance. Request will be rejected if
945 # this version doesn't match the current settings version.
946 "kind": "A String", # 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.
961 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
962 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
963 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800964 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700965 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
966 "encryptionOptions": {
967 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
968 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
969 # write permissions to the bucket and read access to the file.
970 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
971 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
972 # write permissions to the bucket and read access to the file.
973 "pvkPassword": "A String", # Password that encrypts the private key
974 },
975 },
976 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
977 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
978 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
979 # specify a database, and is overridden by any database specification in the
980 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
981 # must be specified.
982 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
983 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
984 "uri": "A String", # Path to the import file in Cloud Storage, in the form
985 # &lt;code&gt;gs:
986 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
987 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
988 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700989 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800990 "csvImportOptions": { # Options for importing data as CSV.
991 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -0700992 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
993 # of the database table are loaded with CSV data.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800994 "A String",
995 ],
996 },
997 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700998 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
999 "targetProject": "A String", # The project ID of the target instance related to this operation.
1000 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
1001 # identifier to retrieve the Operations resource that has information about
1002 # the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001003 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07001004 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
1005 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1006 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1007 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
1008 # stored. The URI is in the form &lt;code&gt;gs:
1009 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
1010 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
1011 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
1012 # // compressed.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001013 "csvExportOptions": { # Options for exporting data as CSV.
1014 "selectQuery": "A String", # The select query used to extract the data.
1015 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001016 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
1017 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
1018 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
1019 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
1020 # either by using this property or by using the
1021 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
1022 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
1023 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
1024 # this database must match the one specified in the
1025 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001026 "A String",
1027 ],
1028 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -07001029 "tables": [ # Tables to export, or that were exported, from the specified database. If
1030 # you specify tables, specify one and only one database. For PostgreSQL
1031 # instances, you can specify only one table.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001032 "A String",
1033 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001034 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -07001035 "masterData": 42, # Option to include SQL statement required to set up replication.
1036 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
1037 # a CHANGE MASTER TO statement with the binary log coordinates.
1038 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
1039 # a SQL comment, and has no effect.
1040 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001041 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001042 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08001043 },
1044 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001045 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
1046 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
1047 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08001048 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001049 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
1050 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
1051 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
1052 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
1053 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
1054 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
1055 "user": "A String", # The email address of the user who initiated this operation.
1056 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
1057 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
1058 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1059 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
1060 # populated.
1061 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08001062 "errors": [ # The list of errors encountered while processing this operation.
1063 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -07001064 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08001065 "code": "A String", # Identifies the specific error that occurred.
1066 "message": "A String", # Additional information about the error encountered.
1067 },
1068 ],
1069 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001070 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
1071 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
1072 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08001073 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001074 "targetLink": "A String",
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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001094 "backendType": "A String", # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
1095 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
1096 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
1097 # managed by Google. &lt;br&gt;This property is read-only; use the
1098 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
1099 # the database type and Second or First Generation.
1100 "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been
1101 # deprecated. Users should use the
1102 # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud
1103 # Monitoring API instead. Please see &lt;a
1104 # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ"&gt;this
1105 # announcement&lt;/a&gt; for details.
1106 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property
1107 # is applicable only to Second Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001108 "ipAddresses": [ # The assigned IP addresses for the instance.
1109 { # Database instance IP Mapping.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001110 "ipAddress": "A String", # The IP address assigned.
Dan O'Mearadd494642020-05-01 07:42:23 -07001111 "type": "A String", # The type of this IP address. A &lt;code&gt;PRIMARY&lt;/code&gt; address is a public
1112 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
1113 # address is a private address that can accept incoming connections. An
1114 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
1115 # originating from the instance, if supported.
1116 "timeToRetire": "A String", # The due time for this IP to be retired in &lt;a
1117 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
1118 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
1119 # the IP is scheduled to be retired.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001120 },
1121 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001122 "databaseVersion": "A String", # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
1123 # field can not be changed after instance creation. MySQL Second Generation
1124 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
1125 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
1126 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
1127 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001128 "instanceType": "A String", # The instance type. This can be one of the following.
Dan O'Mearadd494642020-05-01 07:42:23 -07001129 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
1130 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
1131 # instance running on the
1132 # customer's premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
1133 # instance configured as a read-replica.
1134 "failoverReplica": { # The name and status of the failover replica. This property is applicable
1135 # only to Second Generation instances.
1136 "available": True or False, # The availability status of the failover replica. A false status indicates
1137 # that the failover replica is out of sync. The master can only failover to
1138 # the failover replica when the status is true.
1139 "name": "A String", # The name of the failover replica. If specified at instance creation, a
1140 # failover replica is created for the instance. The name
1141 # doesn't include the project ID. This property is applicable only to
1142 # Second Generation instances.
1143 },
1144 "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
1145 # Applies only to Second Generation instances.
1146 "kind": "A String", # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
1147 "kmsKeyName": "A String", # Resource name of KMS key for disk encryption
1148 },
1149 "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1150 "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance.
1151 "canDefer": True or False,
1152 "canReschedule": True or False, # If the scheduled maintenance can be rescheduled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001153 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001154 "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension.
1155 "A String",
1156 ],
1157 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
Dan O'Mearadd494642020-05-01 07:42:23 -07001158 "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
1159 # Applies only to Second Generation instances.
1160 "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource
1161 "kind": "A String", # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001162 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001163 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the
1164 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
1165 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
1166 # available, for example due to problems with billing.
1167 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
1168 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
1169 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
1170 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
1171 "etag": "A String", # This field is deprecated and will be removed from a future version of the
1172 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
1173 "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This
1174 # value could be different from the zone that was specified when the instance
1175 # was created if the instance has failed over to its secondary zone.
1176 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001177 "replicaNames": [ # The replicas of the instance.
1178 "A String",
1179 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001180 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
Dan O'Mearadd494642020-05-01 07:42:23 -07001181 "username": "A String", # The username for connecting to on-premises instance.
1182 "kind": "A String", # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
1183 "password": "A String", # The password for connecting to on-premises instance.
1184 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
1185 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
1186 "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001187 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
Dan O'Mearadd494642020-05-01 07:42:23 -07001188 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key
1189 # is encoded in the client's certificate.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001190 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001191 "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
Dan O'Mearadd494642020-05-01 07:42:23 -07001192 "kind": "A String", # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001193 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
Dan O'Mearadd494642020-05-01 07:42:23 -07001194 "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only
1195 # to First Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001196 "serverCaCert": { # SslCerts Resource # SSL configuration.
1197 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
Dan O'Mearadd494642020-05-01 07:42:23 -07001198 "kind": "A String", # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001199 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
Dan O'Mearadd494642020-05-01 07:42:23 -07001200 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001201 "instance": "A String", # Name of the database instance.
1202 "cert": "A String", # PEM representation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001203 "expirationTime": "A String", # The time when the certificate expires in &lt;a
1204 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
1205 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1206 "createTime": "A String", # The time when the certificate was created in &lt;a
1207 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
1208 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001209 "selfLink": "A String", # The URI of this resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001210 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001211 "region": "A String", # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
1212 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
1213 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
1214 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
1215 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
1216 # or Second Generation). The region can not be changed after instance
1217 # creation.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001218 "settings": { # Database instance settings. # The user settings.
1219 "databaseFlags": [ # The database flags passed to the instance at startup.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001220 { # Database flags for Cloud SQL instances.
Dan O'Mearadd494642020-05-01 07:42:23 -07001221 "name": "A String", # The name of the flag. These flags are passed at instance startup, so
1222 # include both server options and system variables for MySQL. Flags should be
1223 # specified with underscores, not hyphens. For more information, see &lt;a
1224 # href="/sql/docs/mysql/flags"&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
1225 # SQL documentation.
1226 "value": "A String", # The value of the flag. Booleans should be set to &lt;code&gt;on&lt;/code&gt; for true
1227 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
1228 # doesn't take a value.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001229 },
1230 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001231 "kind": "A String", # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
1232 "dataDiskType": "A String", # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
1233 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
1234 "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values:
1235 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
1236 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
1237 # The instance can serve data from more than one zone in a region (it is
1238 # highly available). &lt;br&gt;For more information, see &lt;a
1239 # href="https://cloud.google.com/sql/docs/postgres/high-availability"&gt;Overview
1240 # of the High Availability Configuration&lt;/a&gt;.
1241 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation
1242 # instances only.
1243 "A String",
1244 ],
1245 "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is
1246 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
1247 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
1248 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
1249 # off; it is not activated, even if a connection request arrives.
1250 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
1251 # responds to incoming requests, and turns itself off when not in use.
1252 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
1253 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
1254 # 12 hours of inactivity.
1255 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
1256 "kind": "A String", # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
1257 "replicationLogArchivingEnabled": True or False, # Reserved for future use.
1258 "enabled": True or False, # Whether this configuration is enabled.
1259 "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
1260 # disabled, binarylog must be disabled as well.
1261 "location": "A String", # Location of the backup
1262 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24
1263 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
1264 "pointInTimeRecoveryEnabled": True or False, # Reserved for future use.
1265 },
1266 "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
1267 # instance IP and manage which external networks can connect to the instance.
1268 # The IPv4 address cannot be disabled for Second Generation instances.
1269 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
1270 "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not.
1271 "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance
1272 # using the IP. In &lt;a
1273 # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation"&gt;CIDR
1274 # notation&lt;/a&gt;, also known as 'slash' notation (e.g.
1275 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
1276 { # An entry for an Access Control list.
1277 "kind": "A String", # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
1278 "expirationTime": "A String", # The time when this access control entry expires in &lt;a
1279 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
1280 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1281 "value": "A String", # The whitelisted value for the access control list.
1282 "name": "A String", # Optional. A label to identify this entry.
1283 },
1284 ],
1285 "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is
1286 # accessible for private IP. For example,
1287 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
1288 # be updated, but it cannot be removed after it is set.
1289 },
1290 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether
1291 # database flags for crash-safe replication are enabled. This property is
1292 # only applicable to First Generation instances.
1293 "userLabels": { # User-provided labels, represented as a dictionary where each label is a
1294 # single key value pair.
1295 "a_key": "A String",
1296 },
1297 "pricingPlan": "A String", # The pricing plan for this instance. This can be either &lt;code&gt;PER_USE&lt;/code&gt;
1298 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
1299 # Generation instances.
1300 "replicationType": "A String", # The type of replication this instance uses. This can be either
1301 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
1302 # only applicable to First Generation instances.
1303 "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as
1304 # near as possible to either an App Engine app or Compute Engine zone for
1305 # better performance. App Engine co-location is only applicable to First
1306 # Generation instances.
1307 # preferably be located, either in a specific Compute Engine zone, or
1308 # co-located with an App Engine application. Note that if the preferred
1309 # location is not available, the instance will be located as close as possible
1310 # within the region. Only one location may be specified.
1311 "kind": "A String", # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
1312 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the
1313 # Cloud SQL instance.
1314 "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
1315 # etc.).
1316 },
1317 "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased.
1318 # The default value is 0, which specifies that there is no limit. Not used
1319 # for First Generation instances.
1320 "tier": "A String", # The tier (or machine type) for this instance, for example
1321 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
1322 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
1323 # this property determines whether the instance is First or Second
1324 # Generation. For more information, see &lt;a
1325 # href="/sql/docs/db_path/instance-settings"&gt;Instance Settings&lt;/a&gt;.
1326 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether
1327 # replication is enabled or not.
1328 "settingsVersion": "A String", # The version of instance settings. This is a required field for update
1329 # method to make sure concurrent updates are handled properly. During update,
1330 # use the most recent settingsVersion value for this instance and do not try
1331 # to update this value.
1332 "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is
1333 # true. Not used for First Generation instances.
1334 "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance
1335 # can be restarted for maintenance purposes. Not used for First Generation
1336 # instances.
1337 # preferably be restarted for system maintenance purposes.
1338 "kind": "A String", # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
1339 "updateTrack": "A String", # Maintenance timing setting: &lt;code&gt;canary&lt;/code&gt; (Earlier) or
1340 # &lt;code&gt;stable&lt;/code&gt; (Later). &lt;br /&gt;&lt;a
1341 # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"&gt;
1342 # Learn more&lt;/a&gt;.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001343 "day": 42, # day of week (1-7), starting on Monday.
1344 "hour": 42, # hour of day - 0 to 23.
1345 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001346 "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
1347 # for First Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001348 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001349 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google
1350 # apps domain is prefixed if applicable.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001351 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
Dan O'Mearadd494642020-05-01 07:42:23 -07001352 "kind": "A String", # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
1353 "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to
1354 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
1355 # case the master instance fails, the replica instance will be promoted as
1356 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
1357 # target, and the replica has to be in different zone with the master
1358 # instance.
1359 "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
1360 # master. Replication configuration information such as the username,
1361 # password, certificates, and keys are not stored in the instance metadata.
1362 # The configuration information is used only to set up the replication
1363 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
1364 # in the data directory.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001365 "username": "A String", # The username for the replication connection.
Dan O'Mearadd494642020-05-01 07:42:23 -07001366 "kind": "A String", # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
1367 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key
1368 # is encoded in the client's certificate.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001369 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
1370 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
Dan O'Mearadd494642020-05-01 07:42:23 -07001371 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001372 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
1373 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
Dan O'Mearadd494642020-05-01 07:42:23 -07001374 "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate
1375 # that it sends during the SSL handshake.
1376 "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave
1377 # instance is to be created. The URI is in the form gs:
1378 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
1379 # // Dumps should have the binlog co-ordinates from which replication should
1380 # // begin. This can be accomplished by setting --master-data to 1 when using
1381 # // mysqldump.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001382 "password": "A String", # The password for the replication connection.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001383 },
1384 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001385 "rootPassword": "A String", # Initial root password. Use only on creation.
Craig Citroe633be12015-03-02 13:40:36 -08001386 "selfLink": "A String", # The URI of this resource.
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.
1402 "importContext": { # Database instance import context. # Contains details about the import operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001403 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
1404 "encryptionOptions": {
1405 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
1406 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1407 # write permissions to the bucket and read access to the file.
1408 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
1409 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1410 # write permissions to the bucket and read access to the file.
1411 "pvkPassword": "A String", # Password that encrypts the private key
1412 },
1413 },
1414 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
1415 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
1416 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
1417 # specify a database, and is overridden by any database specification in the
1418 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
1419 # must be specified.
1420 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1421 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1422 "uri": "A String", # Path to the import file in Cloud Storage, in the form
1423 # &lt;code&gt;gs:
1424 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
1425 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
1426 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001427 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -08001428 "csvImportOptions": { # Options for importing data as CSV.
1429 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -07001430 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
1431 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08001432 "A String",
1433 ],
1434 },
1435 },
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.
1449 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
1450 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
1451 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08001452 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07001453 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
1454 "encryptionOptions": {
1455 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
1456 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1457 # write permissions to the bucket and read access to the file.
1458 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
1459 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1460 # write permissions to the bucket and read access to the file.
1461 "pvkPassword": "A String", # Password that encrypts the private key
1462 },
1463 },
1464 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
1465 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
1466 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
1467 # specify a database, and is overridden by any database specification in the
1468 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
1469 # must be specified.
1470 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1471 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1472 "uri": "A String", # Path to the import file in Cloud Storage, in the form
1473 # &lt;code&gt;gs:
1474 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
1475 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
1476 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001477 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -08001478 "csvImportOptions": { # Options for importing data as CSV.
1479 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -07001480 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
1481 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08001482 "A String",
1483 ],
1484 },
1485 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001486 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
1487 "targetProject": "A String", # The project ID of the target instance related to this operation.
1488 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
1489 # identifier to retrieve the Operations resource that has information about
1490 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -08001491 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07001492 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
1493 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1494 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1495 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
1496 # stored. The URI is in the form &lt;code&gt;gs:
1497 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
1498 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
1499 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
1500 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -08001501 "csvExportOptions": { # Options for exporting data as CSV.
1502 "selectQuery": "A String", # The select query used to extract the data.
1503 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001504 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
1505 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
1506 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
1507 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
1508 # either by using this property or by using the
1509 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
1510 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
1511 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
1512 # this database must match the one specified in the
1513 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -08001514 "A String",
1515 ],
1516 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -07001517 "tables": [ # Tables to export, or that were exported, from the specified database. If
1518 # you specify tables, specify one and only one database. For PostgreSQL
1519 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -08001520 "A String",
1521 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001522 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -07001523 "masterData": 42, # Option to include SQL statement required to set up replication.
1524 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
1525 # a CHANGE MASTER TO statement with the binary log coordinates.
1526 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
1527 # a SQL comment, and has no effect.
1528 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001529 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001530 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08001531 },
1532 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001533 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
1534 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
1535 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08001536 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001537 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
1538 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
1539 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
1540 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
1541 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
1542 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
1543 "user": "A String", # The email address of the user who initiated this operation.
1544 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
1545 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
1546 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1547 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
1548 # populated.
1549 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08001550 "errors": [ # The list of errors encountered while processing this operation.
1551 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -07001552 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08001553 "code": "A String", # Identifies the specific error that occurred.
1554 "message": "A String", # Additional information about the error encountered.
1555 },
1556 ],
1557 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001558 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
1559 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
1560 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08001561 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001562 "targetLink": "A String",
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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001577 "backendType": "A String", # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
1578 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
1579 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
1580 # managed by Google. &lt;br&gt;This property is read-only; use the
1581 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
1582 # the database type and Second or First Generation.
1583 "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been
1584 # deprecated. Users should use the
1585 # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud
1586 # Monitoring API instead. Please see &lt;a
1587 # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ"&gt;this
1588 # announcement&lt;/a&gt; for details.
1589 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property
1590 # is applicable only to Second Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001591 "ipAddresses": [ # The assigned IP addresses for the instance.
1592 { # Database instance IP Mapping.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001593 "ipAddress": "A String", # The IP address assigned.
Dan O'Mearadd494642020-05-01 07:42:23 -07001594 "type": "A String", # The type of this IP address. A &lt;code&gt;PRIMARY&lt;/code&gt; address is a public
1595 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
1596 # address is a private address that can accept incoming connections. An
1597 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
1598 # originating from the instance, if supported.
1599 "timeToRetire": "A String", # The due time for this IP to be retired in &lt;a
1600 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
1601 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
1602 # the IP is scheduled to be retired.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001603 },
1604 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001605 "databaseVersion": "A String", # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
1606 # field can not be changed after instance creation. MySQL Second Generation
1607 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
1608 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
1609 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
1610 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001611 "instanceType": "A String", # The instance type. This can be one of the following.
Dan O'Mearadd494642020-05-01 07:42:23 -07001612 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
1613 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
1614 # instance running on the
1615 # customer's premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
1616 # instance configured as a read-replica.
1617 "failoverReplica": { # The name and status of the failover replica. This property is applicable
1618 # only to Second Generation instances.
1619 "available": True or False, # The availability status of the failover replica. A false status indicates
1620 # that the failover replica is out of sync. The master can only failover to
1621 # the failover replica when the status is true.
1622 "name": "A String", # The name of the failover replica. If specified at instance creation, a
1623 # failover replica is created for the instance. The name
1624 # doesn't include the project ID. This property is applicable only to
1625 # Second Generation instances.
1626 },
1627 "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
1628 # Applies only to Second Generation instances.
1629 "kind": "A String", # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
1630 "kmsKeyName": "A String", # Resource name of KMS key for disk encryption
1631 },
1632 "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1633 "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance.
1634 "canDefer": True or False,
1635 "canReschedule": True or False, # If the scheduled maintenance can be rescheduled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001636 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001637 "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension.
1638 "A String",
1639 ],
1640 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
Dan O'Mearadd494642020-05-01 07:42:23 -07001641 "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
1642 # Applies only to Second Generation instances.
1643 "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource
1644 "kind": "A String", # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001645 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001646 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the
1647 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
1648 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
1649 # available, for example due to problems with billing.
1650 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
1651 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
1652 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
1653 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
1654 "etag": "A String", # This field is deprecated and will be removed from a future version of the
1655 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
1656 "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This
1657 # value could be different from the zone that was specified when the instance
1658 # was created if the instance has failed over to its secondary zone.
1659 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001660 "replicaNames": [ # The replicas of the instance.
1661 "A String",
1662 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001663 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
Dan O'Mearadd494642020-05-01 07:42:23 -07001664 "username": "A String", # The username for connecting to on-premises instance.
1665 "kind": "A String", # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
1666 "password": "A String", # The password for connecting to on-premises instance.
1667 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
1668 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
1669 "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001670 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
Dan O'Mearadd494642020-05-01 07:42:23 -07001671 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key
1672 # is encoded in the client's certificate.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001673 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001674 "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
Dan O'Mearadd494642020-05-01 07:42:23 -07001675 "kind": "A String", # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001676 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
Dan O'Mearadd494642020-05-01 07:42:23 -07001677 "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only
1678 # to First Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001679 "serverCaCert": { # SslCerts Resource # SSL configuration.
1680 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
Dan O'Mearadd494642020-05-01 07:42:23 -07001681 "kind": "A String", # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001682 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
Dan O'Mearadd494642020-05-01 07:42:23 -07001683 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001684 "instance": "A String", # Name of the database instance.
1685 "cert": "A String", # PEM representation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001686 "expirationTime": "A String", # The time when the certificate expires in &lt;a
1687 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
1688 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1689 "createTime": "A String", # The time when the certificate was created in &lt;a
1690 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
1691 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001692 "selfLink": "A String", # The URI of this resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001693 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001694 "region": "A String", # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
1695 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
1696 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
1697 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
1698 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
1699 # or Second Generation). The region can not be changed after instance
1700 # creation.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001701 "settings": { # Database instance settings. # The user settings.
1702 "databaseFlags": [ # The database flags passed to the instance at startup.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001703 { # Database flags for Cloud SQL instances.
Dan O'Mearadd494642020-05-01 07:42:23 -07001704 "name": "A String", # The name of the flag. These flags are passed at instance startup, so
1705 # include both server options and system variables for MySQL. Flags should be
1706 # specified with underscores, not hyphens. For more information, see &lt;a
1707 # href="/sql/docs/mysql/flags"&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
1708 # SQL documentation.
1709 "value": "A String", # The value of the flag. Booleans should be set to &lt;code&gt;on&lt;/code&gt; for true
1710 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
1711 # doesn't take a value.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001712 },
1713 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001714 "kind": "A String", # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
1715 "dataDiskType": "A String", # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
1716 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
1717 "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values:
1718 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
1719 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
1720 # The instance can serve data from more than one zone in a region (it is
1721 # highly available). &lt;br&gt;For more information, see &lt;a
1722 # href="https://cloud.google.com/sql/docs/postgres/high-availability"&gt;Overview
1723 # of the High Availability Configuration&lt;/a&gt;.
1724 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation
1725 # instances only.
1726 "A String",
1727 ],
1728 "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is
1729 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
1730 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
1731 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
1732 # off; it is not activated, even if a connection request arrives.
1733 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
1734 # responds to incoming requests, and turns itself off when not in use.
1735 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
1736 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
1737 # 12 hours of inactivity.
1738 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
1739 "kind": "A String", # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
1740 "replicationLogArchivingEnabled": True or False, # Reserved for future use.
1741 "enabled": True or False, # Whether this configuration is enabled.
1742 "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
1743 # disabled, binarylog must be disabled as well.
1744 "location": "A String", # Location of the backup
1745 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24
1746 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
1747 "pointInTimeRecoveryEnabled": True or False, # Reserved for future use.
1748 },
1749 "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
1750 # instance IP and manage which external networks can connect to the instance.
1751 # The IPv4 address cannot be disabled for Second Generation instances.
1752 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
1753 "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not.
1754 "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance
1755 # using the IP. In &lt;a
1756 # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation"&gt;CIDR
1757 # notation&lt;/a&gt;, also known as 'slash' notation (e.g.
1758 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
1759 { # An entry for an Access Control list.
1760 "kind": "A String", # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
1761 "expirationTime": "A String", # The time when this access control entry expires in &lt;a
1762 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
1763 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1764 "value": "A String", # The whitelisted value for the access control list.
1765 "name": "A String", # Optional. A label to identify this entry.
1766 },
1767 ],
1768 "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is
1769 # accessible for private IP. For example,
1770 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
1771 # be updated, but it cannot be removed after it is set.
1772 },
1773 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether
1774 # database flags for crash-safe replication are enabled. This property is
1775 # only applicable to First Generation instances.
1776 "userLabels": { # User-provided labels, represented as a dictionary where each label is a
1777 # single key value pair.
1778 "a_key": "A String",
1779 },
1780 "pricingPlan": "A String", # The pricing plan for this instance. This can be either &lt;code&gt;PER_USE&lt;/code&gt;
1781 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
1782 # Generation instances.
1783 "replicationType": "A String", # The type of replication this instance uses. This can be either
1784 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
1785 # only applicable to First Generation instances.
1786 "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as
1787 # near as possible to either an App Engine app or Compute Engine zone for
1788 # better performance. App Engine co-location is only applicable to First
1789 # Generation instances.
1790 # preferably be located, either in a specific Compute Engine zone, or
1791 # co-located with an App Engine application. Note that if the preferred
1792 # location is not available, the instance will be located as close as possible
1793 # within the region. Only one location may be specified.
1794 "kind": "A String", # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
1795 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the
1796 # Cloud SQL instance.
1797 "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
1798 # etc.).
1799 },
1800 "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased.
1801 # The default value is 0, which specifies that there is no limit. Not used
1802 # for First Generation instances.
1803 "tier": "A String", # The tier (or machine type) for this instance, for example
1804 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
1805 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
1806 # this property determines whether the instance is First or Second
1807 # Generation. For more information, see &lt;a
1808 # href="/sql/docs/db_path/instance-settings"&gt;Instance Settings&lt;/a&gt;.
1809 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether
1810 # replication is enabled or not.
1811 "settingsVersion": "A String", # The version of instance settings. This is a required field for update
1812 # method to make sure concurrent updates are handled properly. During update,
1813 # use the most recent settingsVersion value for this instance and do not try
1814 # to update this value.
1815 "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is
1816 # true. Not used for First Generation instances.
1817 "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance
1818 # can be restarted for maintenance purposes. Not used for First Generation
1819 # instances.
1820 # preferably be restarted for system maintenance purposes.
1821 "kind": "A String", # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
1822 "updateTrack": "A String", # Maintenance timing setting: &lt;code&gt;canary&lt;/code&gt; (Earlier) or
1823 # &lt;code&gt;stable&lt;/code&gt; (Later). &lt;br /&gt;&lt;a
1824 # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"&gt;
1825 # Learn more&lt;/a&gt;.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001826 "day": 42, # day of week (1-7), starting on Monday.
1827 "hour": 42, # hour of day - 0 to 23.
1828 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001829 "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
1830 # for First Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001831 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001832 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google
1833 # apps domain is prefixed if applicable.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001834 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
Dan O'Mearadd494642020-05-01 07:42:23 -07001835 "kind": "A String", # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
1836 "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to
1837 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
1838 # case the master instance fails, the replica instance will be promoted as
1839 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
1840 # target, and the replica has to be in different zone with the master
1841 # instance.
1842 "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
1843 # master. Replication configuration information such as the username,
1844 # password, certificates, and keys are not stored in the instance metadata.
1845 # The configuration information is used only to set up the replication
1846 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
1847 # in the data directory.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001848 "username": "A String", # The username for the replication connection.
Dan O'Mearadd494642020-05-01 07:42:23 -07001849 "kind": "A String", # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
1850 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key
1851 # is encoded in the client's certificate.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001852 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
1853 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
Dan O'Mearadd494642020-05-01 07:42:23 -07001854 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001855 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
1856 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
Dan O'Mearadd494642020-05-01 07:42:23 -07001857 "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate
1858 # that it sends during the SSL handshake.
1859 "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave
1860 # instance is to be created. The URI is in the form gs:
1861 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
1862 # // Dumps should have the binlog co-ordinates from which replication should
1863 # // begin. This can be accomplished by setting --master-data to 1 when using
1864 # // mysqldump.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001865 "password": "A String", # The password for the replication connection.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001866 },
1867 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001868 "rootPassword": "A String", # Initial root password. Use only on creation.
Craig Citroe633be12015-03-02 13:40:36 -08001869 "selfLink": "A String", # The URI of this resource.
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.
1883 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
1884 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
1885 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08001886 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07001887 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
1888 "encryptionOptions": {
1889 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
1890 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1891 # write permissions to the bucket and read access to the file.
1892 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
1893 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
1894 # write permissions to the bucket and read access to the file.
1895 "pvkPassword": "A String", # Password that encrypts the private key
1896 },
1897 },
1898 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
1899 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
1900 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
1901 # specify a database, and is overridden by any database specification in the
1902 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
1903 # must be specified.
1904 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1905 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1906 "uri": "A String", # Path to the import file in Cloud Storage, in the form
1907 # &lt;code&gt;gs:
1908 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
1909 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
1910 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001911 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -08001912 "csvImportOptions": { # Options for importing data as CSV.
1913 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -07001914 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
1915 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08001916 "A String",
1917 ],
1918 },
1919 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001920 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
1921 "targetProject": "A String", # The project ID of the target instance related to this operation.
1922 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
1923 # identifier to retrieve the Operations resource that has information about
1924 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -08001925 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07001926 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
1927 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
1928 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
1929 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
1930 # stored. The URI is in the form &lt;code&gt;gs:
1931 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
1932 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
1933 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
1934 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -08001935 "csvExportOptions": { # Options for exporting data as CSV.
1936 "selectQuery": "A String", # The select query used to extract the data.
1937 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001938 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
1939 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
1940 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
1941 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
1942 # either by using this property or by using the
1943 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
1944 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
1945 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
1946 # this database must match the one specified in the
1947 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -08001948 "A String",
1949 ],
1950 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -07001951 "tables": [ # Tables to export, or that were exported, from the specified database. If
1952 # you specify tables, specify one and only one database. For PostgreSQL
1953 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -08001954 "A String",
1955 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001956 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -07001957 "masterData": 42, # Option to include SQL statement required to set up replication.
1958 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
1959 # a CHANGE MASTER TO statement with the binary log coordinates.
1960 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
1961 # a SQL comment, and has no effect.
1962 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001963 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001964 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08001965 },
1966 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001967 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
1968 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
1969 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08001970 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001971 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
1972 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
1973 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
1974 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
1975 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
1976 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
1977 "user": "A String", # The email address of the user who initiated this operation.
1978 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
1979 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
1980 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
1981 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
1982 # populated.
1983 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08001984 "errors": [ # The list of errors encountered while processing this operation.
1985 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -07001986 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08001987 "code": "A String", # Identifies the specific error that occurred.
1988 "message": "A String", # Additional information about the error encountered.
1989 },
1990 ],
1991 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001992 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
1993 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
1994 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08001995 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001996 "targetLink": "A String",
Craig Citroe633be12015-03-02 13:40:36 -08001997 }</pre>
1998</div>
1999
2000<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002001 <code class="details" id="list">list(project, pageToken=None, maxResults=None, filter=None, x__xgafv=None)</code>
2002 <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)
Dan O'Mearadd494642020-05-01 07:42:23 -07002006 pageToken: string, A previously-returned page token representing part of the larger set of
2007results to view.
Craig Citroe633be12015-03-02 13:40:36 -08002008 maxResults: integer, The maximum number of results to return per response.
Dan O'Mearadd494642020-05-01 07:42:23 -07002009 filter: string, A filter expression that filters resources listed in the response.
2010The expression is in the form of field:value. For example,
2011'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per
2012their JSON representation, such as 'settings.userLabels.auto_start:true'.
2013
2014Multiple filter queries are space-separated. For example.
2015'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each
2016expression is an AND expression. However, you can include AND and OR
2017expressions explicitly.
2018 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002027 "nextPageToken": "A String", # The continuation token, used to page through large result sets. Provide
2028 # this value in a subsequent request to return the next page of results.
Craig Citroe633be12015-03-02 13:40:36 -08002029 "items": [ # List of database instance resources.
2030 { # A Cloud SQL instance resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07002031 "backendType": "A String", # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
2032 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
2033 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
2034 # managed by Google. &lt;br&gt;This property is read-only; use the
2035 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
2036 # the database type and Second or First Generation.
2037 "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been
2038 # deprecated. Users should use the
2039 # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud
2040 # Monitoring API instead. Please see &lt;a
2041 # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ"&gt;this
2042 # announcement&lt;/a&gt; for details.
2043 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property
2044 # is applicable only to Second Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002045 "ipAddresses": [ # The assigned IP addresses for the instance.
2046 { # Database instance IP Mapping.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002047 "ipAddress": "A String", # The IP address assigned.
Dan O'Mearadd494642020-05-01 07:42:23 -07002048 "type": "A String", # The type of this IP address. A &lt;code&gt;PRIMARY&lt;/code&gt; address is a public
2049 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
2050 # address is a private address that can accept incoming connections. An
2051 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
2052 # originating from the instance, if supported.
2053 "timeToRetire": "A String", # The due time for this IP to be retired in &lt;a
2054 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
2055 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
2056 # the IP is scheduled to be retired.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002057 },
2058 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002059 "databaseVersion": "A String", # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
2060 # field can not be changed after instance creation. MySQL Second Generation
2061 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
2062 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
2063 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
2064 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002065 "instanceType": "A String", # The instance type. This can be one of the following.
Dan O'Mearadd494642020-05-01 07:42:23 -07002066 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
2067 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
2068 # instance running on the
2069 # customer's premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
2070 # instance configured as a read-replica.
2071 "failoverReplica": { # The name and status of the failover replica. This property is applicable
2072 # only to Second Generation instances.
2073 "available": True or False, # The availability status of the failover replica. A false status indicates
2074 # that the failover replica is out of sync. The master can only failover to
2075 # the failover replica when the status is true.
2076 "name": "A String", # The name of the failover replica. If specified at instance creation, a
2077 # failover replica is created for the instance. The name
2078 # doesn't include the project ID. This property is applicable only to
2079 # Second Generation instances.
2080 },
2081 "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
2082 # Applies only to Second Generation instances.
2083 "kind": "A String", # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
2084 "kmsKeyName": "A String", # Resource name of KMS key for disk encryption
2085 },
2086 "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
2087 "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance.
2088 "canDefer": True or False,
2089 "canReschedule": True or False, # If the scheduled maintenance can be rescheduled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002090 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002091 "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension.
2092 "A String",
2093 ],
2094 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
Dan O'Mearadd494642020-05-01 07:42:23 -07002095 "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
2096 # Applies only to Second Generation instances.
2097 "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource
2098 "kind": "A String", # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002099 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002100 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the
2101 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
2102 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
2103 # available, for example due to problems with billing.
2104 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
2105 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
2106 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
2107 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
2108 "etag": "A String", # This field is deprecated and will be removed from a future version of the
2109 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
2110 "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This
2111 # value could be different from the zone that was specified when the instance
2112 # was created if the instance has failed over to its secondary zone.
2113 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002114 "replicaNames": [ # The replicas of the instance.
2115 "A String",
2116 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002117 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
Dan O'Mearadd494642020-05-01 07:42:23 -07002118 "username": "A String", # The username for connecting to on-premises instance.
2119 "kind": "A String", # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
2120 "password": "A String", # The password for connecting to on-premises instance.
2121 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
2122 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
2123 "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002124 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
Dan O'Mearadd494642020-05-01 07:42:23 -07002125 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key
2126 # is encoded in the client's certificate.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002127 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07002128 "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
Dan O'Mearadd494642020-05-01 07:42:23 -07002129 "kind": "A String", # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002130 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
Dan O'Mearadd494642020-05-01 07:42:23 -07002131 "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only
2132 # to First Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002133 "serverCaCert": { # SslCerts Resource # SSL configuration.
2134 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
Dan O'Mearadd494642020-05-01 07:42:23 -07002135 "kind": "A String", # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002136 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
Dan O'Mearadd494642020-05-01 07:42:23 -07002137 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002138 "instance": "A String", # Name of the database instance.
2139 "cert": "A String", # PEM representation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002140 "expirationTime": "A String", # The time when the certificate expires in &lt;a
2141 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
2142 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2143 "createTime": "A String", # The time when the certificate was created in &lt;a
2144 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
2145 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002146 "selfLink": "A String", # The URI of this resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002147 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002148 "region": "A String", # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
2149 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
2150 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
2151 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
2152 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
2153 # or Second Generation). The region can not be changed after instance
2154 # creation.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002155 "settings": { # Database instance settings. # The user settings.
2156 "databaseFlags": [ # The database flags passed to the instance at startup.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002157 { # Database flags for Cloud SQL instances.
Dan O'Mearadd494642020-05-01 07:42:23 -07002158 "name": "A String", # The name of the flag. These flags are passed at instance startup, so
2159 # include both server options and system variables for MySQL. Flags should be
2160 # specified with underscores, not hyphens. For more information, see &lt;a
2161 # href="/sql/docs/mysql/flags"&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
2162 # SQL documentation.
2163 "value": "A String", # The value of the flag. Booleans should be set to &lt;code&gt;on&lt;/code&gt; for true
2164 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
2165 # doesn't take a value.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002166 },
2167 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002168 "kind": "A String", # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
2169 "dataDiskType": "A String", # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
2170 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
2171 "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values:
2172 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
2173 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
2174 # The instance can serve data from more than one zone in a region (it is
2175 # highly available). &lt;br&gt;For more information, see &lt;a
2176 # href="https://cloud.google.com/sql/docs/postgres/high-availability"&gt;Overview
2177 # of the High Availability Configuration&lt;/a&gt;.
2178 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation
2179 # instances only.
2180 "A String",
2181 ],
2182 "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is
2183 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
2184 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
2185 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
2186 # off; it is not activated, even if a connection request arrives.
2187 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
2188 # responds to incoming requests, and turns itself off when not in use.
2189 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
2190 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
2191 # 12 hours of inactivity.
2192 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
2193 "kind": "A String", # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
2194 "replicationLogArchivingEnabled": True or False, # Reserved for future use.
2195 "enabled": True or False, # Whether this configuration is enabled.
2196 "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
2197 # disabled, binarylog must be disabled as well.
2198 "location": "A String", # Location of the backup
2199 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24
2200 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
2201 "pointInTimeRecoveryEnabled": True or False, # Reserved for future use.
2202 },
2203 "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
2204 # instance IP and manage which external networks can connect to the instance.
2205 # The IPv4 address cannot be disabled for Second Generation instances.
2206 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
2207 "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not.
2208 "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance
2209 # using the IP. In &lt;a
2210 # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation"&gt;CIDR
2211 # notation&lt;/a&gt;, also known as 'slash' notation (e.g.
2212 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
2213 { # An entry for an Access Control list.
2214 "kind": "A String", # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
2215 "expirationTime": "A String", # The time when this access control entry expires in &lt;a
2216 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
2217 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2218 "value": "A String", # The whitelisted value for the access control list.
2219 "name": "A String", # Optional. A label to identify this entry.
2220 },
2221 ],
2222 "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is
2223 # accessible for private IP. For example,
2224 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
2225 # be updated, but it cannot be removed after it is set.
2226 },
2227 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether
2228 # database flags for crash-safe replication are enabled. This property is
2229 # only applicable to First Generation instances.
2230 "userLabels": { # User-provided labels, represented as a dictionary where each label is a
2231 # single key value pair.
2232 "a_key": "A String",
2233 },
2234 "pricingPlan": "A String", # The pricing plan for this instance. This can be either &lt;code&gt;PER_USE&lt;/code&gt;
2235 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
2236 # Generation instances.
2237 "replicationType": "A String", # The type of replication this instance uses. This can be either
2238 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
2239 # only applicable to First Generation instances.
2240 "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as
2241 # near as possible to either an App Engine app or Compute Engine zone for
2242 # better performance. App Engine co-location is only applicable to First
2243 # Generation instances.
2244 # preferably be located, either in a specific Compute Engine zone, or
2245 # co-located with an App Engine application. Note that if the preferred
2246 # location is not available, the instance will be located as close as possible
2247 # within the region. Only one location may be specified.
2248 "kind": "A String", # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
2249 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the
2250 # Cloud SQL instance.
2251 "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
2252 # etc.).
2253 },
2254 "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased.
2255 # The default value is 0, which specifies that there is no limit. Not used
2256 # for First Generation instances.
2257 "tier": "A String", # The tier (or machine type) for this instance, for example
2258 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
2259 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
2260 # this property determines whether the instance is First or Second
2261 # Generation. For more information, see &lt;a
2262 # href="/sql/docs/db_path/instance-settings"&gt;Instance Settings&lt;/a&gt;.
2263 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether
2264 # replication is enabled or not.
2265 "settingsVersion": "A String", # The version of instance settings. This is a required field for update
2266 # method to make sure concurrent updates are handled properly. During update,
2267 # use the most recent settingsVersion value for this instance and do not try
2268 # to update this value.
2269 "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is
2270 # true. Not used for First Generation instances.
2271 "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance
2272 # can be restarted for maintenance purposes. Not used for First Generation
2273 # instances.
2274 # preferably be restarted for system maintenance purposes.
2275 "kind": "A String", # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
2276 "updateTrack": "A String", # Maintenance timing setting: &lt;code&gt;canary&lt;/code&gt; (Earlier) or
2277 # &lt;code&gt;stable&lt;/code&gt; (Later). &lt;br /&gt;&lt;a
2278 # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"&gt;
2279 # Learn more&lt;/a&gt;.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002280 "day": 42, # day of week (1-7), starting on Monday.
2281 "hour": 42, # hour of day - 0 to 23.
2282 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002283 "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
2284 # for First Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002285 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002286 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google
2287 # apps domain is prefixed if applicable.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002288 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
Dan O'Mearadd494642020-05-01 07:42:23 -07002289 "kind": "A String", # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
2290 "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to
2291 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
2292 # case the master instance fails, the replica instance will be promoted as
2293 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
2294 # target, and the replica has to be in different zone with the master
2295 # instance.
2296 "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
2297 # master. Replication configuration information such as the username,
2298 # password, certificates, and keys are not stored in the instance metadata.
2299 # The configuration information is used only to set up the replication
2300 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
2301 # in the data directory.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002302 "username": "A String", # The username for the replication connection.
Dan O'Mearadd494642020-05-01 07:42:23 -07002303 "kind": "A String", # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
2304 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key
2305 # is encoded in the client's certificate.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002306 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
2307 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
Dan O'Mearadd494642020-05-01 07:42:23 -07002308 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002309 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
2310 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
Dan O'Mearadd494642020-05-01 07:42:23 -07002311 "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate
2312 # that it sends during the SSL handshake.
2313 "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave
2314 # instance is to be created. The URI is in the form gs:
2315 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
2316 # // Dumps should have the binlog co-ordinates from which replication should
2317 # // begin. This can be accomplished by setting --master-data to 1 when using
2318 # // mysqldump.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002319 "password": "A String", # The password for the replication connection.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002320 },
2321 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002322 "rootPassword": "A String", # Initial root password. Use only on creation.
Craig Citroe633be12015-03-02 13:40:36 -08002323 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -08002324 },
2325 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002326 "kind": "A String", # This is always &lt;code&gt;sql#instancesList&lt;/code&gt;.
2327 "warnings": [ # List of warnings that occurred while handling the request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002328 { # An Admin API warning message.
2329 "message": "A String", # The warning message.
2330 "code": "A String", # Code to uniquely identify the warning type.
2331 },
2332 ],
2333 }</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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002356 "kind": "A String", # This is always &lt;code&gt;sql#instancesListServerCas&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002357 "certs": [ # List of server CA certificates for the instance.
2358 { # SslCerts Resource
2359 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
Dan O'Mearadd494642020-05-01 07:42:23 -07002360 "kind": "A String", # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002361 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
Dan O'Mearadd494642020-05-01 07:42:23 -07002362 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002363 "instance": "A String", # Name of the database instance.
2364 "cert": "A String", # PEM representation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002365 "expirationTime": "A String", # The time when the certificate expires in &lt;a
2366 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
2367 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2368 "createTime": "A String", # The time when the certificate was created in &lt;a
2369 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
2370 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002371 "selfLink": "A String", # The URI of this resource.
2372 },
2373 ],
2374 "activeVersion": "A String",
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:
2387 A request object that you can call 'execute()' on to request the next
2388 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002404 "backendType": "A String", # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
2405 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
2406 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
2407 # managed by Google. &lt;br&gt;This property is read-only; use the
2408 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
2409 # the database type and Second or First Generation.
2410 "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been
2411 # deprecated. Users should use the
2412 # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud
2413 # Monitoring API instead. Please see &lt;a
2414 # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ"&gt;this
2415 # announcement&lt;/a&gt; for details.
2416 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property
2417 # is applicable only to Second Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002418 "ipAddresses": [ # The assigned IP addresses for the instance.
2419 { # Database instance IP Mapping.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002420 "ipAddress": "A String", # The IP address assigned.
Dan O'Mearadd494642020-05-01 07:42:23 -07002421 "type": "A String", # The type of this IP address. A &lt;code&gt;PRIMARY&lt;/code&gt; address is a public
2422 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
2423 # address is a private address that can accept incoming connections. An
2424 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
2425 # originating from the instance, if supported.
2426 "timeToRetire": "A String", # The due time for this IP to be retired in &lt;a
2427 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
2428 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
2429 # the IP is scheduled to be retired.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002430 },
2431 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002432 "databaseVersion": "A String", # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
2433 # field can not be changed after instance creation. MySQL Second Generation
2434 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
2435 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
2436 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
2437 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002438 "instanceType": "A String", # The instance type. This can be one of the following.
Dan O'Mearadd494642020-05-01 07:42:23 -07002439 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
2440 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
2441 # instance running on the
2442 # customer's premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
2443 # instance configured as a read-replica.
2444 "failoverReplica": { # The name and status of the failover replica. This property is applicable
2445 # only to Second Generation instances.
2446 "available": True or False, # The availability status of the failover replica. A false status indicates
2447 # that the failover replica is out of sync. The master can only failover to
2448 # the failover replica when the status is true.
2449 "name": "A String", # The name of the failover replica. If specified at instance creation, a
2450 # failover replica is created for the instance. The name
2451 # doesn't include the project ID. This property is applicable only to
2452 # Second Generation instances.
2453 },
2454 "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
2455 # Applies only to Second Generation instances.
2456 "kind": "A String", # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
2457 "kmsKeyName": "A String", # Resource name of KMS key for disk encryption
2458 },
2459 "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
2460 "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance.
2461 "canDefer": True or False,
2462 "canReschedule": True or False, # If the scheduled maintenance can be rescheduled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002463 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002464 "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension.
2465 "A String",
2466 ],
2467 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
Dan O'Mearadd494642020-05-01 07:42:23 -07002468 "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
2469 # Applies only to Second Generation instances.
2470 "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource
2471 "kind": "A String", # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002472 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002473 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the
2474 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
2475 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
2476 # available, for example due to problems with billing.
2477 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
2478 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
2479 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
2480 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
2481 "etag": "A String", # This field is deprecated and will be removed from a future version of the
2482 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
2483 "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This
2484 # value could be different from the zone that was specified when the instance
2485 # was created if the instance has failed over to its secondary zone.
2486 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002487 "replicaNames": [ # The replicas of the instance.
2488 "A String",
2489 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002490 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
Dan O'Mearadd494642020-05-01 07:42:23 -07002491 "username": "A String", # The username for connecting to on-premises instance.
2492 "kind": "A String", # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
2493 "password": "A String", # The password for connecting to on-premises instance.
2494 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
2495 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
2496 "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002497 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
Dan O'Mearadd494642020-05-01 07:42:23 -07002498 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key
2499 # is encoded in the client's certificate.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002500 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07002501 "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
Dan O'Mearadd494642020-05-01 07:42:23 -07002502 "kind": "A String", # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002503 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
Dan O'Mearadd494642020-05-01 07:42:23 -07002504 "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only
2505 # to First Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002506 "serverCaCert": { # SslCerts Resource # SSL configuration.
2507 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
Dan O'Mearadd494642020-05-01 07:42:23 -07002508 "kind": "A String", # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002509 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
Dan O'Mearadd494642020-05-01 07:42:23 -07002510 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002511 "instance": "A String", # Name of the database instance.
2512 "cert": "A String", # PEM representation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002513 "expirationTime": "A String", # The time when the certificate expires in &lt;a
2514 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
2515 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2516 "createTime": "A String", # The time when the certificate was created in &lt;a
2517 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
2518 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002519 "selfLink": "A String", # The URI of this resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002520 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002521 "region": "A String", # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
2522 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
2523 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
2524 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
2525 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
2526 # or Second Generation). The region can not be changed after instance
2527 # creation.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002528 "settings": { # Database instance settings. # The user settings.
2529 "databaseFlags": [ # The database flags passed to the instance at startup.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002530 { # Database flags for Cloud SQL instances.
Dan O'Mearadd494642020-05-01 07:42:23 -07002531 "name": "A String", # The name of the flag. These flags are passed at instance startup, so
2532 # include both server options and system variables for MySQL. Flags should be
2533 # specified with underscores, not hyphens. For more information, see &lt;a
2534 # href="/sql/docs/mysql/flags"&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
2535 # SQL documentation.
2536 "value": "A String", # The value of the flag. Booleans should be set to &lt;code&gt;on&lt;/code&gt; for true
2537 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
2538 # doesn't take a value.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002539 },
2540 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002541 "kind": "A String", # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
2542 "dataDiskType": "A String", # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
2543 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
2544 "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values:
2545 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
2546 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
2547 # The instance can serve data from more than one zone in a region (it is
2548 # highly available). &lt;br&gt;For more information, see &lt;a
2549 # href="https://cloud.google.com/sql/docs/postgres/high-availability"&gt;Overview
2550 # of the High Availability Configuration&lt;/a&gt;.
2551 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation
2552 # instances only.
2553 "A String",
2554 ],
2555 "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is
2556 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
2557 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
2558 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
2559 # off; it is not activated, even if a connection request arrives.
2560 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
2561 # responds to incoming requests, and turns itself off when not in use.
2562 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
2563 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
2564 # 12 hours of inactivity.
2565 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
2566 "kind": "A String", # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
2567 "replicationLogArchivingEnabled": True or False, # Reserved for future use.
2568 "enabled": True or False, # Whether this configuration is enabled.
2569 "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
2570 # disabled, binarylog must be disabled as well.
2571 "location": "A String", # Location of the backup
2572 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24
2573 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
2574 "pointInTimeRecoveryEnabled": True or False, # Reserved for future use.
2575 },
2576 "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
2577 # instance IP and manage which external networks can connect to the instance.
2578 # The IPv4 address cannot be disabled for Second Generation instances.
2579 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
2580 "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not.
2581 "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance
2582 # using the IP. In &lt;a
2583 # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation"&gt;CIDR
2584 # notation&lt;/a&gt;, also known as 'slash' notation (e.g.
2585 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
2586 { # An entry for an Access Control list.
2587 "kind": "A String", # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
2588 "expirationTime": "A String", # The time when this access control entry expires in &lt;a
2589 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
2590 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2591 "value": "A String", # The whitelisted value for the access control list.
2592 "name": "A String", # Optional. A label to identify this entry.
2593 },
2594 ],
2595 "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is
2596 # accessible for private IP. For example,
2597 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
2598 # be updated, but it cannot be removed after it is set.
2599 },
2600 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether
2601 # database flags for crash-safe replication are enabled. This property is
2602 # only applicable to First Generation instances.
2603 "userLabels": { # User-provided labels, represented as a dictionary where each label is a
2604 # single key value pair.
2605 "a_key": "A String",
2606 },
2607 "pricingPlan": "A String", # The pricing plan for this instance. This can be either &lt;code&gt;PER_USE&lt;/code&gt;
2608 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
2609 # Generation instances.
2610 "replicationType": "A String", # The type of replication this instance uses. This can be either
2611 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
2612 # only applicable to First Generation instances.
2613 "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as
2614 # near as possible to either an App Engine app or Compute Engine zone for
2615 # better performance. App Engine co-location is only applicable to First
2616 # Generation instances.
2617 # preferably be located, either in a specific Compute Engine zone, or
2618 # co-located with an App Engine application. Note that if the preferred
2619 # location is not available, the instance will be located as close as possible
2620 # within the region. Only one location may be specified.
2621 "kind": "A String", # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
2622 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the
2623 # Cloud SQL instance.
2624 "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
2625 # etc.).
2626 },
2627 "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased.
2628 # The default value is 0, which specifies that there is no limit. Not used
2629 # for First Generation instances.
2630 "tier": "A String", # The tier (or machine type) for this instance, for example
2631 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
2632 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
2633 # this property determines whether the instance is First or Second
2634 # Generation. For more information, see &lt;a
2635 # href="/sql/docs/db_path/instance-settings"&gt;Instance Settings&lt;/a&gt;.
2636 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether
2637 # replication is enabled or not.
2638 "settingsVersion": "A String", # The version of instance settings. This is a required field for update
2639 # method to make sure concurrent updates are handled properly. During update,
2640 # use the most recent settingsVersion value for this instance and do not try
2641 # to update this value.
2642 "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is
2643 # true. Not used for First Generation instances.
2644 "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance
2645 # can be restarted for maintenance purposes. Not used for First Generation
2646 # instances.
2647 # preferably be restarted for system maintenance purposes.
2648 "kind": "A String", # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
2649 "updateTrack": "A String", # Maintenance timing setting: &lt;code&gt;canary&lt;/code&gt; (Earlier) or
2650 # &lt;code&gt;stable&lt;/code&gt; (Later). &lt;br /&gt;&lt;a
2651 # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"&gt;
2652 # Learn more&lt;/a&gt;.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002653 "day": 42, # day of week (1-7), starting on Monday.
2654 "hour": 42, # hour of day - 0 to 23.
2655 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002656 "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
2657 # for First Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002658 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002659 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google
2660 # apps domain is prefixed if applicable.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002661 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
Dan O'Mearadd494642020-05-01 07:42:23 -07002662 "kind": "A String", # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
2663 "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to
2664 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
2665 # case the master instance fails, the replica instance will be promoted as
2666 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
2667 # target, and the replica has to be in different zone with the master
2668 # instance.
2669 "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
2670 # master. Replication configuration information such as the username,
2671 # password, certificates, and keys are not stored in the instance metadata.
2672 # The configuration information is used only to set up the replication
2673 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
2674 # in the data directory.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002675 "username": "A String", # The username for the replication connection.
Dan O'Mearadd494642020-05-01 07:42:23 -07002676 "kind": "A String", # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
2677 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key
2678 # is encoded in the client's certificate.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002679 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
2680 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
Dan O'Mearadd494642020-05-01 07:42:23 -07002681 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002682 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
2683 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
Dan O'Mearadd494642020-05-01 07:42:23 -07002684 "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate
2685 # that it sends during the SSL handshake.
2686 "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave
2687 # instance is to be created. The URI is in the form gs:
2688 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
2689 # // Dumps should have the binlog co-ordinates from which replication should
2690 # // begin. This can be accomplished by setting --master-data to 1 when using
2691 # // mysqldump.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002692 "password": "A String", # The password for the replication connection.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002693 },
2694 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002695 "rootPassword": "A String", # Initial root password. Use only on creation.
Craig Citroe633be12015-03-02 13:40:36 -08002696 "selfLink": "A String", # The URI of this resource.
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.
2710 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
2711 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
2712 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08002713 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07002714 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
2715 "encryptionOptions": {
2716 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
2717 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
2718 # write permissions to the bucket and read access to the file.
2719 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
2720 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
2721 # write permissions to the bucket and read access to the file.
2722 "pvkPassword": "A String", # Password that encrypts the private key
2723 },
2724 },
2725 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
2726 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
2727 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
2728 # specify a database, and is overridden by any database specification in the
2729 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
2730 # must be specified.
2731 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
2732 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
2733 "uri": "A String", # Path to the import file in Cloud Storage, in the form
2734 # &lt;code&gt;gs:
2735 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
2736 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
2737 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002738 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -08002739 "csvImportOptions": { # Options for importing data as CSV.
2740 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -07002741 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
2742 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08002743 "A String",
2744 ],
2745 },
2746 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002747 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
2748 "targetProject": "A String", # The project ID of the target instance related to this operation.
2749 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
2750 # identifier to retrieve the Operations resource that has information about
2751 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -08002752 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07002753 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
2754 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
2755 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
2756 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
2757 # stored. The URI is in the form &lt;code&gt;gs:
2758 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
2759 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
2760 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
2761 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -08002762 "csvExportOptions": { # Options for exporting data as CSV.
2763 "selectQuery": "A String", # The select query used to extract the data.
2764 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002765 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
2766 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
2767 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
2768 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
2769 # either by using this property or by using the
2770 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
2771 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
2772 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
2773 # this database must match the one specified in the
2774 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -08002775 "A String",
2776 ],
2777 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -07002778 "tables": [ # Tables to export, or that were exported, from the specified database. If
2779 # you specify tables, specify one and only one database. For PostgreSQL
2780 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -08002781 "A String",
2782 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002783 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -07002784 "masterData": 42, # Option to include SQL statement required to set up replication.
2785 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
2786 # a CHANGE MASTER TO statement with the binary log coordinates.
2787 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
2788 # a SQL comment, and has no effect.
2789 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002790 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002791 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08002792 },
2793 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002794 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
2795 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
2796 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08002797 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002798 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
2799 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
2800 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
2801 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
2802 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
2803 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
2804 "user": "A String", # The email address of the user who initiated this operation.
2805 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
2806 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
2807 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2808 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
2809 # populated.
2810 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08002811 "errors": [ # The list of errors encountered while processing this operation.
2812 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -07002813 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08002814 "code": "A String", # Identifies the specific error that occurred.
2815 "message": "A String", # Additional information about the error encountered.
2816 },
2817 ],
2818 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002819 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
2820 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
2821 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08002822 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07002823 "targetLink": "A String",
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.
2846 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
2847 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
2848 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08002849 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07002850 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
2851 "encryptionOptions": {
2852 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
2853 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
2854 # write permissions to the bucket and read access to the file.
2855 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
2856 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
2857 # write permissions to the bucket and read access to the file.
2858 "pvkPassword": "A String", # Password that encrypts the private key
2859 },
2860 },
2861 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
2862 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
2863 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
2864 # specify a database, and is overridden by any database specification in the
2865 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
2866 # must be specified.
2867 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
2868 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
2869 "uri": "A String", # Path to the import file in Cloud Storage, in the form
2870 # &lt;code&gt;gs:
2871 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
2872 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
2873 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002874 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -08002875 "csvImportOptions": { # Options for importing data as CSV.
2876 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -07002877 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
2878 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08002879 "A String",
2880 ],
2881 },
2882 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002883 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
2884 "targetProject": "A String", # The project ID of the target instance related to this operation.
2885 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
2886 # identifier to retrieve the Operations resource that has information about
2887 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -08002888 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07002889 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
2890 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
2891 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
2892 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
2893 # stored. The URI is in the form &lt;code&gt;gs:
2894 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
2895 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
2896 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
2897 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -08002898 "csvExportOptions": { # Options for exporting data as CSV.
2899 "selectQuery": "A String", # The select query used to extract the data.
2900 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002901 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
2902 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
2903 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
2904 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
2905 # either by using this property or by using the
2906 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
2907 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
2908 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
2909 # this database must match the one specified in the
2910 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -08002911 "A String",
2912 ],
2913 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -07002914 "tables": [ # Tables to export, or that were exported, from the specified database. If
2915 # you specify tables, specify one and only one database. For PostgreSQL
2916 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -08002917 "A String",
2918 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002919 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -07002920 "masterData": 42, # Option to include SQL statement required to set up replication.
2921 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
2922 # a CHANGE MASTER TO statement with the binary log coordinates.
2923 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
2924 # a SQL comment, and has no effect.
2925 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002926 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002927 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08002928 },
2929 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002930 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
2931 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
2932 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08002933 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002934 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
2935 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
2936 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
2937 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
2938 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
2939 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
2940 "user": "A String", # The email address of the user who initiated this operation.
2941 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
2942 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
2943 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
2944 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
2945 # populated.
2946 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08002947 "errors": [ # The list of errors encountered while processing this operation.
2948 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -07002949 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08002950 "code": "A String", # Identifies the specific error that occurred.
2951 "message": "A String", # Additional information about the error encountered.
2952 },
2953 ],
2954 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002955 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
2956 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
2957 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08002958 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07002959 "targetLink": "A String",
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.
2982 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
2983 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
2984 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08002985 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07002986 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
2987 "encryptionOptions": {
2988 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
2989 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
2990 # write permissions to the bucket and read access to the file.
2991 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
2992 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
2993 # write permissions to the bucket and read access to the file.
2994 "pvkPassword": "A String", # Password that encrypts the private key
2995 },
2996 },
2997 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
2998 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
2999 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3000 # specify a database, and is overridden by any database specification in the
3001 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3002 # must be specified.
3003 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3004 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3005 "uri": "A String", # Path to the import file in Cloud Storage, in the form
3006 # &lt;code&gt;gs:
3007 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3008 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3009 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003010 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -08003011 "csvImportOptions": { # Options for importing data as CSV.
3012 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -07003013 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
3014 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08003015 "A String",
3016 ],
3017 },
3018 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003019 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3020 "targetProject": "A String", # The project ID of the target instance related to this operation.
3021 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
3022 # identifier to retrieve the Operations resource that has information about
3023 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -08003024 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07003025 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3026 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3027 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3028 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
3029 # stored. The URI is in the form &lt;code&gt;gs:
3030 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3031 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3032 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3033 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -08003034 "csvExportOptions": { # Options for exporting data as CSV.
3035 "selectQuery": "A String", # The select query used to extract the data.
3036 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003037 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3038 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3039 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3040 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3041 # either by using this property or by using the
3042 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3043 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3044 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3045 # this database must match the one specified in the
3046 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -08003047 "A String",
3048 ],
3049 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -07003050 "tables": [ # Tables to export, or that were exported, from the specified database. If
3051 # you specify tables, specify one and only one database. For PostgreSQL
3052 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -08003053 "A String",
3054 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003055 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -07003056 "masterData": 42, # Option to include SQL statement required to set up replication.
3057 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3058 # a CHANGE MASTER TO statement with the binary log coordinates.
3059 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3060 # a SQL comment, and has no effect.
3061 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003062 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003063 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08003064 },
3065 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003066 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
3067 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3068 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003069 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003070 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3071 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3072 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3073 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3074 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3075 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3076 "user": "A String", # The email address of the user who initiated this operation.
3077 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
3078 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3079 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3080 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3081 # populated.
3082 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003083 "errors": [ # The list of errors encountered while processing this operation.
3084 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -07003085 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003086 "code": "A String", # Identifies the specific error that occurred.
3087 "message": "A String", # Additional information about the error encountered.
3088 },
3089 ],
3090 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003091 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
3092 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3093 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003094 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07003095 "targetLink": "A String",
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.
3117 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3118 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3119 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003120 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07003121 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
3122 "encryptionOptions": {
3123 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3124 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3125 # write permissions to the bucket and read access to the file.
3126 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
3127 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3128 # write permissions to the bucket and read access to the file.
3129 "pvkPassword": "A String", # Password that encrypts the private key
3130 },
3131 },
3132 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3133 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3134 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3135 # specify a database, and is overridden by any database specification in the
3136 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3137 # must be specified.
3138 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3139 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3140 "uri": "A String", # Path to the import file in Cloud Storage, in the form
3141 # &lt;code&gt;gs:
3142 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3143 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3144 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003145 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -08003146 "csvImportOptions": { # Options for importing data as CSV.
3147 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -07003148 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
3149 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08003150 "A String",
3151 ],
3152 },
3153 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003154 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3155 "targetProject": "A String", # The project ID of the target instance related to this operation.
3156 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
3157 # identifier to retrieve the Operations resource that has information about
3158 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -08003159 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07003160 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3161 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3162 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3163 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
3164 # stored. The URI is in the form &lt;code&gt;gs:
3165 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3166 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3167 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3168 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -08003169 "csvExportOptions": { # Options for exporting data as CSV.
3170 "selectQuery": "A String", # The select query used to extract the data.
3171 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003172 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3173 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3174 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3175 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3176 # either by using this property or by using the
3177 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3178 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3179 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3180 # this database must match the one specified in the
3181 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -08003182 "A String",
3183 ],
3184 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -07003185 "tables": [ # Tables to export, or that were exported, from the specified database. If
3186 # you specify tables, specify one and only one database. For PostgreSQL
3187 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -08003188 "A String",
3189 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003190 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -07003191 "masterData": 42, # Option to include SQL statement required to set up replication.
3192 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3193 # a CHANGE MASTER TO statement with the binary log coordinates.
3194 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3195 # a SQL comment, and has no effect.
3196 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003197 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003198 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08003199 },
3200 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003201 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
3202 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3203 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003204 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003205 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3206 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3207 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3208 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3209 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3210 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3211 "user": "A String", # The email address of the user who initiated this operation.
3212 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
3213 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3214 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3215 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3216 # populated.
3217 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003218 "errors": [ # The list of errors encountered while processing this operation.
3219 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -07003220 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003221 "code": "A String", # Identifies the specific error that occurred.
3222 "message": "A String", # Additional information about the error encountered.
3223 },
3224 ],
3225 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003226 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
3227 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3228 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003229 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07003230 "targetLink": "A String",
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.
3246 "restoreBackupContext": { # 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 Kim715bd7f2019-06-14 16:50:42 -07003248 "project": "A String", # The full project ID of the source instance.
Dan O'Mearadd494642020-05-01 07:42:23 -07003249 "instanceId": "A String", # The ID of the instance that the backup was taken from.
3250 "kind": "A String", # This is always &lt;code&gt;sql#restoreBackupContext&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003251 "backupRunId": "A String", # The ID of the backup run to restore from.
3252 },
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.
3266 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3267 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3268 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003269 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07003270 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
3271 "encryptionOptions": {
3272 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3273 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3274 # write permissions to the bucket and read access to the file.
3275 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
3276 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3277 # write permissions to the bucket and read access to the file.
3278 "pvkPassword": "A String", # Password that encrypts the private key
3279 },
3280 },
3281 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3282 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3283 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3284 # specify a database, and is overridden by any database specification in the
3285 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3286 # must be specified.
3287 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3288 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3289 "uri": "A String", # Path to the import file in Cloud Storage, in the form
3290 # &lt;code&gt;gs:
3291 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3292 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3293 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003294 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -08003295 "csvImportOptions": { # Options for importing data as CSV.
3296 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -07003297 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
3298 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08003299 "A String",
3300 ],
3301 },
3302 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003303 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3304 "targetProject": "A String", # The project ID of the target instance related to this operation.
3305 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
3306 # identifier to retrieve the Operations resource that has information about
3307 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -08003308 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07003309 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3310 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3311 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3312 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
3313 # stored. The URI is in the form &lt;code&gt;gs:
3314 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3315 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3316 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3317 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -08003318 "csvExportOptions": { # Options for exporting data as CSV.
3319 "selectQuery": "A String", # The select query used to extract the data.
3320 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003321 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3322 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3323 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3324 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3325 # either by using this property or by using the
3326 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3327 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3328 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3329 # this database must match the one specified in the
3330 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -08003331 "A String",
3332 ],
3333 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -07003334 "tables": [ # Tables to export, or that were exported, from the specified database. If
3335 # you specify tables, specify one and only one database. For PostgreSQL
3336 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -08003337 "A String",
3338 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003339 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -07003340 "masterData": 42, # Option to include SQL statement required to set up replication.
3341 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3342 # a CHANGE MASTER TO statement with the binary log coordinates.
3343 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3344 # a SQL comment, and has no effect.
3345 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003346 },
3347 "schemaOnly": True or False, # Export only schemas.
3348 },
3349 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003350 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
3351 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3352 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003353 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003354 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3355 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3356 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3357 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3358 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3359 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3360 "user": "A String", # The email address of the user who initiated this operation.
3361 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
3362 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3363 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3364 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3365 # populated.
3366 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003367 "errors": [ # The list of errors encountered while processing this operation.
3368 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -07003369 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003370 "code": "A String", # Identifies the specific error that occurred.
3371 "message": "A String", # Additional information about the error encountered.
3372 },
3373 ],
3374 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003375 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
3376 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3377 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003378 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07003379 "targetLink": "A String",
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.
3395 "rotateServerCaContext": { # Instance rotate server CA context. # Contains details about the rotate server CA operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003396 "kind": "A String", # This is always &lt;code&gt;sql#rotateServerCaContext&lt;/code&gt;.
3397 "nextVersion": "A String", # The fingerprint of the next version to be rotated to. If left unspecified,
3398 # 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.
3413 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3414 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3415 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003416 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07003417 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
3418 "encryptionOptions": {
3419 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3420 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3421 # write permissions to the bucket and read access to the file.
3422 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
3423 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3424 # write permissions to the bucket and read access to the file.
3425 "pvkPassword": "A String", # Password that encrypts the private key
3426 },
3427 },
3428 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3429 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3430 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3431 # specify a database, and is overridden by any database specification in the
3432 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3433 # must be specified.
3434 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3435 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3436 "uri": "A String", # Path to the import file in Cloud Storage, in the form
3437 # &lt;code&gt;gs:
3438 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3439 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3440 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003441 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
3442 "csvImportOptions": { # Options for importing data as CSV.
3443 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -07003444 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
3445 # of the database table are loaded with CSV data.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003446 "A String",
3447 ],
3448 },
3449 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003450 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3451 "targetProject": "A String", # The project ID of the target instance related to this operation.
3452 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
3453 # identifier to retrieve the Operations resource that has information about
3454 # the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003455 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07003456 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3457 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3458 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3459 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
3460 # stored. The URI is in the form &lt;code&gt;gs:
3461 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3462 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3463 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3464 # // compressed.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003465 "csvExportOptions": { # Options for exporting data as CSV.
3466 "selectQuery": "A String", # The select query used to extract the data.
3467 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003468 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3469 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3470 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3471 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3472 # either by using this property or by using the
3473 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3474 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3475 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3476 # this database must match the one specified in the
3477 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003478 "A String",
3479 ],
3480 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -07003481 "tables": [ # Tables to export, or that were exported, from the specified database. If
3482 # you specify tables, specify one and only one database. For PostgreSQL
3483 # instances, you can specify only one table.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003484 "A String",
3485 ],
3486 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -07003487 "masterData": 42, # Option to include SQL statement required to set up replication.
3488 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3489 # a CHANGE MASTER TO statement with the binary log coordinates.
3490 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3491 # a SQL comment, and has no effect.
3492 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003493 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003494 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08003495 },
3496 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003497 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
3498 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3499 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003500 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003501 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3502 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3503 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3504 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3505 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3506 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3507 "user": "A String", # The email address of the user who initiated this operation.
3508 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
3509 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3510 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3511 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3512 # populated.
3513 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003514 "errors": [ # The list of errors encountered while processing this operation.
3515 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -07003516 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003517 "code": "A String", # Identifies the specific error that occurred.
3518 "message": "A String", # Additional information about the error encountered.
3519 },
3520 ],
3521 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003522 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
3523 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3524 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003525 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07003526 "targetLink": "A String",
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.
3548 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3549 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3550 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003551 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07003552 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
3553 "encryptionOptions": {
3554 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3555 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3556 # write permissions to the bucket and read access to the file.
3557 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
3558 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3559 # write permissions to the bucket and read access to the file.
3560 "pvkPassword": "A String", # Password that encrypts the private key
3561 },
3562 },
3563 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3564 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3565 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3566 # specify a database, and is overridden by any database specification in the
3567 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3568 # must be specified.
3569 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3570 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3571 "uri": "A String", # Path to the import file in Cloud Storage, in the form
3572 # &lt;code&gt;gs:
3573 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3574 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3575 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003576 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -08003577 "csvImportOptions": { # Options for importing data as CSV.
3578 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -07003579 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
3580 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08003581 "A String",
3582 ],
3583 },
3584 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003585 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3586 "targetProject": "A String", # The project ID of the target instance related to this operation.
3587 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
3588 # identifier to retrieve the Operations resource that has information about
3589 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -08003590 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07003591 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3592 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3593 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3594 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
3595 # stored. The URI is in the form &lt;code&gt;gs:
3596 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3597 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3598 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3599 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -08003600 "csvExportOptions": { # Options for exporting data as CSV.
3601 "selectQuery": "A String", # The select query used to extract the data.
3602 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003603 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3604 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3605 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3606 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3607 # either by using this property or by using the
3608 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3609 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3610 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3611 # this database must match the one specified in the
3612 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -08003613 "A String",
3614 ],
3615 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -07003616 "tables": [ # Tables to export, or that were exported, from the specified database. If
3617 # you specify tables, specify one and only one database. For PostgreSQL
3618 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -08003619 "A String",
3620 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003621 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -07003622 "masterData": 42, # Option to include SQL statement required to set up replication.
3623 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3624 # a CHANGE MASTER TO statement with the binary log coordinates.
3625 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3626 # a SQL comment, and has no effect.
3627 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003628 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003629 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08003630 },
3631 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003632 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
3633 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3634 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003635 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003636 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3637 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3638 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3639 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3640 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3641 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3642 "user": "A String", # The email address of the user who initiated this operation.
3643 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
3644 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3645 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3646 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3647 # populated.
3648 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003649 "errors": [ # The list of errors encountered while processing this operation.
3650 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -07003651 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003652 "code": "A String", # Identifies the specific error that occurred.
3653 "message": "A String", # Additional information about the error encountered.
3654 },
3655 ],
3656 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003657 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
3658 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3659 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003660 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07003661 "targetLink": "A String",
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.
3683 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3684 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3685 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003686 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07003687 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
3688 "encryptionOptions": {
3689 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3690 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3691 # write permissions to the bucket and read access to the file.
3692 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
3693 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3694 # write permissions to the bucket and read access to the file.
3695 "pvkPassword": "A String", # Password that encrypts the private key
3696 },
3697 },
3698 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3699 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3700 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3701 # specify a database, and is overridden by any database specification in the
3702 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3703 # must be specified.
3704 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3705 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3706 "uri": "A String", # Path to the import file in Cloud Storage, in the form
3707 # &lt;code&gt;gs:
3708 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3709 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3710 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003711 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -08003712 "csvImportOptions": { # Options for importing data as CSV.
3713 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -07003714 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
3715 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08003716 "A String",
3717 ],
3718 },
3719 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003720 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3721 "targetProject": "A String", # The project ID of the target instance related to this operation.
3722 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
3723 # identifier to retrieve the Operations resource that has information about
3724 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -08003725 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07003726 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3727 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3728 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3729 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
3730 # stored. The URI is in the form &lt;code&gt;gs:
3731 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3732 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3733 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3734 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -08003735 "csvExportOptions": { # Options for exporting data as CSV.
3736 "selectQuery": "A String", # The select query used to extract the data.
3737 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003738 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3739 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3740 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3741 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3742 # either by using this property or by using the
3743 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3744 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3745 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3746 # this database must match the one specified in the
3747 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -08003748 "A String",
3749 ],
3750 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -07003751 "tables": [ # Tables to export, or that were exported, from the specified database. If
3752 # you specify tables, specify one and only one database. For PostgreSQL
3753 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -08003754 "A String",
3755 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003756 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -07003757 "masterData": 42, # Option to include SQL statement required to set up replication.
3758 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3759 # a CHANGE MASTER TO statement with the binary log coordinates.
3760 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3761 # a SQL comment, and has no effect.
3762 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003763 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003764 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08003765 },
3766 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003767 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
3768 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3769 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003770 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003771 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3772 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3773 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3774 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3775 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3776 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3777 "user": "A String", # The email address of the user who initiated this operation.
3778 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
3779 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3780 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3781 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3782 # populated.
3783 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003784 "errors": [ # The list of errors encountered while processing this operation.
3785 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -07003786 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003787 "code": "A String", # Identifies the specific error that occurred.
3788 "message": "A String", # Additional information about the error encountered.
3789 },
3790 ],
3791 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003792 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
3793 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3794 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08003795 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07003796 "targetLink": "A String",
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.
3811 "truncateLogContext": { # Database Instance truncate log context. # Contains details about the truncate log operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003812 "logType": "A String", # The type of log to truncate. Valid values are
3813 # &lt;code&gt;MYSQL_GENERAL_TABLE&lt;/code&gt; and &lt;code&gt;MYSQL_SLOW_TABLE&lt;/code&gt;.
3814 "kind": "A String", # 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.
3829 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
3830 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
3831 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003832 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07003833 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
3834 "encryptionOptions": {
3835 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
3836 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3837 # write permissions to the bucket and read access to the file.
3838 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
3839 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
3840 # write permissions to the bucket and read access to the file.
3841 "pvkPassword": "A String", # Password that encrypts the private key
3842 },
3843 },
3844 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
3845 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
3846 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
3847 # specify a database, and is overridden by any database specification in the
3848 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
3849 # must be specified.
3850 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3851 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3852 "uri": "A String", # Path to the import file in Cloud Storage, in the form
3853 # &lt;code&gt;gs:
3854 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
3855 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
3856 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003857 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003858 "csvImportOptions": { # Options for importing data as CSV.
3859 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -07003860 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
3861 # of the database table are loaded with CSV data.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003862 "A String",
3863 ],
3864 },
3865 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003866 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
3867 "targetProject": "A String", # The project ID of the target instance related to this operation.
3868 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
3869 # identifier to retrieve the Operations resource that has information about
3870 # the operation.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003871 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07003872 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
3873 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
3874 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
3875 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
3876 # stored. The URI is in the form &lt;code&gt;gs:
3877 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
3878 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
3879 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
3880 # // compressed.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003881 "csvExportOptions": { # Options for exporting data as CSV.
3882 "selectQuery": "A String", # The select query used to extract the data.
3883 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003884 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
3885 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
3886 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
3887 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
3888 # either by using this property or by using the
3889 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
3890 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
3891 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
3892 # this database must match the one specified in the
3893 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003894 "A String",
3895 ],
3896 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -07003897 "tables": [ # Tables to export, or that were exported, from the specified database. If
3898 # you specify tables, specify one and only one database. For PostgreSQL
3899 # instances, you can specify only one table.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003900 "A String",
3901 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003902 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -07003903 "masterData": 42, # Option to include SQL statement required to set up replication.
3904 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
3905 # a CHANGE MASTER TO statement with the binary log coordinates.
3906 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
3907 # a SQL comment, and has no effect.
3908 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003909 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003910 "schemaOnly": True or False, # Export only schemas.
3911 },
3912 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003913 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
3914 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3915 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003916 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003917 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
3918 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
3919 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
3920 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
3921 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
3922 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
3923 "user": "A String", # The email address of the user who initiated this operation.
3924 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
3925 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3926 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
3927 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
3928 # populated.
3929 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003930 "errors": [ # The list of errors encountered while processing this operation.
3931 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -07003932 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003933 "code": "A String", # Identifies the specific error that occurred.
3934 "message": "A String", # Additional information about the error encountered.
3935 },
3936 ],
3937 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003938 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
3939 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3940 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003941 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07003942 "targetLink": "A String",
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.
Dan O'Mearadd494642020-05-01 07:42:23 -07003958 "backendType": "A String", # &lt;code&gt;FIRST_GEN&lt;/code&gt;: First Generation instance. MySQL only. &lt;br
3959 # /&gt;&lt;code&gt;SECOND_GEN&lt;/code&gt;: Second Generation instance or PostgreSQL
3960 # instance. &lt;br /&gt;&lt;code&gt;EXTERNAL&lt;/code&gt;: A database server that is not
3961 # managed by Google. &lt;br&gt;This property is read-only; use the
3962 # &lt;code&gt;tier&lt;/code&gt; property in the &lt;code&gt;settings&lt;/code&gt; object to determine
3963 # the database type and Second or First Generation.
3964 "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been
3965 # deprecated. Users should use the
3966 # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud
3967 # Monitoring API instead. Please see &lt;a
3968 # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ"&gt;this
3969 # announcement&lt;/a&gt; for details.
3970 "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property
3971 # is applicable only to Second Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003972 "ipAddresses": [ # The assigned IP addresses for the instance.
3973 { # Database instance IP Mapping.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003974 "ipAddress": "A String", # The IP address assigned.
Dan O'Mearadd494642020-05-01 07:42:23 -07003975 "type": "A String", # The type of this IP address. A &lt;code&gt;PRIMARY&lt;/code&gt; address is a public
3976 # address that can accept incoming connections. A &lt;code&gt;PRIVATE&lt;/code&gt;
3977 # address is a private address that can accept incoming connections. An
3978 # &lt;code&gt;OUTGOING&lt;/code&gt; address is the source address of connections
3979 # originating from the instance, if supported.
3980 "timeToRetire": "A String", # The due time for this IP to be retired in &lt;a
3981 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
3982 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;. This field is only available when
3983 # the IP is scheduled to be retired.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003984 },
3985 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003986 "databaseVersion": "A String", # The database engine type and version. The &lt;code&gt;databaseVersion&lt;/code&gt;
3987 # field can not be changed after instance creation. MySQL Second Generation
3988 # instances: &lt;code&gt;MYSQL_5_7&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_6&lt;/code&gt;.
3989 # PostgreSQL instances: &lt;code&gt;POSTGRES_9_6&lt;/code&gt; (default) or
3990 # &lt;code&gt;POSTGRES_11 Beta&lt;/code&gt; MySQL First Generation
3991 # instances: &lt;code&gt;MYSQL_5_6&lt;/code&gt; (default) or &lt;code&gt;MYSQL_5_5&lt;/code&gt;
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003992 "instanceType": "A String", # The instance type. This can be one of the following.
Dan O'Mearadd494642020-05-01 07:42:23 -07003993 # &lt;br&gt;&lt;code&gt;CLOUD_SQL_INSTANCE&lt;/code&gt;: A Cloud SQL instance that is not
3994 # replicating from a master. &lt;br&gt;&lt;code&gt;ON_PREMISES_INSTANCE&lt;/code&gt;: An
3995 # instance running on the
3996 # customer's premises. &lt;br&gt;&lt;code&gt;READ_REPLICA_INSTANCE&lt;/code&gt;: A Cloud SQL
3997 # instance configured as a read-replica.
3998 "failoverReplica": { # The name and status of the failover replica. This property is applicable
3999 # only to Second Generation instances.
4000 "available": True or False, # The availability status of the failover replica. A false status indicates
4001 # that the failover replica is out of sync. The master can only failover to
4002 # the failover replica when the status is true.
4003 "name": "A String", # The name of the failover replica. If specified at instance creation, a
4004 # failover replica is created for the instance. The name
4005 # doesn't include the project ID. This property is applicable only to
4006 # Second Generation instances.
4007 },
4008 "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance.
4009 # Applies only to Second Generation instances.
4010 "kind": "A String", # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
4011 "kmsKeyName": "A String", # Resource name of KMS key for disk encryption
4012 },
4013 "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
4014 "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance.
4015 "canDefer": True or False,
4016 "canReschedule": True or False, # If the scheduled maintenance can be rescheduled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004017 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004018 "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension.
4019 "A String",
4020 ],
4021 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
Dan O'Mearadd494642020-05-01 07:42:23 -07004022 "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance.
4023 # Applies only to Second Generation instances.
4024 "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource
4025 "kind": "A String", # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004026 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004027 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the
4028 # following. &lt;br&gt;&lt;code&gt;RUNNABLE&lt;/code&gt;: The instance is running, or is ready
4029 # to run when accessed. &lt;br&gt;&lt;code&gt;SUSPENDED&lt;/code&gt;: The instance is not
4030 # available, for example due to problems with billing.
4031 # &lt;br&gt;&lt;code&gt;PENDING_CREATE&lt;/code&gt;: The instance is being created.
4032 # &lt;br&gt;&lt;code&gt;MAINTENANCE&lt;/code&gt;: The instance is down for maintenance.
4033 # &lt;br&gt;&lt;code&gt;FAILED&lt;/code&gt;: The instance creation failed.
4034 # &lt;br&gt;&lt;code&gt;UNKNOWN_STATE&lt;/code&gt;: The state of the instance is unknown.
4035 "etag": "A String", # This field is deprecated and will be removed from a future version of the
4036 # API. Use the &lt;code&gt;settings.settingsVersion&lt;/code&gt; field instead.
4037 "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This
4038 # value could be different from the zone that was specified when the instance
4039 # was created if the instance has failed over to its secondary zone.
4040 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004041 "replicaNames": [ # The replicas of the instance.
4042 "A String",
4043 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004044 "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances.
Dan O'Mearadd494642020-05-01 07:42:23 -07004045 "username": "A String", # The username for connecting to on-premises instance.
4046 "kind": "A String", # This is always &lt;code&gt;sql#onPremisesConfiguration&lt;/code&gt;.
4047 "password": "A String", # The password for connecting to on-premises instance.
4048 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
4049 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
4050 "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004051 "hostPort": "A String", # The host and port of the on-premises instance in host:port format
Dan O'Mearadd494642020-05-01 07:42:23 -07004052 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key
4053 # is encoded in the client's certificate.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004054 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07004055 "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
Dan O'Mearadd494642020-05-01 07:42:23 -07004056 "kind": "A String", # This is always &lt;code&gt;sql#instance&lt;/code&gt;.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004057 "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
Dan O'Mearadd494642020-05-01 07:42:23 -07004058 "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only
4059 # to First Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004060 "serverCaCert": { # SslCerts Resource # SSL configuration.
4061 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
Dan O'Mearadd494642020-05-01 07:42:23 -07004062 "kind": "A String", # This is always &lt;code&gt;sql#sslCert&lt;/code&gt;.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004063 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
Dan O'Mearadd494642020-05-01 07:42:23 -07004064 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004065 "instance": "A String", # Name of the database instance.
4066 "cert": "A String", # PEM representation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004067 "expirationTime": "A String", # The time when the certificate expires in &lt;a
4068 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
4069 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
4070 "createTime": "A String", # The time when the certificate was created in &lt;a
4071 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
4072 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004073 "selfLink": "A String", # The URI of this resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004074 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004075 "region": "A String", # The geographical region. Can be &lt;code&gt;us-central&lt;/code&gt;
4076 # (&lt;code&gt;FIRST_GEN&lt;/code&gt; instances only), &lt;code&gt;us-central1&lt;/code&gt;
4077 # (&lt;code&gt;SECOND_GEN&lt;/code&gt; instances only), &lt;code&gt;asia-east1&lt;/code&gt; or
4078 # &lt;code&gt;europe-west1&lt;/code&gt;. Defaults to &lt;code&gt;us-central&lt;/code&gt; or
4079 # &lt;code&gt;us-central1&lt;/code&gt; depending on the instance type (First Generation
4080 # or Second Generation). The region can not be changed after instance
4081 # creation.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004082 "settings": { # Database instance settings. # The user settings.
4083 "databaseFlags": [ # The database flags passed to the instance at startup.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004084 { # Database flags for Cloud SQL instances.
Dan O'Mearadd494642020-05-01 07:42:23 -07004085 "name": "A String", # The name of the flag. These flags are passed at instance startup, so
4086 # include both server options and system variables for MySQL. Flags should be
4087 # specified with underscores, not hyphens. For more information, see &lt;a
4088 # href="/sql/docs/mysql/flags"&gt;Configuring Database Flags&lt;/a&gt; in the Cloud
4089 # SQL documentation.
4090 "value": "A String", # The value of the flag. Booleans should be set to &lt;code&gt;on&lt;/code&gt; for true
4091 # and &lt;code&gt;off&lt;/code&gt; for false. This field must be omitted if the flag
4092 # doesn't take a value.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004093 },
4094 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004095 "kind": "A String", # This is always &lt;code&gt;sql#settings&lt;/code&gt;.
4096 "dataDiskType": "A String", # The type of data disk: &lt;code&gt;PD_SSD&lt;/code&gt; (default) or
4097 # &lt;code&gt;PD_HDD&lt;/code&gt;. Not used for First Generation instances.
4098 "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values:
4099 # &lt;br&gt;&lt;code&gt;ZONAL&lt;/code&gt;: The instance serves data from only one zone.
4100 # Outages in that zone affect data accessibility. &lt;br&gt;&lt;code&gt;REGIONAL&lt;/code&gt;:
4101 # The instance can serve data from more than one zone in a region (it is
4102 # highly available). &lt;br&gt;For more information, see &lt;a
4103 # href="https://cloud.google.com/sql/docs/postgres/high-availability"&gt;Overview
4104 # of the High Availability Configuration&lt;/a&gt;.
4105 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation
4106 # instances only.
4107 "A String",
4108 ],
4109 "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is
4110 # applicable only when the instance state is &lt;code&gt;RUNNABLE&lt;/code&gt;. Valid
4111 # values: &lt;br&gt;&lt;code&gt;ALWAYS&lt;/code&gt;: The instance is on, and remains so even in
4112 # the absence of connection requests. &lt;br&gt;&lt;code&gt;NEVER&lt;/code&gt;: The instance is
4113 # off; it is not activated, even if a connection request arrives.
4114 # &lt;br&gt;&lt;code&gt;ON_DEMAND&lt;/code&gt;: First Generation instances only. The instance
4115 # responds to incoming requests, and turns itself off when not in use.
4116 # Instances with &lt;code&gt;PER_USE&lt;/code&gt; pricing turn off after 15 minutes of
4117 # inactivity. Instances with &lt;code&gt;PER_PACKAGE&lt;/code&gt; pricing turn off after
4118 # 12 hours of inactivity.
4119 "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance.
4120 "kind": "A String", # This is always &lt;code&gt;sql#backupConfiguration&lt;/code&gt;.
4121 "replicationLogArchivingEnabled": True or False, # Reserved for future use.
4122 "enabled": True or False, # Whether this configuration is enabled.
4123 "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is
4124 # disabled, binarylog must be disabled as well.
4125 "location": "A String", # Location of the backup
4126 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24
4127 # hour format - &lt;code&gt;HH:MM&lt;/code&gt;.
4128 "pointInTimeRecoveryEnabled": True or False, # Reserved for future use.
4129 },
4130 "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the
4131 # instance IP and manage which external networks can connect to the instance.
4132 # The IPv4 address cannot be disabled for Second Generation instances.
4133 "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not.
4134 "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not.
4135 "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance
4136 # using the IP. In &lt;a
4137 # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation"&gt;CIDR
4138 # notation&lt;/a&gt;, also known as 'slash' notation (e.g.
4139 # &lt;code&gt;192.168.100.0/24&lt;/code&gt;).
4140 { # An entry for an Access Control list.
4141 "kind": "A String", # This is always &lt;code&gt;sql#aclEntry&lt;/code&gt;.
4142 "expirationTime": "A String", # The time when this access control entry expires in &lt;a
4143 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
4144 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
4145 "value": "A String", # The whitelisted value for the access control list.
4146 "name": "A String", # Optional. A label to identify this entry.
4147 },
4148 ],
4149 "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is
4150 # accessible for private IP. For example,
4151 # &lt;code&gt;/projects/myProject/global/networks/default&lt;/code&gt;. This setting can
4152 # be updated, but it cannot be removed after it is set.
4153 },
4154 "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether
4155 # database flags for crash-safe replication are enabled. This property is
4156 # only applicable to First Generation instances.
4157 "userLabels": { # User-provided labels, represented as a dictionary where each label is a
4158 # single key value pair.
4159 "a_key": "A String",
4160 },
4161 "pricingPlan": "A String", # The pricing plan for this instance. This can be either &lt;code&gt;PER_USE&lt;/code&gt;
4162 # or &lt;code&gt;PACKAGE&lt;/code&gt;. Only &lt;code&gt;PER_USE&lt;/code&gt; is supported for Second
4163 # Generation instances.
4164 "replicationType": "A String", # The type of replication this instance uses. This can be either
4165 # &lt;code&gt;ASYNCHRONOUS&lt;/code&gt; or &lt;code&gt;SYNCHRONOUS&lt;/code&gt;. This property is
4166 # only applicable to First Generation instances.
4167 "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as
4168 # near as possible to either an App Engine app or Compute Engine zone for
4169 # better performance. App Engine co-location is only applicable to First
4170 # Generation instances.
4171 # preferably be located, either in a specific Compute Engine zone, or
4172 # co-located with an App Engine application. Note that if the preferred
4173 # location is not available, the instance will be located as close as possible
4174 # within the region. Only one location may be specified.
4175 "kind": "A String", # This is always &lt;code&gt;sql#locationPreference&lt;/code&gt;.
4176 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the
4177 # Cloud SQL instance.
4178 "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b,
4179 # etc.).
4180 },
4181 "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased.
4182 # The default value is 0, which specifies that there is no limit. Not used
4183 # for First Generation instances.
4184 "tier": "A String", # The tier (or machine type) for this instance, for example
4185 # &lt;code&gt;db-n1-standard-1&lt;/code&gt; (MySQL instances) or
4186 # &lt;code&gt;db-custom-1-3840&lt;/code&gt; (PostgreSQL instances). For MySQL instances,
4187 # this property determines whether the instance is First or Second
4188 # Generation. For more information, see &lt;a
4189 # href="/sql/docs/db_path/instance-settings"&gt;Instance Settings&lt;/a&gt;.
4190 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether
4191 # replication is enabled or not.
4192 "settingsVersion": "A String", # The version of instance settings. This is a required field for update
4193 # method to make sure concurrent updates are handled properly. During update,
4194 # use the most recent settingsVersion value for this instance and do not try
4195 # to update this value.
4196 "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is
4197 # true. Not used for First Generation instances.
4198 "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance
4199 # can be restarted for maintenance purposes. Not used for First Generation
4200 # instances.
4201 # preferably be restarted for system maintenance purposes.
4202 "kind": "A String", # This is always &lt;code&gt;sql#maintenanceWindow&lt;/code&gt;.
4203 "updateTrack": "A String", # Maintenance timing setting: &lt;code&gt;canary&lt;/code&gt; (Earlier) or
4204 # &lt;code&gt;stable&lt;/code&gt; (Later). &lt;br /&gt;&lt;a
4205 # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"&gt;
4206 # Learn more&lt;/a&gt;.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004207 "day": 42, # day of week (1-7), starting on Monday.
4208 "hour": 42, # hour of day - 0 to 23.
4209 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004210 "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used
4211 # for First Generation instances.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004212 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004213 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google
4214 # apps domain is prefixed if applicable.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004215 "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas.
Dan O'Mearadd494642020-05-01 07:42:23 -07004216 "kind": "A String", # This is always &lt;code&gt;sql#replicaConfiguration&lt;/code&gt;.
4217 "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to
4218 # &lt;code&gt;true&lt;/code&gt; the replica will be designated as a failover replica. In
4219 # case the master instance fails, the replica instance will be promoted as
4220 # the new master instance. &lt;p&gt;Only one replica can be specified as failover
4221 # target, and the replica has to be in different zone with the master
4222 # instance.
4223 "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises
4224 # master. Replication configuration information such as the username,
4225 # password, certificates, and keys are not stored in the instance metadata.
4226 # The configuration information is used only to set up the replication
4227 # connection and is stored by MySQL in a file named &lt;code&gt;master.info&lt;/code&gt;
4228 # in the data directory.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004229 "username": "A String", # The username for the replication connection.
Dan O'Mearadd494642020-05-01 07:42:23 -07004230 "kind": "A String", # This is always &lt;code&gt;sql#mysqlReplicaConfiguration&lt;/code&gt;.
4231 "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key
4232 # is encoded in the client's certificate.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004233 "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption.
4234 "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate.
Dan O'Mearadd494642020-05-01 07:42:23 -07004235 "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004236 "clientCertificate": "A String", # PEM representation of the slave's x509 certificate.
4237 "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats.
Dan O'Mearadd494642020-05-01 07:42:23 -07004238 "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate
4239 # that it sends during the SSL handshake.
4240 "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave
4241 # instance is to be created. The URI is in the form gs:
4242 # //bucketName/fileName. Compressed gzip files (.gz) are also supported.
4243 # // Dumps should have the binlog co-ordinates from which replication should
4244 # // begin. This can be accomplished by setting --master-data to 1 when using
4245 # // mysqldump.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004246 "password": "A String", # The password for the replication connection.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004247 },
4248 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004249 "rootPassword": "A String", # Initial root password. Use only on creation.
Craig Citroe633be12015-03-02 13:40:36 -08004250 "selfLink": "A String", # The URI of this resource.
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.
4264 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
4265 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
4266 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08004267 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07004268 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
4269 "encryptionOptions": {
4270 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
4271 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
4272 # write permissions to the bucket and read access to the file.
4273 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
4274 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
4275 # write permissions to the bucket and read access to the file.
4276 "pvkPassword": "A String", # Password that encrypts the private key
4277 },
4278 },
4279 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
4280 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
4281 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
4282 # specify a database, and is overridden by any database specification in the
4283 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
4284 # must be specified.
4285 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
4286 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
4287 "uri": "A String", # Path to the import file in Cloud Storage, in the form
4288 # &lt;code&gt;gs:
4289 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
4290 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
4291 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004292 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -08004293 "csvImportOptions": { # Options for importing data as CSV.
4294 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -07004295 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
4296 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -08004297 "A String",
4298 ],
4299 },
4300 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004301 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
4302 "targetProject": "A String", # The project ID of the target instance related to this operation.
4303 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
4304 # identifier to retrieve the Operations resource that has information about
4305 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -08004306 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -07004307 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
4308 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
4309 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
4310 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
4311 # stored. The URI is in the form &lt;code&gt;gs:
4312 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
4313 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
4314 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
4315 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -08004316 "csvExportOptions": { # Options for exporting data as CSV.
4317 "selectQuery": "A String", # The select query used to extract the data.
4318 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004319 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
4320 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
4321 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
4322 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
4323 # either by using this property or by using the
4324 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
4325 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
4326 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
4327 # this database must match the one specified in the
4328 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -08004329 "A String",
4330 ],
4331 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -07004332 "tables": [ # Tables to export, or that were exported, from the specified database. If
4333 # you specify tables, specify one and only one database. For PostgreSQL
4334 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -08004335 "A String",
4336 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004337 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -07004338 "masterData": 42, # Option to include SQL statement required to set up replication.
4339 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
4340 # a CHANGE MASTER TO statement with the binary log coordinates.
4341 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
4342 # a SQL comment, and has no effect.
4343 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004344 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004345 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -08004346 },
4347 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004348 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
4349 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
4350 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08004351 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004352 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
4353 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
4354 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
4355 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
4356 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
4357 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
4358 "user": "A String", # The email address of the user who initiated this operation.
4359 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
4360 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
4361 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
4362 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
4363 # populated.
4364 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08004365 "errors": [ # The list of errors encountered while processing this operation.
4366 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -07004367 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08004368 "code": "A String", # Identifies the specific error that occurred.
4369 "message": "A String", # Additional information about the error encountered.
4370 },
4371 ],
4372 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004373 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
4374 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
4375 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -08004376 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07004377 "targetLink": "A String",
Craig Citroe633be12015-03-02 13:40:36 -08004378 }</pre>
4379</div>
4380
4381</body></html>