blob: 1a939c9f1234a2ad742d15211035eab3e9ea04cb [file] [log] [blame]
Craig Citroe633be12015-03-02 13:40:36 -08001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="sqladmin_v1beta4.html">Cloud SQL Admin API</a> . <a href="sqladmin_v1beta4.instances.html">instances</a></h1>
Craig Citroe633be12015-03-02 13:40:36 -080076<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#addServerCa">addServerCa(project, instance, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070079<p class="firstline">Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070080<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#clone">clone(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070082<p class="firstline">Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.</p>
83<p class="toc_element">
84 <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
Craig Citroe633be12015-03-02 13:40:36 -080086<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#delete">delete(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080088<p class="firstline">Deletes a Cloud SQL instance.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070091<p class="firstline">Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#export">export(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070094<p class="firstline">Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.</p>
Craig Citroe633be12015-03-02 13:40:36 -080095<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#failover">failover(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070097<p class="firstline">Failover the instance to its failover replica instance. Using this operation might cause your instance to restart.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080098<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#get">get(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800100<p class="firstline">Retrieves a resource containing information about a Cloud SQL instance.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#import_">import_(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103<p class="firstline">Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#insert">insert(project, body=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800106<p class="firstline">Creates a new Cloud SQL instance.</p>
107<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700108 <code><a href="#list">list(project, maxResults=None, filter=None, pageToken=None, x__xgafv=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700109<p class="firstline">Lists instances under a given project.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#listServerCas">listServerCas(project, instance, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700112<p class="firstline">Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700113<p class="toc_element">
Craig Citroe633be12015-03-02 13:40:36 -0800114 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
115<p class="firstline">Retrieves the next page of results.</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#patch">patch(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700118<p class="firstline">Updates settings of a Cloud SQL instance. This method supports patch semantics.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800119<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code><a href="#promoteReplica">promoteReplica(project, instance, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700121<p class="firstline">Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800122<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700123 <code><a href="#resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700124<p class="firstline">Deletes all client certificates and generates a new server SSL certificate for the instance.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800125<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700126 <code><a href="#restart">restart(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800127<p class="firstline">Restarts a Cloud SQL instance.</p>
128<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700129 <code><a href="#restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700130<p class="firstline">Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800131<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700132 <code><a href="#rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700133<p class="firstline">Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700134<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 <code><a href="#startReplica">startReplica(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800136<p class="firstline">Starts the replication in the read replica instance.</p>
137<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700138 <code><a href="#stopReplica">stopReplica(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800139<p class="firstline">Stops the replication in the read replica instance.</p>
140<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 <code><a href="#truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800142<p class="firstline">Truncate MySQL general and slow query log tables</p>
143<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700144 <code><a href="#update">update(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700145<p class="firstline">Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800146<h3>Method Details</h3>
147<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700148 <code class="details" id="addServerCa">addServerCa(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700149 <pre>Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in.
Craig Citroe633be12015-03-02 13:40:36 -0800150
151Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700152 project: string, Project ID of the project that contains the instance. (required)
153 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700154 x__xgafv: string, V1 error format.
155 Allowed values
156 1 - v1 error format
157 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800158
159Returns:
160 An object of the form:
161
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700162 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
163 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
164 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
165 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
166 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700167 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
168 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700169 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700170 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700171 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700172 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700173 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700174 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700175 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700176 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
177 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
178 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700179 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700180 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
181 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
182 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700183 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
184 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
185 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
186 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700187 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800188 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700189 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -0700190 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700191 &quot;schemaOnly&quot;: True or False, # Export only schemas.
192 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700193 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800194 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700195 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700196 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700197 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700198 },
199 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700200 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700201 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
202 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
203 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700204 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700205 &quot;targetLink&quot;: &quot;A String&quot;,
206 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
207 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
208 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
209 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
210 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
211 &quot;A String&quot;,
212 ],
213 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
214 },
215 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
216 &quot;encryptionOptions&quot;: {
217 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
218 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
219 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
220 },
221 },
222 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
223 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
224 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
225 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700226 }</pre>
227</div>
228
229<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700230 <code class="details" id="clone">clone(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700231 <pre>Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700232
233Args:
234 project: string, Project ID of the source as well as the clone Cloud SQL instance. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700235 instance: string, The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700236 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700237 The object takes the form of:
238
239{ # Database instance clone request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700240 &quot;cloneContext&quot;: { # Database instance clone context. # Contains details about the clone operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700241 &quot;destinationInstanceName&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance to be created as a clone.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700242 &quot;binLogCoordinates&quot;: { # Binary log coordinates. # Binary log coordinates, if specified, identify the position up to which the source instance is cloned. If not specified, the source instance is cloned up to the most recent binary log coordinates.
243 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#binLogCoordinates*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700244 &quot;binLogFileName&quot;: &quot;A String&quot;, # Name of the binary log file for a Cloud SQL instance.
245 &quot;binLogPosition&quot;: &quot;A String&quot;, # Position (offset) within the binary log file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700246 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700247 &quot;pitrTimestampMs&quot;: &quot;A String&quot;, # Reserved for future use.
248 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#cloneContext*.
249 &quot;pointInTime&quot;: &quot;A String&quot;, # Reserved for future use.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700250 },
251 }
252
Dan O'Mearadd494642020-05-01 07:42:23 -0700253 x__xgafv: string, V1 error format.
254 Allowed values
255 1 - v1 error format
256 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700257
258Returns:
259 An object of the form:
260
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700261 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
262 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
263 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
264 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
265 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700266 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
267 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700268 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700269 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700270 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700271 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700272 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700273 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700274 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700275 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
276 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
277 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700278 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700279 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
280 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
281 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700282 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
283 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
284 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
285 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700286 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700287 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700288 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -0700289 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700290 &quot;schemaOnly&quot;: True or False, # Export only schemas.
291 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700292 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700293 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700294 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700295 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700296 },
Craig Citroe633be12015-03-02 13:40:36 -0800297 },
298 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700299 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700300 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
301 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
302 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700303 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700304 &quot;targetLink&quot;: &quot;A String&quot;,
305 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
306 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
307 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
308 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
309 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
310 &quot;A String&quot;,
311 ],
312 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
313 },
314 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
315 &quot;encryptionOptions&quot;: {
316 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
317 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
318 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
319 },
320 },
321 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
322 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
323 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
324 },
Craig Citroe633be12015-03-02 13:40:36 -0800325 }</pre>
326</div>
327
328<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700329 <code class="details" id="close">close()</code>
330 <pre>Close httplib2 connections.</pre>
331</div>
332
333<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700334 <code class="details" id="delete">delete(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800335 <pre>Deletes a Cloud SQL instance.
336
337Args:
338 project: string, Project ID of the project that contains the instance to be deleted. (required)
339 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700340 x__xgafv: string, V1 error format.
341 Allowed values
342 1 - v1 error format
343 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800344
345Returns:
346 An object of the form:
347
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700348 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
349 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
350 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
351 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
352 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700353 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
354 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700355 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700356 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700357 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700358 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700359 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700360 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700361 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700362 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
363 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
364 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700365 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700366 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
367 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
368 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700369 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
370 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
371 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
372 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700373 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800374 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700375 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -0700376 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700377 &quot;schemaOnly&quot;: True or False, # Export only schemas.
378 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700379 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800380 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700381 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700382 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700383 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700384 },
385 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700386 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700387 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
388 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
389 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700390 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700391 &quot;targetLink&quot;: &quot;A String&quot;,
392 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
393 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
394 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
395 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
396 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
397 &quot;A String&quot;,
398 ],
399 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
400 },
401 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
402 &quot;encryptionOptions&quot;: {
403 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
404 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
405 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
406 },
407 },
408 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
409 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
410 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
411 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700412 }</pre>
413</div>
414
415<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700416 <code class="details" id="demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700417 <pre>Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700418
419Args:
420 project: string, ID of the project that contains the instance. (required)
421 instance: string, Cloud SQL instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700422 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700423 The object takes the form of:
424
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700425{ # Database demote primary instance request.
426 &quot;demoteMasterContext&quot;: { # Database instance demote primary instance context. # Contains details about the demoteMaster operation.
427 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as on-premises primary instance in the replication setup.
428 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#demoteMasterContext*.
429 &quot;verifyGtidConsistency&quot;: True or False, # Verify GTID consistency for demote operation. Default value: *True*. Second Generation instances only. Setting this flag to false enables you to bypass GTID consistency check between on-premises primary instance and Cloud SQL instance during the demotion operation but also exposes you to the risk of future replication failures. Change the value only if you know the reason for the GTID divergence and are confident that doing so will not cause any replication issues.
430 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the on-premises primary instance. # Configuration specific to read-replicas replicating from the on-premises primary instance.
431 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#demoteMasterConfiguration*.
432 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory.
433 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
434 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate. The format of the replica&#x27;s private key can be either PKCS #1 or PKCS #8.
Bu Sun Kim65020912020-05-20 12:08:20 -0700435 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
436 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700437 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
438 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#demoteMasterMysqlReplicaConfiguration*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700439 },
440 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700441 },
442 }
443
Dan O'Mearadd494642020-05-01 07:42:23 -0700444 x__xgafv: string, V1 error format.
445 Allowed values
446 1 - v1 error format
447 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700448
449Returns:
450 An object of the form:
451
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700452 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
453 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
454 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
455 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
456 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700457 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
458 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700459 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700460 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700461 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700462 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700463 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700464 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700465 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700466 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
467 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
468 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700469 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700470 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
471 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
472 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700473 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
474 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
475 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
476 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700477 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700478 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700479 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -0700480 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700481 &quot;schemaOnly&quot;: True or False, # Export only schemas.
482 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700483 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700484 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700485 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700486 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700487 },
Craig Citroe633be12015-03-02 13:40:36 -0800488 },
489 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700490 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700491 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
492 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
493 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700494 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700495 &quot;targetLink&quot;: &quot;A String&quot;,
496 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
497 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
498 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
499 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
500 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
501 &quot;A String&quot;,
502 ],
503 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
504 },
505 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
506 &quot;encryptionOptions&quot;: {
507 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
508 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
509 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
510 },
511 },
512 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
513 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
514 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
515 },
Craig Citroe633be12015-03-02 13:40:36 -0800516 }</pre>
517</div>
518
519<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700520 <code class="details" id="export">export(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700521 <pre>Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.
Craig Citroe633be12015-03-02 13:40:36 -0800522
523Args:
524 project: string, Project ID of the project that contains the instance to be exported. (required)
525 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700526 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800527 The object takes the form of:
528
529{ # Database instance export request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700530 &quot;exportContext&quot;: { # Database instance export context. # Contains details about the export operation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700531 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
532 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
533 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700534 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
535 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
536 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
537 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700538 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800539 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700540 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -0700541 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700542 &quot;schemaOnly&quot;: True or False, # Export only schemas.
543 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700544 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800545 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700546 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700547 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700548 },
Craig Citroe633be12015-03-02 13:40:36 -0800549 },
550 },
551 }
552
Dan O'Mearadd494642020-05-01 07:42:23 -0700553 x__xgafv: string, V1 error format.
554 Allowed values
555 1 - v1 error format
556 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800557
558Returns:
559 An object of the form:
560
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700561 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
562 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
563 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
564 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
565 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700566 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
567 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700568 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700569 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700570 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700571 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700572 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700573 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700574 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700575 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
576 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
577 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700578 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700579 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
580 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
581 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700582 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
583 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
584 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
585 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700586 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800587 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700588 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -0700589 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700590 &quot;schemaOnly&quot;: True or False, # Export only schemas.
591 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700592 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800593 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700594 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700595 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700596 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800597 },
598 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700599 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700600 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
601 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
602 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700603 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700604 &quot;targetLink&quot;: &quot;A String&quot;,
605 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
606 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
607 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
608 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
609 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
610 &quot;A String&quot;,
611 ],
612 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
613 },
614 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
615 &quot;encryptionOptions&quot;: {
616 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
617 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
618 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
619 },
620 },
621 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
622 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
623 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
624 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800625 }</pre>
626</div>
627
628<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700629 <code class="details" id="failover">failover(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700630 <pre>Failover the instance to its failover replica instance. Using this operation might cause your instance to restart.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800631
632Args:
633 project: string, ID of the project that contains the read replica. (required)
634 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700635 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800636 The object takes the form of:
637
638{ # Instance failover request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700639 &quot;failoverContext&quot;: { # Database instance failover context. # Failover Context.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700640 &quot;settingsVersion&quot;: &quot;A String&quot;, # The current settings version of this instance. Request will be rejected if this version doesn&#x27;t match the current settings version.
641 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#failoverContext*.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800642 },
643 }
644
Dan O'Mearadd494642020-05-01 07:42:23 -0700645 x__xgafv: string, V1 error format.
646 Allowed values
647 1 - v1 error format
648 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800649
650Returns:
651 An object of the form:
652
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700653 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
654 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
655 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
656 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
657 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700658 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
659 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700660 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700661 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700662 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700663 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700664 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700665 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700666 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700667 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
668 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
669 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700670 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700671 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
672 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
673 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700674 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
675 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
676 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
677 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700678 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800679 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700680 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -0700681 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700682 &quot;schemaOnly&quot;: True or False, # Export only schemas.
683 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700684 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800685 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700686 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700687 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700688 },
Craig Citroe633be12015-03-02 13:40:36 -0800689 },
690 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700691 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700692 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
693 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
694 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700695 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700696 &quot;targetLink&quot;: &quot;A String&quot;,
697 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
698 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
699 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
700 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
701 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
702 &quot;A String&quot;,
703 ],
704 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
705 },
706 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
707 &quot;encryptionOptions&quot;: {
708 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
709 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
710 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
711 },
712 },
713 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
714 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
715 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
716 },
Craig Citroe633be12015-03-02 13:40:36 -0800717 }</pre>
718</div>
719
720<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700721 <code class="details" id="get">get(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800722 <pre>Retrieves a resource containing information about a Cloud SQL instance.
723
724Args:
725 project: string, Project ID of the project that contains the instance. (required)
726 instance: string, Database instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700727 x__xgafv: string, V1 error format.
728 Allowed values
729 1 - v1 error format
730 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800731
732Returns:
733 An object of the form:
734
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700735 { # A Cloud SQL instance resource. Next field: 36
736 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
737 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation.
738 &quot;settings&quot;: { # Database instance settings. # The user settings.
739 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances).
740 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
741 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
742 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700743 &quot;A String&quot;,
744 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700745 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances.
746 &quot;activeDirectoryConfig&quot;: { # Active Directory configuration, for now relevant only for SQL Server # Active Directory configuration, for now relevant only for SQL Server
747 &quot;domain&quot;: &quot;A String&quot;, # Domain name
748 &quot;kind&quot;: &quot;A String&quot;, # This will be always sql#activeDirectoryConfig.
749 },
750 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.
751 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.
752 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
753 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
754 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
755 },
756 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
757 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
758 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
759 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
760 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set.
761 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance using the IP. In &#x27;CIDR&#x27; notation, also known as &#x27;slash&#x27; notation (for example: *192.168.100.0/24*).
762 { # An entry for an Access Control list.
763 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
764 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
765 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
766 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700767 },
768 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700769 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700770 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700771 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
772 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
773 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
774 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
775 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
776 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
777 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
778 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700779 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700780 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
781 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
782 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
783 { # Database flags for Cloud SQL instances.
784 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn&#x27;t take a value.
785 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700786 },
787 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700788 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes.
789 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
790 &quot;hour&quot;: 42, # hour of day - 0 to 23.
791 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
792 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
793 },
794 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
795 &quot;a_key&quot;: &quot;A String&quot;,
796 },
797 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
798 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration.
799 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
800 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives.
801 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances.
802 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
803 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
804 &quot;startDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
805 &quot;time&quot;: &quot;A String&quot;, # Time in UTC when the &quot;deny maintenance period&quot; starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00
806 &quot;endDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
807 },
808 ],
809 },
810 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
811 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
812 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.
813 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
814 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
815 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
816 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
817 },
818 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been deprecated. Use the &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud Monitoring API instead. Please see this announcement for details.
819 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
820 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn&#x27;t include the project ID. This property is applicable only to Second Generation instances.
821 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true.
822 },
823 &quot;replicaNames&quot;: [ # The replicas of the instance.
824 &quot;A String&quot;,
825 ],
826 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
827 &quot;A String&quot;,
828 ],
829 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
830 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the following. *RUNNABLE*: The instance is running, or is ready to run when accessed. *SUSPENDED*: The instance is not available, for example due to problems with billing. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed. *UNKNOWN_STATE*: The state of the instance is unknown.
831 &quot;backendType&quot;: &quot;A String&quot;, # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type.
832 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
833 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
834 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
835 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
836 },
837 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
838 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
839 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
840 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
841 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
842 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
843 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
844 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
845 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
846 },
847 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
848 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance.
849 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory.
850 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the primary instance&#x27;s Common Name value in the certificate that it sends during the SSL handshake.
851 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
852 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
853 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
854 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
855 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
856 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
857 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
858 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump.
859 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
860 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
861 },
862 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
863 },
864 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
865 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
Bu Sun Kim65020912020-05-20 12:08:20 -0700866 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700867 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
868 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
869 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*
870 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
871 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
872 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
873 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
874 },
875 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead.
876 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
877 { # Database instance IP Mapping.
878 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
879 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired.
880 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported.
Bu Sun Kim65020912020-05-20 12:08:20 -0700881 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700882 ],
883 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
884 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
885 &quot;canDefer&quot;: True or False,
886 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
887 },
888 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer&#x27;s premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica.
889 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
890 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
891 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
892 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone.
893 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
894 }</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800895</div>
896
897<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700898 <code class="details" id="import_">import_(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700899 <pre>Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.
Craig Citroe633be12015-03-02 13:40:36 -0800900
901Args:
902 project: string, Project ID of the project that contains the instance. (required)
903 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700904 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800905 The object takes the form of:
906
907{ # Database instance import request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700908 &quot;importContext&quot;: { # Database instance import context. # Contains details about the import operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700909 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
910 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700911 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700912 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700913 &quot;A String&quot;,
914 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700915 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700916 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700917 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
918 &quot;encryptionOptions&quot;: {
919 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
920 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
921 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
922 },
923 },
924 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
925 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
926 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -0800927 },
928 }
929
Dan O'Mearadd494642020-05-01 07:42:23 -0700930 x__xgafv: string, V1 error format.
931 Allowed values
932 1 - v1 error format
933 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800934
935Returns:
936 An object of the form:
937
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700938 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
939 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
940 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
941 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
942 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700943 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
944 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700945 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700946 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700947 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700948 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700949 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700950 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700951 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700952 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
953 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
954 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700955 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700956 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
957 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
958 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700959 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
960 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
961 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
962 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700963 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800964 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700965 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -0700966 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700967 &quot;schemaOnly&quot;: True or False, # Export only schemas.
968 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700969 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800970 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700971 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700972 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700973 },
Craig Citroe633be12015-03-02 13:40:36 -0800974 },
975 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700976 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700977 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
978 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
979 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700980 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700981 &quot;targetLink&quot;: &quot;A String&quot;,
982 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
983 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
984 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
985 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
986 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
987 &quot;A String&quot;,
988 ],
989 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
990 },
991 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
992 &quot;encryptionOptions&quot;: {
993 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
994 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
995 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
996 },
997 },
998 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
999 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
1000 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1001 },
Craig Citroe633be12015-03-02 13:40:36 -08001002 }</pre>
1003</div>
1004
1005<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001006 <code class="details" id="insert">insert(project, body=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08001007 <pre>Creates a new Cloud SQL instance.
1008
1009Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001010 project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001011 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08001012 The object takes the form of:
1013
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001014{ # A Cloud SQL instance resource. Next field: 36
1015 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
1016 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation.
1017 &quot;settings&quot;: { # Database instance settings. # The user settings.
1018 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances).
1019 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
1020 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
1021 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
Bu Sun Kim65020912020-05-20 12:08:20 -07001022 &quot;A String&quot;,
1023 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001024 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances.
1025 &quot;activeDirectoryConfig&quot;: { # Active Directory configuration, for now relevant only for SQL Server # Active Directory configuration, for now relevant only for SQL Server
1026 &quot;domain&quot;: &quot;A String&quot;, # Domain name
1027 &quot;kind&quot;: &quot;A String&quot;, # This will be always sql#activeDirectoryConfig.
1028 },
1029 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.
1030 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.
1031 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
1032 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1033 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
1034 },
1035 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1036 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
1037 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
1038 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1039 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set.
1040 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance using the IP. In &#x27;CIDR&#x27; notation, also known as &#x27;slash&#x27; notation (for example: *192.168.100.0/24*).
1041 { # An entry for an Access Control list.
1042 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1043 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1044 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1045 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001046 },
1047 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001048 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001049 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001050 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1051 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1052 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
1053 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1054 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
1055 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1056 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1057 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001058 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001059 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
1060 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1061 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1062 { # Database flags for Cloud SQL instances.
1063 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn&#x27;t take a value.
1064 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001065 },
1066 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001067 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes.
1068 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
1069 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1070 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
1071 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1072 },
1073 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1074 &quot;a_key&quot;: &quot;A String&quot;,
1075 },
1076 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1077 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration.
1078 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1079 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives.
1080 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances.
1081 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1082 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1083 &quot;startDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1084 &quot;time&quot;: &quot;A String&quot;, # Time in UTC when the &quot;deny maintenance period&quot; starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00
1085 &quot;endDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1086 },
1087 ],
1088 },
1089 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1090 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
1091 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.
1092 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1093 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
1094 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
1095 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1096 },
1097 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been deprecated. Use the &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud Monitoring API instead. Please see this announcement for details.
1098 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
1099 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn&#x27;t include the project ID. This property is applicable only to Second Generation instances.
1100 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true.
1101 },
1102 &quot;replicaNames&quot;: [ # The replicas of the instance.
1103 &quot;A String&quot;,
1104 ],
1105 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1106 &quot;A String&quot;,
1107 ],
1108 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
1109 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the following. *RUNNABLE*: The instance is running, or is ready to run when accessed. *SUSPENDED*: The instance is not available, for example due to problems with billing. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed. *UNKNOWN_STATE*: The state of the instance is unknown.
1110 &quot;backendType&quot;: &quot;A String&quot;, # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type.
1111 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1112 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
1113 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
1114 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1115 },
1116 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1117 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1118 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1119 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1120 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1121 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1122 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
1123 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1124 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1125 },
1126 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1127 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance.
1128 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory.
1129 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the primary instance&#x27;s Common Name value in the certificate that it sends during the SSL handshake.
1130 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1131 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1132 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1133 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1134 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
1135 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1136 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1137 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump.
1138 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
1139 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1140 },
1141 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1142 },
1143 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1144 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
Bu Sun Kim65020912020-05-20 12:08:20 -07001145 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001146 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1147 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1148 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*
1149 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1150 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1151 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1152 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1153 },
1154 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead.
1155 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1156 { # Database instance IP Mapping.
1157 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1158 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired.
1159 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported.
Bu Sun Kim65020912020-05-20 12:08:20 -07001160 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001161 ],
1162 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1163 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1164 &quot;canDefer&quot;: True or False,
1165 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1166 },
1167 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer&#x27;s premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica.
1168 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1169 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1170 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
1171 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone.
1172 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1173}
Craig Citroe633be12015-03-02 13:40:36 -08001174
Dan O'Mearadd494642020-05-01 07:42:23 -07001175 x__xgafv: string, V1 error format.
1176 Allowed values
1177 1 - v1 error format
1178 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001179
1180Returns:
1181 An object of the form:
1182
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001183 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
1184 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1185 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1186 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1187 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -07001188 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1189 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -07001190 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001191 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001192 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07001193 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001194 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001195 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001196 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001197 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1198 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1199 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001200 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001201 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
1202 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1203 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001204 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
1205 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1206 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
1207 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
Bu Sun Kim65020912020-05-20 12:08:20 -07001208 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08001209 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001210 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -07001211 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001212 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1213 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07001214 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08001215 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001216 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001217 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001218 },
Craig Citroe633be12015-03-02 13:40:36 -08001219 },
1220 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001221 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001222 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1223 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1224 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001225 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001226 &quot;targetLink&quot;: &quot;A String&quot;,
1227 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1228 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
1229 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
1230 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1231 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1232 &quot;A String&quot;,
1233 ],
1234 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1235 },
1236 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1237 &quot;encryptionOptions&quot;: {
1238 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
1239 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
1240 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1241 },
1242 },
1243 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
1244 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
1245 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1246 },
Craig Citroe633be12015-03-02 13:40:36 -08001247 }</pre>
1248</div>
1249
1250<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001251 <code class="details" id="list">list(project, maxResults=None, filter=None, pageToken=None, x__xgafv=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -07001252 <pre>Lists instances under a given project.
Craig Citroe633be12015-03-02 13:40:36 -08001253
1254Args:
1255 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001256 maxResults: integer, The maximum number of results to return per response.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001257 filter: string, A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, &#x27;instanceType:CLOUD_SQL_INSTANCE&#x27;. Fields can be nested as needed as per their JSON representation, such as &#x27;settings.userLabels.auto_start:true&#x27;. Multiple filter queries are space-separated. For example. &#x27;state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE&#x27;. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly.
1258 pageToken: string, A previously-returned page token representing part of the larger set of results to view.
Dan O'Mearadd494642020-05-01 07:42:23 -07001259 x__xgafv: string, V1 error format.
1260 Allowed values
1261 1 - v1 error format
1262 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001263
1264Returns:
1265 An object of the form:
1266
1267 { # Database instances list response.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001268 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instancesList*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001269 &quot;items&quot;: [ # List of database instance resources.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001270 { # A Cloud SQL instance resource. Next field: 36
1271 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
1272 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation.
1273 &quot;settings&quot;: { # Database instance settings. # The user settings.
1274 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances).
1275 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
1276 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
1277 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
Bu Sun Kim65020912020-05-20 12:08:20 -07001278 &quot;A String&quot;,
1279 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001280 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances.
1281 &quot;activeDirectoryConfig&quot;: { # Active Directory configuration, for now relevant only for SQL Server # Active Directory configuration, for now relevant only for SQL Server
1282 &quot;domain&quot;: &quot;A String&quot;, # Domain name
1283 &quot;kind&quot;: &quot;A String&quot;, # This will be always sql#activeDirectoryConfig.
1284 },
1285 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.
1286 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.
1287 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
1288 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1289 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
1290 },
1291 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1292 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
1293 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
1294 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1295 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set.
1296 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance using the IP. In &#x27;CIDR&#x27; notation, also known as &#x27;slash&#x27; notation (for example: *192.168.100.0/24*).
1297 { # An entry for an Access Control list.
1298 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1299 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1300 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1301 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001302 },
1303 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001304 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001305 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001306 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1307 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1308 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
1309 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1310 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
1311 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1312 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1313 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001314 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001315 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
1316 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1317 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1318 { # Database flags for Cloud SQL instances.
1319 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn&#x27;t take a value.
1320 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001321 },
1322 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001323 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes.
1324 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
1325 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1326 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
1327 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
Bu Sun Kim65020912020-05-20 12:08:20 -07001328 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001329 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1330 &quot;a_key&quot;: &quot;A String&quot;,
1331 },
1332 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1333 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration.
1334 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1335 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives.
1336 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances.
1337 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1338 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1339 &quot;startDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1340 &quot;time&quot;: &quot;A String&quot;, # Time in UTC when the &quot;deny maintenance period&quot; starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00
1341 &quot;endDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1342 },
1343 ],
Craig Citroe633be12015-03-02 13:40:36 -08001344 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001345 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1346 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
1347 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.
1348 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1349 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
1350 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
1351 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1352 },
1353 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been deprecated. Use the &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud Monitoring API instead. Please see this announcement for details.
1354 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
1355 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn&#x27;t include the project ID. This property is applicable only to Second Generation instances.
1356 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true.
1357 },
1358 &quot;replicaNames&quot;: [ # The replicas of the instance.
1359 &quot;A String&quot;,
1360 ],
1361 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1362 &quot;A String&quot;,
1363 ],
1364 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
1365 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the following. *RUNNABLE*: The instance is running, or is ready to run when accessed. *SUSPENDED*: The instance is not available, for example due to problems with billing. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed. *UNKNOWN_STATE*: The state of the instance is unknown.
1366 &quot;backendType&quot;: &quot;A String&quot;, # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type.
1367 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1368 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
1369 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
1370 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1371 },
1372 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1373 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1374 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1375 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1376 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1377 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1378 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
1379 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1380 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1381 },
1382 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1383 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance.
1384 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory.
1385 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the primary instance&#x27;s Common Name value in the certificate that it sends during the SSL handshake.
1386 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1387 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1388 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1389 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1390 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
1391 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1392 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1393 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump.
1394 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
1395 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1396 },
1397 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1398 },
1399 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1400 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1401 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1402 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1403 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1404 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*
1405 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1406 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1407 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1408 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1409 },
1410 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead.
1411 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1412 { # Database instance IP Mapping.
1413 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1414 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired.
1415 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported.
1416 },
1417 ],
1418 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1419 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1420 &quot;canDefer&quot;: True or False,
1421 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1422 },
1423 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer&#x27;s premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica.
1424 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1425 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1426 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
1427 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone.
1428 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1429 },
Craig Citroe633be12015-03-02 13:40:36 -08001430 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001431 &quot;warnings&quot;: [ # List of warnings that occurred while handling the request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001432 { # An Admin API warning message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001433 &quot;message&quot;: &quot;A String&quot;, # The warning message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001434 &quot;code&quot;: &quot;A String&quot;, # Code to uniquely identify the warning type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001435 },
1436 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001437 &quot;nextPageToken&quot;: &quot;A String&quot;, # The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001438 }</pre>
1439</div>
1440
1441<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001442 <code class="details" id="listServerCas">listServerCas(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001443 <pre>Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001444
1445Args:
1446 project: string, Project ID of the project that contains the instance. (required)
1447 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001448 x__xgafv: string, V1 error format.
1449 Allowed values
1450 1 - v1 error format
1451 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001452
1453Returns:
1454 An object of the form:
1455
1456 { # Instances ListServerCas response.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001457 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instancesListServerCas*.
1458 &quot;activeVersion&quot;: &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -07001459 &quot;certs&quot;: [ # List of server CA certificates for the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001460 { # SslCerts Resource
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001461 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
Bu Sun Kim65020912020-05-20 12:08:20 -07001462 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001463 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1464 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1465 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*
1466 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1467 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1468 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1469 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001470 },
1471 ],
Craig Citroe633be12015-03-02 13:40:36 -08001472 }</pre>
1473</div>
1474
1475<div class="method">
1476 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1477 <pre>Retrieves the next page of results.
1478
1479Args:
1480 previous_request: The request for the previous page. (required)
1481 previous_response: The response from the request for the previous page. (required)
1482
1483Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001484 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citroe633be12015-03-02 13:40:36 -08001485 page. Returns None if there are no more items in the collection.
1486 </pre>
1487</div>
1488
1489<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001490 <code class="details" id="patch">patch(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001491 <pre>Updates settings of a Cloud SQL instance. This method supports patch semantics.
Craig Citroe633be12015-03-02 13:40:36 -08001492
1493Args:
1494 project: string, Project ID of the project that contains the instance. (required)
1495 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001496 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08001497 The object takes the form of:
1498
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001499{ # A Cloud SQL instance resource. Next field: 36
1500 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
1501 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation.
1502 &quot;settings&quot;: { # Database instance settings. # The user settings.
1503 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances).
1504 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
1505 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
1506 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
Bu Sun Kim65020912020-05-20 12:08:20 -07001507 &quot;A String&quot;,
1508 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001509 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances.
1510 &quot;activeDirectoryConfig&quot;: { # Active Directory configuration, for now relevant only for SQL Server # Active Directory configuration, for now relevant only for SQL Server
1511 &quot;domain&quot;: &quot;A String&quot;, # Domain name
1512 &quot;kind&quot;: &quot;A String&quot;, # This will be always sql#activeDirectoryConfig.
1513 },
1514 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.
1515 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.
1516 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
1517 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1518 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
1519 },
1520 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1521 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
1522 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
1523 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1524 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set.
1525 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance using the IP. In &#x27;CIDR&#x27; notation, also known as &#x27;slash&#x27; notation (for example: *192.168.100.0/24*).
1526 { # An entry for an Access Control list.
1527 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1528 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1529 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1530 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001531 },
1532 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001533 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001534 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001535 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1536 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1537 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
1538 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1539 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
1540 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1541 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1542 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001543 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001544 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
1545 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1546 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1547 { # Database flags for Cloud SQL instances.
1548 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn&#x27;t take a value.
1549 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001550 },
1551 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001552 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes.
1553 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
1554 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1555 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
1556 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1557 },
1558 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1559 &quot;a_key&quot;: &quot;A String&quot;,
1560 },
1561 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1562 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration.
1563 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1564 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives.
1565 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances.
1566 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1567 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1568 &quot;startDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1569 &quot;time&quot;: &quot;A String&quot;, # Time in UTC when the &quot;deny maintenance period&quot; starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00
1570 &quot;endDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1571 },
1572 ],
1573 },
1574 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1575 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
1576 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.
1577 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1578 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
1579 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
1580 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1581 },
1582 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been deprecated. Use the &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud Monitoring API instead. Please see this announcement for details.
1583 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
1584 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn&#x27;t include the project ID. This property is applicable only to Second Generation instances.
1585 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true.
1586 },
1587 &quot;replicaNames&quot;: [ # The replicas of the instance.
1588 &quot;A String&quot;,
1589 ],
1590 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1591 &quot;A String&quot;,
1592 ],
1593 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
1594 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the following. *RUNNABLE*: The instance is running, or is ready to run when accessed. *SUSPENDED*: The instance is not available, for example due to problems with billing. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed. *UNKNOWN_STATE*: The state of the instance is unknown.
1595 &quot;backendType&quot;: &quot;A String&quot;, # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type.
1596 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1597 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
1598 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
1599 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1600 },
1601 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1602 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1603 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1604 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1605 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1606 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1607 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
1608 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1609 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1610 },
1611 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1612 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance.
1613 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory.
1614 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the primary instance&#x27;s Common Name value in the certificate that it sends during the SSL handshake.
1615 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1616 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1617 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1618 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1619 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
1620 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1621 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1622 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump.
1623 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
1624 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1625 },
1626 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1627 },
1628 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1629 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
Bu Sun Kim65020912020-05-20 12:08:20 -07001630 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001631 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1632 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1633 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*
1634 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1635 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1636 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1637 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1638 },
1639 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead.
1640 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1641 { # Database instance IP Mapping.
1642 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1643 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired.
1644 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported.
Bu Sun Kim65020912020-05-20 12:08:20 -07001645 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001646 ],
1647 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1648 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1649 &quot;canDefer&quot;: True or False,
1650 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1651 },
1652 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer&#x27;s premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica.
1653 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1654 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1655 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
1656 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone.
1657 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1658}
Craig Citroe633be12015-03-02 13:40:36 -08001659
Dan O'Mearadd494642020-05-01 07:42:23 -07001660 x__xgafv: string, V1 error format.
1661 Allowed values
1662 1 - v1 error format
1663 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001664
1665Returns:
1666 An object of the form:
1667
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001668 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
1669 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1670 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1671 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1672 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -07001673 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1674 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -07001675 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001676 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001677 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07001678 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001679 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001680 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001681 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001682 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1683 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1684 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001685 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001686 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
1687 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1688 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001689 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
1690 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1691 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
1692 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
Bu Sun Kim65020912020-05-20 12:08:20 -07001693 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08001694 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001695 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -07001696 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001697 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1698 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07001699 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08001700 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001701 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001702 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001703 },
Craig Citroe633be12015-03-02 13:40:36 -08001704 },
1705 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001706 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001707 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1708 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1709 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001710 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001711 &quot;targetLink&quot;: &quot;A String&quot;,
1712 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1713 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
1714 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
1715 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1716 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1717 &quot;A String&quot;,
1718 ],
1719 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1720 },
1721 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1722 &quot;encryptionOptions&quot;: {
1723 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
1724 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
1725 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1726 },
1727 },
1728 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
1729 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
1730 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1731 },
Craig Citroe633be12015-03-02 13:40:36 -08001732 }</pre>
1733</div>
1734
1735<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001736 <code class="details" id="promoteReplica">promoteReplica(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001737 <pre>Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.
Craig Citroe633be12015-03-02 13:40:36 -08001738
1739Args:
1740 project: string, ID of the project that contains the read replica. (required)
1741 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001742 x__xgafv: string, V1 error format.
1743 Allowed values
1744 1 - v1 error format
1745 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001746
1747Returns:
1748 An object of the form:
1749
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001750 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
1751 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1752 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1753 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1754 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -07001755 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1756 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -07001757 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001758 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001759 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07001760 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001761 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001762 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001763 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001764 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1765 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1766 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001767 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001768 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
1769 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1770 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001771 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
1772 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1773 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
1774 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
Bu Sun Kim65020912020-05-20 12:08:20 -07001775 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08001776 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001777 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -07001778 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001779 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1780 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07001781 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08001782 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001783 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001784 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001785 },
Craig Citroe633be12015-03-02 13:40:36 -08001786 },
1787 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001788 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001789 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1790 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1791 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001792 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001793 &quot;targetLink&quot;: &quot;A String&quot;,
1794 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1795 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
1796 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
1797 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1798 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1799 &quot;A String&quot;,
1800 ],
1801 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1802 },
1803 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1804 &quot;encryptionOptions&quot;: {
1805 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
1806 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
1807 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1808 },
1809 },
1810 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
1811 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
1812 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1813 },
Craig Citroe633be12015-03-02 13:40:36 -08001814 }</pre>
1815</div>
1816
1817<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001818 <code class="details" id="resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001819 <pre>Deletes all client certificates and generates a new server SSL certificate for the instance.
Craig Citroe633be12015-03-02 13:40:36 -08001820
1821Args:
1822 project: string, Project ID of the project that contains the instance. (required)
1823 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001824 x__xgafv: string, V1 error format.
1825 Allowed values
1826 1 - v1 error format
1827 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001828
1829Returns:
1830 An object of the form:
1831
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001832 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
1833 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1834 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1835 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1836 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -07001837 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1838 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -07001839 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001840 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001841 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07001842 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001843 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001844 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001845 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001846 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1847 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1848 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001849 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001850 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
1851 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1852 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001853 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
1854 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1855 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
1856 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
Bu Sun Kim65020912020-05-20 12:08:20 -07001857 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08001858 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001859 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -07001860 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001861 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1862 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07001863 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08001864 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001865 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001866 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001867 },
Craig Citroe633be12015-03-02 13:40:36 -08001868 },
1869 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001870 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001871 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1872 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1873 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001874 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001875 &quot;targetLink&quot;: &quot;A String&quot;,
1876 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1877 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
1878 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
1879 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1880 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1881 &quot;A String&quot;,
1882 ],
1883 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1884 },
1885 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1886 &quot;encryptionOptions&quot;: {
1887 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
1888 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
1889 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1890 },
1891 },
1892 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
1893 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
1894 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1895 },
Craig Citroe633be12015-03-02 13:40:36 -08001896 }</pre>
1897</div>
1898
1899<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001900 <code class="details" id="restart">restart(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08001901 <pre>Restarts a Cloud SQL instance.
1902
1903Args:
1904 project: string, Project ID of the project that contains the instance to be restarted. (required)
1905 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001906 x__xgafv: string, V1 error format.
1907 Allowed values
1908 1 - v1 error format
1909 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001910
1911Returns:
1912 An object of the form:
1913
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001914 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
1915 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1916 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
1917 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1918 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -07001919 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1920 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -07001921 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001922 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001923 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07001924 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001925 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001926 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001927 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001928 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1929 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1930 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001931 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001932 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
1933 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1934 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001935 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
1936 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1937 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
1938 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
Bu Sun Kim65020912020-05-20 12:08:20 -07001939 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08001940 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001941 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -07001942 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001943 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1944 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07001945 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08001946 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001947 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001948 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001949 },
Craig Citroe633be12015-03-02 13:40:36 -08001950 },
1951 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001952 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001953 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1954 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
1955 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001956 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001957 &quot;targetLink&quot;: &quot;A String&quot;,
1958 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1959 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
1960 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
1961 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1962 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
1963 &quot;A String&quot;,
1964 ],
1965 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1966 },
1967 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1968 &quot;encryptionOptions&quot;: {
1969 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
1970 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
1971 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1972 },
1973 },
1974 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
1975 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
1976 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1977 },
Craig Citroe633be12015-03-02 13:40:36 -08001978 }</pre>
1979</div>
1980
1981<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001982 <code class="details" id="restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001983 <pre>Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.
Craig Citroe633be12015-03-02 13:40:36 -08001984
1985Args:
1986 project: string, Project ID of the project that contains the instance. (required)
1987 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001988 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08001989 The object takes the form of:
1990
1991{ # Database instance restore backup request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001992 &quot;restoreBackupContext&quot;: { # Database instance restore from backup context. Backup context contains source instance id and project id. # Parameters required to perform the restore backup operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001993 &quot;project&quot;: &quot;A String&quot;, # The full project ID of the source instance.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001994 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#restoreBackupContext*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001995 &quot;backupRunId&quot;: &quot;A String&quot;, # The ID of the backup run to restore from.
1996 &quot;instanceId&quot;: &quot;A String&quot;, # The ID of the instance that the backup was taken from.
Craig Citroe633be12015-03-02 13:40:36 -08001997 },
1998 }
1999
Dan O'Mearadd494642020-05-01 07:42:23 -07002000 x__xgafv: string, V1 error format.
2001 Allowed values
2002 1 - v1 error format
2003 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002004
2005Returns:
2006 An object of the form:
2007
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002008 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2009 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2010 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
2011 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2012 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -07002013 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2014 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -07002015 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002016 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002017 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07002018 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002019 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002020 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002021 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002022 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2023 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2024 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002025 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002026 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
2027 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2028 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002029 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2030 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2031 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
2032 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
Bu Sun Kim65020912020-05-20 12:08:20 -07002033 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08002034 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002035 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -07002036 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002037 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2038 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07002039 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08002040 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002041 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002042 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002043 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002044 },
2045 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002046 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002047 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2048 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2049 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002050 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002051 &quot;targetLink&quot;: &quot;A String&quot;,
2052 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2053 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2054 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
2055 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2056 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
2057 &quot;A String&quot;,
2058 ],
2059 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2060 },
2061 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2062 &quot;encryptionOptions&quot;: {
2063 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2064 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2065 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2066 },
2067 },
2068 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
2069 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
2070 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2071 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002072 }</pre>
2073</div>
2074
2075<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002076 <code class="details" id="rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002077 <pre>Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002078
2079Args:
2080 project: string, Project ID of the project that contains the instance. (required)
2081 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002082 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002083 The object takes the form of:
2084
2085{ # Rotate Server CA request.
Bu Sun Kim65020912020-05-20 12:08:20 -07002086 &quot;rotateServerCaContext&quot;: { # Instance rotate server CA context. # Contains details about the rotate server CA operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002087 &quot;nextVersion&quot;: &quot;A String&quot;, # The fingerprint of the next version to be rotated to. If left unspecified, will be rotated to the most recently added server CA version.
2088 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#rotateServerCaContext*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002089 },
2090 }
2091
Dan O'Mearadd494642020-05-01 07:42:23 -07002092 x__xgafv: string, V1 error format.
2093 Allowed values
2094 1 - v1 error format
2095 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002096
2097Returns:
2098 An object of the form:
2099
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002100 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2101 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2102 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
2103 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2104 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -07002105 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2106 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -07002107 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002108 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002109 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07002110 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002111 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002112 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002113 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002114 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2115 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2116 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002117 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002118 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
2119 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2120 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002121 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2122 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2123 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
2124 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
Bu Sun Kim65020912020-05-20 12:08:20 -07002125 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002126 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002127 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -07002128 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002129 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2130 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07002131 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002132 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002133 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002134 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002135 },
Craig Citroe633be12015-03-02 13:40:36 -08002136 },
2137 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002138 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002139 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2140 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2141 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002142 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002143 &quot;targetLink&quot;: &quot;A String&quot;,
2144 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2145 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2146 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
2147 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2148 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
2149 &quot;A String&quot;,
2150 ],
2151 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2152 },
2153 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2154 &quot;encryptionOptions&quot;: {
2155 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2156 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2157 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2158 },
2159 },
2160 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
2161 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
2162 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2163 },
Craig Citroe633be12015-03-02 13:40:36 -08002164 }</pre>
2165</div>
2166
2167<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002168 <code class="details" id="startReplica">startReplica(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08002169 <pre>Starts the replication in the read replica instance.
2170
2171Args:
2172 project: string, ID of the project that contains the read replica. (required)
2173 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002174 x__xgafv: string, V1 error format.
2175 Allowed values
2176 1 - v1 error format
2177 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002178
2179Returns:
2180 An object of the form:
2181
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002182 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2183 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2184 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
2185 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2186 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -07002187 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2188 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -07002189 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002190 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002191 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07002192 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002193 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002194 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002195 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002196 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2197 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2198 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002199 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002200 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
2201 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2202 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002203 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2204 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2205 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
2206 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
Bu Sun Kim65020912020-05-20 12:08:20 -07002207 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08002208 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002209 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -07002210 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002211 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2212 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07002213 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08002214 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002215 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002216 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002217 },
Craig Citroe633be12015-03-02 13:40:36 -08002218 },
2219 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002220 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002221 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2222 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2223 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002224 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002225 &quot;targetLink&quot;: &quot;A String&quot;,
2226 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2227 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2228 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
2229 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2230 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
2231 &quot;A String&quot;,
2232 ],
2233 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2234 },
2235 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2236 &quot;encryptionOptions&quot;: {
2237 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2238 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2239 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2240 },
2241 },
2242 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
2243 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
2244 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2245 },
Craig Citroe633be12015-03-02 13:40:36 -08002246 }</pre>
2247</div>
2248
2249<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002250 <code class="details" id="stopReplica">stopReplica(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08002251 <pre>Stops the replication in the read replica instance.
2252
2253Args:
2254 project: string, ID of the project that contains the read replica. (required)
2255 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002256 x__xgafv: string, V1 error format.
2257 Allowed values
2258 1 - v1 error format
2259 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002260
2261Returns:
2262 An object of the form:
2263
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002264 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2265 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2266 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
2267 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2268 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -07002269 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2270 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -07002271 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002272 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002273 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07002274 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002275 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002276 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002277 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002278 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2279 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2280 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002281 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002282 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
2283 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2284 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002285 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2286 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2287 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
2288 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
Bu Sun Kim65020912020-05-20 12:08:20 -07002289 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08002290 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002291 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -07002292 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002293 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2294 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07002295 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08002296 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002297 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002298 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002299 },
Craig Citroe633be12015-03-02 13:40:36 -08002300 },
2301 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002302 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002303 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2304 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2305 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002306 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002307 &quot;targetLink&quot;: &quot;A String&quot;,
2308 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2309 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2310 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
2311 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2312 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
2313 &quot;A String&quot;,
2314 ],
2315 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2316 },
2317 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2318 &quot;encryptionOptions&quot;: {
2319 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2320 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2321 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2322 },
2323 },
2324 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
2325 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
2326 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2327 },
Craig Citroe633be12015-03-02 13:40:36 -08002328 }</pre>
2329</div>
2330
2331<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002332 <code class="details" id="truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002333 <pre>Truncate MySQL general and slow query log tables
2334
2335Args:
2336 project: string, Project ID of the Cloud SQL project. (required)
2337 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002338 body: object, The request body.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002339 The object takes the form of:
2340
2341{ # Instance truncate log request.
Bu Sun Kim65020912020-05-20 12:08:20 -07002342 &quot;truncateLogContext&quot;: { # Database Instance truncate log context. # Contains details about the truncate log operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002343 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#truncateLogContext*.
2344 &quot;logType&quot;: &quot;A String&quot;, # The type of log to truncate. Valid values are *MYSQL_GENERAL_TABLE* and *MYSQL_SLOW_TABLE*.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002345 },
2346 }
2347
Dan O'Mearadd494642020-05-01 07:42:23 -07002348 x__xgafv: string, V1 error format.
2349 Allowed values
2350 1 - v1 error format
2351 2 - v2 error format
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002352
2353Returns:
2354 An object of the form:
2355
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002356 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2357 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2358 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
2359 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2360 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -07002361 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2362 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -07002363 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002364 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002365 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07002366 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002367 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002368 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002369 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002370 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2371 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2372 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002373 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002374 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
2375 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2376 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002377 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2378 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2379 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
2380 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
Bu Sun Kim65020912020-05-20 12:08:20 -07002381 &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002382 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002383 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -07002384 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002385 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2386 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07002387 &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002388 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002389 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002390 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002391 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002392 },
2393 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002394 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002395 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2396 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2397 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002398 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002399 &quot;targetLink&quot;: &quot;A String&quot;,
2400 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2401 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2402 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
2403 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2404 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
2405 &quot;A String&quot;,
2406 ],
2407 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2408 },
2409 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2410 &quot;encryptionOptions&quot;: {
2411 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2412 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2413 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2414 },
2415 },
2416 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
2417 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
2418 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2419 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002420 }</pre>
2421</div>
2422
2423<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002424 <code class="details" id="update">update(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002425 <pre>Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.
Craig Citroe633be12015-03-02 13:40:36 -08002426
2427Args:
2428 project: string, Project ID of the project that contains the instance. (required)
2429 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002430 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08002431 The object takes the form of:
2432
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002433{ # A Cloud SQL instance resource. Next field: 36
2434 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
2435 &quot;region&quot;: &quot;A String&quot;, # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation.
2436 &quot;settings&quot;: { # Database instance settings. # The user settings.
2437 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances).
2438 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
2439 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
2440 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
Bu Sun Kim65020912020-05-20 12:08:20 -07002441 &quot;A String&quot;,
2442 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002443 &quot;pricingPlan&quot;: &quot;A String&quot;, # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances.
2444 &quot;activeDirectoryConfig&quot;: { # Active Directory configuration, for now relevant only for SQL Server # Active Directory configuration, for now relevant only for SQL Server
2445 &quot;domain&quot;: &quot;A String&quot;, # Domain name
2446 &quot;kind&quot;: &quot;A String&quot;, # This will be always sql#activeDirectoryConfig.
2447 },
2448 &quot;crashSafeReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.
2449 &quot;locationPreference&quot;: { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.
2450 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
2451 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
2452 &quot;followGaeApplication&quot;: &quot;A String&quot;, # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
2453 },
2454 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
2455 &quot;storageAutoResizeLimit&quot;: &quot;A String&quot;, # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
2456 &quot;ipConfiguration&quot;: { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.
2457 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
2458 &quot;privateNetwork&quot;: &quot;A String&quot;, # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set.
2459 &quot;authorizedNetworks&quot;: [ # The list of external networks that are allowed to connect to the instance using the IP. In &#x27;CIDR&#x27; notation, also known as &#x27;slash&#x27; notation (for example: *192.168.100.0/24*).
2460 { # An entry for an Access Control list.
2461 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
2462 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2463 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
2464 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002465 },
2466 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002467 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002468 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002469 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
2470 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
2471 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
2472 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
2473 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
2474 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
2475 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
2476 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002477 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002478 &quot;settingsVersion&quot;: &quot;A String&quot;, # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
2479 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
2480 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
2481 { # Database flags for Cloud SQL instances.
2482 &quot;value&quot;: &quot;A String&quot;, # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn&#x27;t take a value.
2483 &quot;name&quot;: &quot;A String&quot;, # The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002484 },
2485 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002486 &quot;maintenanceWindow&quot;: { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes.
2487 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
2488 &quot;hour&quot;: 42, # hour of day - 0 to 23.
2489 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
2490 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
2491 },
2492 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
2493 &quot;a_key&quot;: &quot;A String&quot;,
2494 },
2495 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
2496 &quot;availabilityType&quot;: &quot;A String&quot;, # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration.
2497 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
2498 &quot;activationPolicy&quot;: &quot;A String&quot;, # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives.
2499 &quot;replicationType&quot;: &quot;A String&quot;, # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances.
2500 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
2501 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
2502 &quot;startDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
2503 &quot;time&quot;: &quot;A String&quot;, # Time in UTC when the &quot;deny maintenance period&quot; starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00
2504 &quot;endDate&quot;: &quot;A String&quot;, # &quot;deny maintenance period&quot; end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
2505 },
2506 ],
2507 },
2508 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
2509 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
2510 &quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.
2511 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2512 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
2513 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
2514 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
2515 },
2516 &quot;currentDiskSize&quot;: &quot;A String&quot;, # The current disk usage of the instance in bytes. This property has been deprecated. Use the &quot;cloudsql.googleapis.com/database/disk/bytes_used&quot; metric in Cloud Monitoring API instead. Please see this announcement for details.
2517 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
2518 &quot;name&quot;: &quot;A String&quot;, # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn&#x27;t include the project ID. This property is applicable only to Second Generation instances.
2519 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true.
2520 },
2521 &quot;replicaNames&quot;: [ # The replicas of the instance.
2522 &quot;A String&quot;,
2523 ],
2524 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
2525 &quot;A String&quot;,
2526 ],
2527 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
2528 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the following. *RUNNABLE*: The instance is running, or is ready to run when accessed. *SUSPENDED*: The instance is not available, for example due to problems with billing. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed. *UNKNOWN_STATE*: The state of the instance is unknown.
2529 &quot;backendType&quot;: &quot;A String&quot;, # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type.
2530 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
2531 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
2532 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
2533 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
2534 },
2535 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
2536 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
2537 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
2538 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2539 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
2540 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
2541 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
2542 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
2543 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
2544 },
2545 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
2546 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance.
2547 &quot;mysqlReplicaConfiguration&quot;: { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory.
2548 &quot;verifyServerCertificate&quot;: True or False, # Whether or not to check the primary instance&#x27;s Common Name value in the certificate that it sends during the SSL handshake.
2549 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
2550 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
2551 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
2552 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
2553 &quot;clientKey&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s private key. The corresponsing public key is encoded in the client&#x27;s certificate.
2554 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
2555 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2556 &quot;dumpFilePath&quot;: &quot;A String&quot;, # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump.
2557 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
2558 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
2559 },
2560 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
2561 },
2562 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
2563 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
Bu Sun Kim65020912020-05-20 12:08:20 -07002564 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002565 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
2566 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2567 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*
2568 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
2569 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
2570 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
2571 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
2572 },
2573 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead.
2574 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
2575 { # Database instance IP Mapping.
2576 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
2577 &quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired.
2578 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported.
Bu Sun Kim65020912020-05-20 12:08:20 -07002579 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002580 ],
2581 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
2582 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
2583 &quot;canDefer&quot;: True or False,
2584 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
2585 },
2586 &quot;instanceType&quot;: &quot;A String&quot;, # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer&#x27;s premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica.
2587 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
2588 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
2589 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
2590 &quot;gceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone.
2591 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
2592}
Craig Citroe633be12015-03-02 13:40:36 -08002593
Dan O'Mearadd494642020-05-01 07:42:23 -07002594 x__xgafv: string, V1 error format.
2595 Allowed values
2596 1 - v1 error format
2597 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002598
2599Returns:
2600 An object of the form:
2601
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002602 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
2603 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2604 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
2605 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2606 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -07002607 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2608 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -07002609 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002610 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002611 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -07002612 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002613 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002614 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002615 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002616 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2617 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2618 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -07002619 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002620 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
2621 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2622 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002623 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2624 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2625 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
2626 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
Bu Sun Kim65020912020-05-20 12:08:20 -07002627 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08002628 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002629 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -07002630 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002631 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2632 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -07002633 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -08002634 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002635 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002636 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002637 },
Craig Citroe633be12015-03-02 13:40:36 -08002638 },
2639 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002640 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002641 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2642 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2643 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002644 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002645 &quot;targetLink&quot;: &quot;A String&quot;,
2646 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2647 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2648 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
2649 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2650 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
2651 &quot;A String&quot;,
2652 ],
2653 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2654 },
2655 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2656 &quot;encryptionOptions&quot;: {
2657 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2658 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2659 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2660 },
2661 },
2662 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
2663 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
2664 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2665 },
Craig Citroe633be12015-03-02 13:40:36 -08002666 }</pre>
2667</div>
2668
2669</body></html>