blob: e63aba1d252fedab64f12b00162263650dc8508d [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">
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800108 <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
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800162 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18
163 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
164 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
165 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700166 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700167 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
168 { # Database instance operation error.
169 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
170 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
171 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
172 },
173 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800174 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700175 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800176 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800177 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
178 &quot;encryptionOptions&quot;: {
179 &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.
180 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
181 &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.
182 },
183 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800184 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
185 &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.
186 &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.
187 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
188 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
189 &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.
190 &quot;A String&quot;,
191 ],
192 },
193 &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.
194 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800195 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800196 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
197 &quot;targetLink&quot;: &quot;A String&quot;,
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800198 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800199 &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*.
200 &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*
201 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
202 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
203 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
204 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
205 },
206 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
207 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
208 &quot;schemaOnly&quot;: True or False, # Export only schemas.
209 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
210 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
211 },
212 &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.
213 &quot;A String&quot;,
214 ],
215 },
216 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
217 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
218 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
219 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
220 },
221 &quot;offload&quot;: True or False, # Option for export offload.
222 &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.
223 &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.
224 &quot;A String&quot;,
225 ],
226 },
227 &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*.
228 &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*.
229 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700230 }</pre>
231</div>
232
233<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700234 <code class="details" id="clone">clone(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700235 <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 -0700236
237Args:
238 project: string, Project ID of the source as well as the clone Cloud SQL instance. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700239 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 -0700240 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700241 The object takes the form of:
242
243{ # Database instance clone request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700244 &quot;cloneContext&quot;: { # Database instance clone context. # Contains details about the clone operation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800245 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#cloneContext*.
246 &quot;pitrTimestampMs&quot;: &quot;A String&quot;, # Reserved for future use.
247 &quot;pointInTime&quot;: &quot;A String&quot;, # Reserved for future use.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700248 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700249 &quot;binLogFileName&quot;: &quot;A String&quot;, # Name of the binary log file for a Cloud SQL instance.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800250 &quot;binLogPosition&quot;: &quot;A String&quot;, # Position (offset) within the binary log file.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800251 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#binLogCoordinates*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700252 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800253 &quot;destinationInstanceName&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance to be created as a clone.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700254 },
255 }
256
Dan O'Mearadd494642020-05-01 07:42:23 -0700257 x__xgafv: string, V1 error format.
258 Allowed values
259 1 - v1 error format
260 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700261
262Returns:
263 An object of the form:
264
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800265 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18
266 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
267 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
268 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700269 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700270 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
271 { # Database instance operation error.
272 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
273 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
274 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
275 },
276 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800277 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700278 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800279 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800280 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
281 &quot;encryptionOptions&quot;: {
282 &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.
283 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
284 &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.
285 },
286 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800287 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
288 &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.
289 &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.
290 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
291 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
292 &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.
293 &quot;A String&quot;,
294 ],
295 },
296 &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.
297 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800298 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800299 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
300 &quot;targetLink&quot;: &quot;A String&quot;,
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800301 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800302 &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*.
303 &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*
304 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
305 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
306 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
307 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
308 },
309 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
310 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
311 &quot;schemaOnly&quot;: True or False, # Export only schemas.
312 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
313 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
314 },
315 &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.
316 &quot;A String&quot;,
317 ],
318 },
319 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
320 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
321 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
322 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
323 },
324 &quot;offload&quot;: True or False, # Option for export offload.
325 &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.
326 &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.
327 &quot;A String&quot;,
328 ],
329 },
330 &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*.
331 &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*.
332 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -0800333 }</pre>
334</div>
335
336<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700337 <code class="details" id="close">close()</code>
338 <pre>Close httplib2 connections.</pre>
339</div>
340
341<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700342 <code class="details" id="delete">delete(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800343 <pre>Deletes a Cloud SQL instance.
344
345Args:
346 project: string, Project ID of the project that contains the instance to be deleted. (required)
347 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700348 x__xgafv: string, V1 error format.
349 Allowed values
350 1 - v1 error format
351 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800352
353Returns:
354 An object of the form:
355
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800356 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18
357 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
358 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
359 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700360 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700361 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
362 { # Database instance operation error.
363 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
364 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
365 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
366 },
367 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800368 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700369 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800370 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800371 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
372 &quot;encryptionOptions&quot;: {
373 &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.
374 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
375 &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.
376 },
377 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800378 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
379 &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.
380 &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.
381 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
382 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
383 &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.
384 &quot;A String&quot;,
385 ],
386 },
387 &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.
388 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800389 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800390 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
391 &quot;targetLink&quot;: &quot;A String&quot;,
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800392 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800393 &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*.
394 &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*
395 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
396 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
397 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
398 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
399 },
400 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
401 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
402 &quot;schemaOnly&quot;: True or False, # Export only schemas.
403 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
404 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
405 },
406 &quot;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.
407 &quot;A String&quot;,
408 ],
409 },
410 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
411 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
412 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
413 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
414 },
415 &quot;offload&quot;: True or False, # Option for export offload.
416 &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.
417 &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.
418 &quot;A String&quot;,
419 ],
420 },
421 &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*.
422 &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*.
423 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700424 }</pre>
425</div>
426
427<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700428 <code class="details" id="demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700429 <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 -0700430
431Args:
432 project: string, ID of the project that contains the instance. (required)
433 instance: string, Cloud SQL instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700434 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700435 The object takes the form of:
436
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700437{ # Database demote primary instance request.
438 &quot;demoteMasterContext&quot;: { # Database instance demote primary instance context. # Contains details about the demoteMaster operation.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800439 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#demoteMasterContext*.
440 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as on-premises primary instance in the replication setup.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800441 &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.
442 &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.
443 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
444 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
445 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#demoteMasterMysqlReplicaConfiguration*.
446 &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.
447 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
448 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
449 },
450 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#demoteMasterConfiguration*.
451 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800452 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700453 },
454 }
455
Dan O'Mearadd494642020-05-01 07:42:23 -0700456 x__xgafv: string, V1 error format.
457 Allowed values
458 1 - v1 error format
459 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700460
461Returns:
462 An object of the form:
463
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800464 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18
465 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
466 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
467 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700468 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700469 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
470 { # Database instance operation error.
471 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
472 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
473 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
474 },
475 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800476 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700477 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800478 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800479 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
480 &quot;encryptionOptions&quot;: {
481 &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.
482 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
483 &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.
484 },
485 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800486 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
487 &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.
488 &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.
489 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
490 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
491 &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.
492 &quot;A String&quot;,
493 ],
494 },
495 &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.
496 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800497 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800498 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
499 &quot;targetLink&quot;: &quot;A String&quot;,
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800500 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800501 &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*.
502 &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*
503 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
504 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
505 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
506 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
507 },
508 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
509 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
510 &quot;schemaOnly&quot;: True or False, # Export only schemas.
511 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
512 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
513 },
514 &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.
515 &quot;A String&quot;,
516 ],
517 },
518 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
519 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
520 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
521 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
522 },
523 &quot;offload&quot;: True or False, # Option for export offload.
524 &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.
525 &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.
526 &quot;A String&quot;,
527 ],
528 },
529 &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*.
530 &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*.
531 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -0800532 }</pre>
533</div>
534
535<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700536 <code class="details" id="export">export(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700537 <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 -0800538
539Args:
540 project: string, Project ID of the project that contains the instance to be exported. (required)
541 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700542 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800543 The object takes the form of:
544
545{ # Database instance export request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700546 &quot;exportContext&quot;: { # Database instance export context. # Contains details about the export operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700547 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700548 &quot;schemaOnly&quot;: True or False, # Export only schemas.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800549 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
550 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
551 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700552 &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 -0700553 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800554 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700555 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800556 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
557 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
558 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
559 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
560 },
561 &quot;offload&quot;: True or False, # Option for export offload.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800562 &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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800563 &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.
564 &quot;A String&quot;,
565 ],
Craig Citroe633be12015-03-02 13:40:36 -0800566 },
567 }
568
Dan O'Mearadd494642020-05-01 07:42:23 -0700569 x__xgafv: string, V1 error format.
570 Allowed values
571 1 - v1 error format
572 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800573
574Returns:
575 An object of the form:
576
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800577 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18
578 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
579 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
580 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700581 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700582 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
583 { # Database instance operation error.
584 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
585 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
586 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
587 },
588 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800589 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700590 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800591 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800592 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
593 &quot;encryptionOptions&quot;: {
594 &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.
595 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
596 &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.
597 },
598 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800599 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
600 &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.
601 &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.
602 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
603 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
604 &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.
605 &quot;A String&quot;,
606 ],
607 },
608 &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.
609 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800610 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800611 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
612 &quot;targetLink&quot;: &quot;A String&quot;,
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800613 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800614 &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*.
615 &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*
616 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
617 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
618 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
619 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
620 },
621 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
622 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
623 &quot;schemaOnly&quot;: True or False, # Export only schemas.
624 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
625 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
626 },
627 &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.
628 &quot;A String&quot;,
629 ],
630 },
631 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
632 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
633 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
634 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
635 },
636 &quot;offload&quot;: True or False, # Option for export offload.
637 &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.
638 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
639 &quot;A String&quot;,
640 ],
641 },
642 &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*.
643 &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*.
644 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800645 }</pre>
646</div>
647
648<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700649 <code class="details" id="failover">failover(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700650 <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 -0800651
652Args:
653 project: string, ID of the project that contains the read replica. (required)
654 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700655 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800656 The object takes the form of:
657
658{ # Instance failover request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700659 &quot;failoverContext&quot;: { # Database instance failover context. # Failover Context.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700660 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#failoverContext*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700661 &quot;settingsVersion&quot;: &quot;A String&quot;, # The current settings version of this instance. Request will be rejected if this version doesn&#x27;t match the current settings version.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800662 },
663 }
664
Dan O'Mearadd494642020-05-01 07:42:23 -0700665 x__xgafv: string, V1 error format.
666 Allowed values
667 1 - v1 error format
668 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800669
670Returns:
671 An object of the form:
672
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800673 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18
674 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
675 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
676 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700677 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700678 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
679 { # Database instance operation error.
680 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
681 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
682 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
683 },
684 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800685 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700686 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800687 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800688 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
689 &quot;encryptionOptions&quot;: {
690 &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.
691 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
692 &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.
693 },
694 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800695 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
696 &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.
697 &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.
698 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
699 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
700 &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.
701 &quot;A String&quot;,
702 ],
703 },
704 &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.
705 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800706 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800707 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
708 &quot;targetLink&quot;: &quot;A String&quot;,
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800709 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800710 &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*.
711 &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*
712 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
713 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
714 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
715 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
716 },
717 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
718 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
719 &quot;schemaOnly&quot;: True or False, # Export only schemas.
720 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
721 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
722 },
723 &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.
724 &quot;A String&quot;,
725 ],
726 },
727 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
728 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
729 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
730 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
731 },
732 &quot;offload&quot;: True or False, # Option for export offload.
733 &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.
734 &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.
735 &quot;A String&quot;,
736 ],
737 },
738 &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*.
739 &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*.
740 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -0800741 }</pre>
742</div>
743
744<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700745 <code class="details" id="get">get(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800746 <pre>Retrieves a resource containing information about a Cloud SQL instance.
747
748Args:
749 project: string, Project ID of the project that contains the instance. (required)
750 instance: string, Database instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700751 x__xgafv: string, V1 error format.
752 Allowed values
753 1 - v1 error format
754 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800755
756Returns:
757 An object of the form:
758
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700759 { # A Cloud SQL instance resource. Next field: 36
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800760 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
761 &quot;canDefer&quot;: True or False,
762 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
763 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700764 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800765 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700766 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
767 &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.
768 &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.
769 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800770 &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*.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800771 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
772 &quot;A String&quot;,
773 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800774 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
775 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
776 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
777 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
778 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
779 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
780 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
781 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
782 &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.
783 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
784 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
785 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700786 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
787 { # Database instance IP Mapping.
788 &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 Kim673ec5c2020-11-16 11:05:03 -0700789 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800790 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700791 },
792 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800793 &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.
794 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
795 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
796 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
797 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800798 },
799 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800800 &quot;replicaNames&quot;: [ # The replicas of the instance.
801 &quot;A String&quot;,
802 ],
803 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance has been stopped by owner. It is not currently running, but it&#x27;s ready to be restarted. *SUSPENDED*: The instance is not available, for example due to problems with billing. for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed.
804 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
805 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
806 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
807 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
808 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
809 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
810 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
811 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
812 &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*.
813 &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*
814 },
815 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
816 &quot;secondaryGceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. Reserved for future use.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800817 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
818 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
819 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
820 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800821 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800822 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800823 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfies physical zone separation. Reserved for future use.
824 &quot;settings&quot;: { # Database instance settings. # The user settings.
825 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
826 &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.
827 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
828 &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*).
829 { # An entry for an Access Control list.
830 &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*.
831 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
832 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
833 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
834 },
835 ],
836 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
837 &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.
838 },
839 &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.
840 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
841 { # Database flags for Cloud SQL instances.
842 &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.
843 &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.
844 },
845 ],
846 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
847 &quot;A String&quot;,
848 ],
849 &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.
850 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
851 &quot;a_key&quot;: &quot;A String&quot;,
852 },
853 &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.
854 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
855 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
856 &quot;secondaryZone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). Reserved for future use.
857 &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.
858 },
859 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
860 &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).
861 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
862 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
863 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
864 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
865 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
866 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
867 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
868 &quot;retainedBackups&quot;: 42, # Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is &#x27;COUNT&#x27;, we will retain this many backups.
869 },
870 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
871 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
872 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
873 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
874 },
875 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
876 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
877 &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
878 &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
879 &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
880 },
881 ],
882 &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.
883 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
884 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
885 &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.
886 &quot;activeDirectoryConfig&quot;: { # Active Directory configuration, relevant only for Cloud SQL for SQL Server. # Active Directory configuration, relevant only for Cloud SQL for SQL Server.
887 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
888 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
889 },
890 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
891 &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.
892 &quot;hour&quot;: 42, # hour of day - 0 to 23.
893 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
894 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
895 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
896 },
897 &quot;insightsConfig&quot;: { # Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration. # Insights configuration, for now relevant only for Postgres.
898 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
899 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
900 &quot;queryStringLength&quot;: 42, # Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query length more than this field value will be truncated to this value. When unset, query length will be the default value.
901 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
902 },
903 &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.
904 &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.
905 &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.
906 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
907 },
908 &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.
909 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800910 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800911 &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.
912 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
913 &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.
914 &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.
915 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
916 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
917 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
918 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
919 &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.
920 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
921 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
922 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
923 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
924 &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.
925 &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.
926 },
927 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
928 },
929 &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.
930 &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.
931 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700932 }</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800933</div>
934
935<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700936 <code class="details" id="import_">import_(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700937 <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 -0800938
939Args:
940 project: string, Project ID of the project that contains the instance. (required)
941 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700942 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800943 The object takes the form of:
944
945{ # Database instance import request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700946 &quot;importContext&quot;: { # Database instance import context. # Contains details about the import operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700947 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
948 &quot;encryptionOptions&quot;: {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700949 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800950 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700951 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700952 },
953 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800954 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
955 &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.
956 &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.
957 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
958 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
959 &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.
960 &quot;A String&quot;,
961 ],
962 },
963 &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.
964 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -0800965 },
966 }
967
Dan O'Mearadd494642020-05-01 07:42:23 -0700968 x__xgafv: string, V1 error format.
969 Allowed values
970 1 - v1 error format
971 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800972
973Returns:
974 An object of the form:
975
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800976 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18
977 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
978 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
979 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700980 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700981 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
982 { # Database instance operation error.
983 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
984 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
985 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
986 },
987 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800988 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700989 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800990 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800991 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
992 &quot;encryptionOptions&quot;: {
993 &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.
994 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
995 &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.
996 },
997 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800998 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
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;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.
1001 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1002 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1003 &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.
1004 &quot;A String&quot;,
1005 ],
1006 },
1007 &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.
1008 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001009 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001010 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1011 &quot;targetLink&quot;: &quot;A String&quot;,
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001012 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001013 &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*.
1014 &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*
1015 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1016 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1017 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1018 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
1019 },
1020 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1021 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1022 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1023 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1024 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
1025 },
1026 &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.
1027 &quot;A String&quot;,
1028 ],
1029 },
1030 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1031 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
1032 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
1033 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1034 },
1035 &quot;offload&quot;: True or False, # Option for export offload.
1036 &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.
1037 &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.
1038 &quot;A String&quot;,
1039 ],
1040 },
1041 &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*.
1042 &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*.
1043 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08001044 }</pre>
1045</div>
1046
1047<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001048 <code class="details" id="insert">insert(project, body=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08001049 <pre>Creates a new Cloud SQL instance.
1050
1051Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001052 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 -07001053 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08001054 The object takes the form of:
1055
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001056{ # A Cloud SQL instance resource. Next field: 36
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001057 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1058 &quot;canDefer&quot;: True or False,
1059 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1060 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001061 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001062 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001063 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
1064 &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.
1065 &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.
1066 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001067 &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*.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001068 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1069 &quot;A String&quot;,
1070 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001071 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1072 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1073 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1074 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1075 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1076 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1077 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1078 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1079 &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.
1080 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1081 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1082 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001083 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1084 { # Database instance IP Mapping.
1085 &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 Kim673ec5c2020-11-16 11:05:03 -07001086 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001087 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001088 },
1089 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001090 &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.
1091 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
1092 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
1093 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1094 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001095 },
1096 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001097 &quot;replicaNames&quot;: [ # The replicas of the instance.
1098 &quot;A String&quot;,
1099 ],
1100 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance has been stopped by owner. It is not currently running, but it&#x27;s ready to be restarted. *SUSPENDED*: The instance is not available, for example due to problems with billing. for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed.
1101 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1102 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1103 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1104 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1105 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1106 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1107 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1108 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1109 &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*.
1110 &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*
1111 },
1112 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1113 &quot;secondaryGceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. Reserved for future use.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001114 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
1115 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1116 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
1117 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001118 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001119 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001120 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfies physical zone separation. Reserved for future use.
1121 &quot;settings&quot;: { # Database instance settings. # The user settings.
1122 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1123 &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.
1124 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1125 &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*).
1126 { # An entry for an Access Control list.
1127 &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*.
1128 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
1129 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1130 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1131 },
1132 ],
1133 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1134 &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.
1135 },
1136 &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.
1137 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1138 { # Database flags for Cloud SQL instances.
1139 &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.
1140 &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.
1141 },
1142 ],
1143 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
1144 &quot;A String&quot;,
1145 ],
1146 &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.
1147 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1148 &quot;a_key&quot;: &quot;A String&quot;,
1149 },
1150 &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.
1151 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1152 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
1153 &quot;secondaryZone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). Reserved for future use.
1154 &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.
1155 },
1156 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
1157 &quot;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).
1158 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1159 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
1160 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
1161 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1162 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1163 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1164 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1165 &quot;retainedBackups&quot;: 42, # Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is &#x27;COUNT&#x27;, we will retain this many backups.
1166 },
1167 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1168 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
1169 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1170 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1171 },
1172 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1173 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1174 &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
1175 &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
1176 &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
1177 },
1178 ],
1179 &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.
1180 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1181 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1182 &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.
1183 &quot;activeDirectoryConfig&quot;: { # Active Directory configuration, relevant only for Cloud SQL for SQL Server. # Active Directory configuration, relevant only for Cloud SQL for SQL Server.
1184 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
1185 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
1186 },
1187 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1188 &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.
1189 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1190 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
1191 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1192 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
1193 },
1194 &quot;insightsConfig&quot;: { # Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration. # Insights configuration, for now relevant only for Postgres.
1195 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
1196 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1197 &quot;queryStringLength&quot;: 42, # Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query length more than this field value will be truncated to this value. When unset, query length will be the default value.
1198 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1199 },
1200 &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.
1201 &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.
1202 &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.
1203 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
1204 },
1205 &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.
1206 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001207 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001208 &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.
1209 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1210 &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.
1211 &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.
1212 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1213 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1214 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1215 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1216 &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.
1217 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1218 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1219 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
1220 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1221 &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.
1222 &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.
1223 },
1224 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1225 },
1226 &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.
1227 &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.
1228 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001229}
Craig Citroe633be12015-03-02 13:40:36 -08001230
Dan O'Mearadd494642020-05-01 07:42:23 -07001231 x__xgafv: string, V1 error format.
1232 Allowed values
1233 1 - v1 error format
1234 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001235
1236Returns:
1237 An object of the form:
1238
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001239 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18
1240 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1241 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1242 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001243 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001244 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1245 { # Database instance operation error.
1246 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1247 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1248 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1249 },
1250 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001251 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001252 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001253 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001254 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1255 &quot;encryptionOptions&quot;: {
1256 &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.
1257 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1258 &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.
1259 },
1260 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001261 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
1262 &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.
1263 &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.
1264 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1265 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1266 &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.
1267 &quot;A String&quot;,
1268 ],
1269 },
1270 &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.
1271 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001272 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001273 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1274 &quot;targetLink&quot;: &quot;A String&quot;,
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001275 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001276 &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*.
1277 &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*
1278 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1279 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1280 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1281 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
1282 },
1283 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1284 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1285 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1286 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1287 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
1288 },
1289 &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.
1290 &quot;A String&quot;,
1291 ],
1292 },
1293 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1294 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
1295 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
1296 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1297 },
1298 &quot;offload&quot;: True or False, # Option for export offload.
1299 &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.
1300 &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.
1301 &quot;A String&quot;,
1302 ],
1303 },
1304 &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*.
1305 &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*.
1306 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08001307 }</pre>
1308</div>
1309
1310<div class="method">
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001311 <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 -07001312 <pre>Lists instances under a given project.
Craig Citroe633be12015-03-02 13:40:36 -08001313
1314Args:
1315 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001316 maxResults: integer, The maximum number of results to return per response.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001317 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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001318 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 -07001319 x__xgafv: string, V1 error format.
1320 Allowed values
1321 1 - v1 error format
1322 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001323
1324Returns:
1325 An object of the form:
1326
1327 { # Database instances list response.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001328 &quot;warnings&quot;: [ # List of warnings that occurred while handling the request.
1329 { # An Admin API warning message.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001330 &quot;message&quot;: &quot;A String&quot;, # The warning message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001331 &quot;code&quot;: &quot;A String&quot;, # Code to uniquely identify the warning type.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001332 },
1333 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001334 &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.
1335 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instancesList*.
Bu Sun Kim65020912020-05-20 12:08:20 -07001336 &quot;items&quot;: [ # List of database instance resources.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001337 { # A Cloud SQL instance resource. Next field: 36
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001338 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1339 &quot;canDefer&quot;: True or False,
1340 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1341 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001342 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001343 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001344 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
1345 &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.
1346 &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.
1347 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001348 &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*.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001349 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1350 &quot;A String&quot;,
1351 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001352 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1353 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1354 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1355 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1356 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1357 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1358 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1359 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1360 &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.
1361 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1362 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1363 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001364 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1365 { # Database instance IP Mapping.
1366 &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 Kim673ec5c2020-11-16 11:05:03 -07001367 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001368 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001369 },
1370 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001371 &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.
1372 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
1373 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
1374 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1375 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001376 },
1377 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001378 &quot;replicaNames&quot;: [ # The replicas of the instance.
1379 &quot;A String&quot;,
1380 ],
1381 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance has been stopped by owner. It is not currently running, but it&#x27;s ready to be restarted. *SUSPENDED*: The instance is not available, for example due to problems with billing. for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed.
1382 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1383 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1384 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1385 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1386 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1387 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1388 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1389 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1390 &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*.
1391 &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*
1392 },
1393 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1394 &quot;secondaryGceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. Reserved for future use.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001395 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
1396 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1397 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
1398 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001399 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001400 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001401 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfies physical zone separation. Reserved for future use.
1402 &quot;settings&quot;: { # Database instance settings. # The user settings.
1403 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1404 &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.
1405 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1406 &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*).
1407 { # An entry for an Access Control list.
1408 &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*.
1409 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
1410 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1411 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1412 },
1413 ],
1414 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1415 &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.
1416 },
1417 &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.
1418 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1419 { # Database flags for Cloud SQL instances.
1420 &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.
1421 &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.
1422 },
1423 ],
1424 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
1425 &quot;A String&quot;,
1426 ],
1427 &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.
1428 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1429 &quot;a_key&quot;: &quot;A String&quot;,
1430 },
1431 &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.
1432 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1433 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
1434 &quot;secondaryZone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). Reserved for future use.
1435 &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.
1436 },
1437 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
1438 &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).
1439 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1440 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
1441 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
1442 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1443 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1444 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1445 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1446 &quot;retainedBackups&quot;: 42, # Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is &#x27;COUNT&#x27;, we will retain this many backups.
1447 },
1448 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1449 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
1450 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1451 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1452 },
1453 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1454 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1455 &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
1456 &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
1457 &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
1458 },
1459 ],
1460 &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.
1461 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1462 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1463 &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.
1464 &quot;activeDirectoryConfig&quot;: { # Active Directory configuration, relevant only for Cloud SQL for SQL Server. # Active Directory configuration, relevant only for Cloud SQL for SQL Server.
1465 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
1466 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
1467 },
1468 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1469 &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.
1470 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1471 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
1472 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1473 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
1474 },
1475 &quot;insightsConfig&quot;: { # Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration. # Insights configuration, for now relevant only for Postgres.
1476 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
1477 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1478 &quot;queryStringLength&quot;: 42, # Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query length more than this field value will be truncated to this value. When unset, query length will be the default value.
1479 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1480 },
1481 &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.
1482 &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.
1483 &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.
1484 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
1485 },
1486 &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.
1487 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001488 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001489 &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.
1490 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1491 &quot;failoverTarget&quot;: True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance.
1492 &quot;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.
1493 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1494 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1495 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1496 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1497 &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.
1498 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1499 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1500 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
1501 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1502 &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.
1503 &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.
1504 },
1505 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1506 },
1507 &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.
1508 &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.
1509 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001510 },
Craig Citroe633be12015-03-02 13:40:36 -08001511 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001512 }</pre>
1513</div>
1514
1515<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001516 <code class="details" id="listServerCas">listServerCas(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001517 <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 -07001518
1519Args:
1520 project: string, Project ID of the project that contains the instance. (required)
1521 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001522 x__xgafv: string, V1 error format.
1523 Allowed values
1524 1 - v1 error format
1525 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001526
1527Returns:
1528 An object of the form:
1529
1530 { # Instances ListServerCas response.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001531 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instancesListServerCas*.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001532 &quot;activeVersion&quot;: &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -07001533 &quot;certs&quot;: [ # List of server CA certificates for the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001534 { # SslCerts Resource
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001535 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001536 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001537 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1538 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1539 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1540 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001541 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001542 &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*.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001543 &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*
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001544 },
1545 ],
Craig Citroe633be12015-03-02 13:40:36 -08001546 }</pre>
1547</div>
1548
1549<div class="method">
1550 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1551 <pre>Retrieves the next page of results.
1552
1553Args:
1554 previous_request: The request for the previous page. (required)
1555 previous_response: The response from the request for the previous page. (required)
1556
1557Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001558 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citroe633be12015-03-02 13:40:36 -08001559 page. Returns None if there are no more items in the collection.
1560 </pre>
1561</div>
1562
1563<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001564 <code class="details" id="patch">patch(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001565 <pre>Updates settings of a Cloud SQL instance. This method supports patch semantics.
Craig Citroe633be12015-03-02 13:40:36 -08001566
1567Args:
1568 project: string, Project ID of the project that contains the instance. (required)
1569 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001570 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08001571 The object takes the form of:
1572
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001573{ # A Cloud SQL instance resource. Next field: 36
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001574 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1575 &quot;canDefer&quot;: True or False,
1576 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1577 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001578 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001579 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001580 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
1581 &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.
1582 &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.
1583 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001584 &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*.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001585 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1586 &quot;A String&quot;,
1587 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001588 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1589 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1590 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1591 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1592 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1593 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1594 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1595 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1596 &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.
1597 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1598 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1599 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001600 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1601 { # Database instance IP Mapping.
1602 &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 Kim673ec5c2020-11-16 11:05:03 -07001603 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001604 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001605 },
1606 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001607 &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.
1608 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
1609 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
1610 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1611 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001612 },
1613 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001614 &quot;replicaNames&quot;: [ # The replicas of the instance.
1615 &quot;A String&quot;,
1616 ],
1617 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance has been stopped by owner. It is not currently running, but it&#x27;s ready to be restarted. *SUSPENDED*: The instance is not available, for example due to problems with billing. for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed.
1618 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1619 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1620 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1621 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1622 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1623 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1624 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1625 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1626 &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*.
1627 &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*
1628 },
1629 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1630 &quot;secondaryGceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. Reserved for future use.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001631 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
1632 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1633 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
1634 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001635 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001636 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001637 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfies physical zone separation. Reserved for future use.
1638 &quot;settings&quot;: { # Database instance settings. # The user settings.
1639 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1640 &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.
1641 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1642 &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*).
1643 { # An entry for an Access Control list.
1644 &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*.
1645 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
1646 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1647 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1648 },
1649 ],
1650 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1651 &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.
1652 },
1653 &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.
1654 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1655 { # Database flags for Cloud SQL instances.
1656 &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.
1657 &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.
1658 },
1659 ],
1660 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
1661 &quot;A String&quot;,
1662 ],
1663 &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.
1664 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1665 &quot;a_key&quot;: &quot;A String&quot;,
1666 },
1667 &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.
1668 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1669 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
1670 &quot;secondaryZone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). Reserved for future use.
1671 &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.
1672 },
1673 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
1674 &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).
1675 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1676 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
1677 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
1678 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1679 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1680 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1681 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1682 &quot;retainedBackups&quot;: 42, # Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is &#x27;COUNT&#x27;, we will retain this many backups.
1683 },
1684 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1685 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
1686 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1687 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1688 },
1689 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1690 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1691 &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
1692 &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
1693 &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
1694 },
1695 ],
1696 &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.
1697 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1698 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1699 &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.
1700 &quot;activeDirectoryConfig&quot;: { # Active Directory configuration, relevant only for Cloud SQL for SQL Server. # Active Directory configuration, relevant only for Cloud SQL for SQL Server.
1701 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
1702 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
1703 },
1704 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1705 &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.
1706 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1707 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
1708 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1709 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
1710 },
1711 &quot;insightsConfig&quot;: { # Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration. # Insights configuration, for now relevant only for Postgres.
1712 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
1713 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1714 &quot;queryStringLength&quot;: 42, # Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query length more than this field value will be truncated to this value. When unset, query length will be the default value.
1715 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1716 },
1717 &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.
1718 &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.
1719 &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.
1720 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
1721 },
1722 &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.
1723 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001724 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001725 &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.
1726 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1727 &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.
1728 &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.
1729 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1730 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1731 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1732 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1733 &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.
1734 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1735 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1736 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
1737 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1738 &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.
1739 &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.
1740 },
1741 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1742 },
1743 &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.
1744 &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.
1745 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001746}
Craig Citroe633be12015-03-02 13:40:36 -08001747
Dan O'Mearadd494642020-05-01 07:42:23 -07001748 x__xgafv: string, V1 error format.
1749 Allowed values
1750 1 - v1 error format
1751 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001752
1753Returns:
1754 An object of the form:
1755
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001756 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18
1757 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1758 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1759 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001760 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001761 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1762 { # Database instance operation error.
1763 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1764 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1765 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1766 },
1767 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001768 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001769 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001770 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001771 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1772 &quot;encryptionOptions&quot;: {
1773 &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.
1774 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1775 &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.
1776 },
1777 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001778 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
1779 &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.
1780 &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.
1781 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1782 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1783 &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.
1784 &quot;A String&quot;,
1785 ],
1786 },
1787 &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.
1788 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001789 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001790 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1791 &quot;targetLink&quot;: &quot;A String&quot;,
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001792 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001793 &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*.
1794 &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*
1795 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1796 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1797 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1798 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
1799 },
1800 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1801 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1802 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1803 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1804 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
1805 },
1806 &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.
1807 &quot;A String&quot;,
1808 ],
1809 },
1810 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1811 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
1812 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
1813 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1814 },
1815 &quot;offload&quot;: True or False, # Option for export offload.
1816 &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.
1817 &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.
1818 &quot;A String&quot;,
1819 ],
1820 },
1821 &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*.
1822 &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*.
1823 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08001824 }</pre>
1825</div>
1826
1827<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001828 <code class="details" id="promoteReplica">promoteReplica(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001829 <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 -08001830
1831Args:
1832 project: string, ID of the project that contains the read replica. (required)
1833 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001834 x__xgafv: string, V1 error format.
1835 Allowed values
1836 1 - v1 error format
1837 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001838
1839Returns:
1840 An object of the form:
1841
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001842 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18
1843 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1844 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1845 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001846 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001847 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1848 { # Database instance operation error.
1849 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1850 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1851 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1852 },
1853 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001854 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001855 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001856 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001857 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1858 &quot;encryptionOptions&quot;: {
1859 &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.
1860 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1861 &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.
1862 },
1863 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001864 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
1865 &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.
1866 &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.
1867 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1868 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1869 &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.
1870 &quot;A String&quot;,
1871 ],
1872 },
1873 &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.
1874 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001875 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001876 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1877 &quot;targetLink&quot;: &quot;A String&quot;,
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001878 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001879 &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*.
1880 &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*
1881 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1882 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1883 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1884 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
1885 },
1886 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1887 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1888 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1889 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1890 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
1891 },
1892 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
1893 &quot;A String&quot;,
1894 ],
1895 },
1896 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1897 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
1898 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
1899 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1900 },
1901 &quot;offload&quot;: True or False, # Option for export offload.
1902 &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.
1903 &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.
1904 &quot;A String&quot;,
1905 ],
1906 },
1907 &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*.
1908 &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*.
1909 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08001910 }</pre>
1911</div>
1912
1913<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001914 <code class="details" id="resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001915 <pre>Deletes all client certificates and generates a new server SSL certificate for the instance.
Craig Citroe633be12015-03-02 13:40:36 -08001916
1917Args:
1918 project: string, Project ID of the project that contains the instance. (required)
1919 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001920 x__xgafv: string, V1 error format.
1921 Allowed values
1922 1 - v1 error format
1923 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001924
1925Returns:
1926 An object of the form:
1927
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001928 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18
1929 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1930 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1931 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001932 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001933 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1934 { # Database instance operation error.
1935 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1936 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1937 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1938 },
1939 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001940 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001941 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001942 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001943 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1944 &quot;encryptionOptions&quot;: {
1945 &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.
1946 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1947 &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.
1948 },
1949 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001950 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
1951 &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.
1952 &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.
1953 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1954 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1955 &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.
1956 &quot;A String&quot;,
1957 ],
1958 },
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;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001961 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001962 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1963 &quot;targetLink&quot;: &quot;A String&quot;,
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001964 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001965 &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*.
1966 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
1967 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1968 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1969 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1970 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
1971 },
1972 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
1973 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1974 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1975 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
1976 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
1977 },
1978 &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.
1979 &quot;A String&quot;,
1980 ],
1981 },
1982 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1983 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
1984 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
1985 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
1986 },
1987 &quot;offload&quot;: True or False, # Option for export offload.
1988 &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.
1989 &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.
1990 &quot;A String&quot;,
1991 ],
1992 },
1993 &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*.
1994 &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*.
1995 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08001996 }</pre>
1997</div>
1998
1999<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002000 <code class="details" id="restart">restart(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08002001 <pre>Restarts a Cloud SQL instance.
2002
2003Args:
2004 project: string, Project ID of the project that contains the instance to be restarted. (required)
2005 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002006 x__xgafv: string, V1 error format.
2007 Allowed values
2008 1 - v1 error format
2009 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002010
2011Returns:
2012 An object of the form:
2013
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002014 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18
2015 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2016 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2017 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002018 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002019 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2020 { # Database instance operation error.
2021 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2022 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2023 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2024 },
2025 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002026 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002027 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002028 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002029 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2030 &quot;encryptionOptions&quot;: {
2031 &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.
2032 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2033 &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.
2034 },
2035 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002036 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
2037 &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.
2038 &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.
2039 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2040 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2041 &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.
2042 &quot;A String&quot;,
2043 ],
2044 },
2045 &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.
2046 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002047 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002048 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2049 &quot;targetLink&quot;: &quot;A String&quot;,
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002050 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002051 &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*.
2052 &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*
2053 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2054 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2055 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2056 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2057 },
2058 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2059 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2060 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2061 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2062 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
2063 },
2064 &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.
2065 &quot;A String&quot;,
2066 ],
2067 },
2068 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2069 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
2070 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
2071 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2072 },
2073 &quot;offload&quot;: True or False, # Option for export offload.
2074 &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.
2075 &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.
2076 &quot;A String&quot;,
2077 ],
2078 },
2079 &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*.
2080 &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*.
2081 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08002082 }</pre>
2083</div>
2084
2085<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002086 <code class="details" id="restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002087 <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 -08002088
2089Args:
2090 project: string, Project ID of the project that contains the instance. (required)
2091 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002092 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08002093 The object takes the form of:
2094
2095{ # Database instance restore backup request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002096 &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 -07002097 &quot;instanceId&quot;: &quot;A String&quot;, # The ID of the instance that the backup was taken from.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002098 &quot;backupRunId&quot;: &quot;A String&quot;, # The ID of the backup run to restore from.
2099 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#restoreBackupContext*.
2100 &quot;project&quot;: &quot;A String&quot;, # The full project ID of the source instance.
Craig Citroe633be12015-03-02 13:40:36 -08002101 },
2102 }
2103
Dan O'Mearadd494642020-05-01 07:42:23 -07002104 x__xgafv: string, V1 error format.
2105 Allowed values
2106 1 - v1 error format
2107 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002108
2109Returns:
2110 An object of the form:
2111
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002112 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18
2113 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2114 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2115 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002116 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002117 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2118 { # Database instance operation error.
2119 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2120 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2121 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2122 },
2123 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002124 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002125 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002126 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002127 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2128 &quot;encryptionOptions&quot;: {
2129 &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.
2130 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2131 &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.
2132 },
2133 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002134 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
2135 &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.
2136 &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.
2137 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2138 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2139 &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.
2140 &quot;A String&quot;,
2141 ],
2142 },
2143 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2144 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002145 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002146 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2147 &quot;targetLink&quot;: &quot;A String&quot;,
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002148 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002149 &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*.
2150 &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*
2151 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2152 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2153 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2154 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2155 },
2156 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2157 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2158 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2159 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2160 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
2161 },
2162 &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.
2163 &quot;A String&quot;,
2164 ],
2165 },
2166 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2167 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
2168 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
2169 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2170 },
2171 &quot;offload&quot;: True or False, # Option for export offload.
2172 &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.
2173 &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.
2174 &quot;A String&quot;,
2175 ],
2176 },
2177 &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*.
2178 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2179 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002180 }</pre>
2181</div>
2182
2183<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002184 <code class="details" id="rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002185 <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 -07002186
2187Args:
2188 project: string, Project ID of the project that contains the instance. (required)
2189 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002190 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002191 The object takes the form of:
2192
2193{ # Rotate Server CA request.
Bu Sun Kim65020912020-05-20 12:08:20 -07002194 &quot;rotateServerCaContext&quot;: { # Instance rotate server CA context. # Contains details about the rotate server CA operation.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002195 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#rotateServerCaContext*.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002196 &quot;nextVersion&quot;: &quot;A String&quot;, # The fingerprint of the next version to be rotated to. If left unspecified, will be rotated to the most recently added server CA version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002197 },
2198 }
2199
Dan O'Mearadd494642020-05-01 07:42:23 -07002200 x__xgafv: string, V1 error format.
2201 Allowed values
2202 1 - v1 error format
2203 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002204
2205Returns:
2206 An object of the form:
2207
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002208 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18
2209 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2210 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2211 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002212 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002213 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2214 { # Database instance operation error.
2215 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2216 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2217 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2218 },
2219 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002220 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002221 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002222 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002223 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2224 &quot;encryptionOptions&quot;: {
2225 &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.
2226 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2227 &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.
2228 },
2229 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002230 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
2231 &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.
2232 &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.
2233 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2234 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2235 &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.
2236 &quot;A String&quot;,
2237 ],
2238 },
2239 &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.
2240 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002241 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002242 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2243 &quot;targetLink&quot;: &quot;A String&quot;,
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002244 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002245 &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*.
2246 &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*
2247 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2248 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2249 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2250 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2251 },
2252 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2253 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2254 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2255 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2256 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
2257 },
2258 &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.
2259 &quot;A String&quot;,
2260 ],
2261 },
2262 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2263 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
2264 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
2265 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2266 },
2267 &quot;offload&quot;: True or False, # Option for export offload.
2268 &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.
2269 &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.
2270 &quot;A String&quot;,
2271 ],
2272 },
2273 &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*.
2274 &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*.
2275 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08002276 }</pre>
2277</div>
2278
2279<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002280 <code class="details" id="startReplica">startReplica(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08002281 <pre>Starts the replication in the read replica instance.
2282
2283Args:
2284 project: string, ID of the project that contains the read replica. (required)
2285 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002286 x__xgafv: string, V1 error format.
2287 Allowed values
2288 1 - v1 error format
2289 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002290
2291Returns:
2292 An object of the form:
2293
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002294 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18
2295 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2296 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2297 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002298 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002299 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2300 { # Database instance operation error.
2301 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2302 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2303 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2304 },
2305 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002306 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002307 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002308 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002309 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2310 &quot;encryptionOptions&quot;: {
2311 &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.
2312 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2313 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
2314 },
2315 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002316 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
2317 &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.
2318 &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.
2319 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2320 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2321 &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.
2322 &quot;A String&quot;,
2323 ],
2324 },
2325 &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.
2326 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002327 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002328 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2329 &quot;targetLink&quot;: &quot;A String&quot;,
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002330 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002331 &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*.
2332 &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*
2333 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2334 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2335 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2336 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2337 },
2338 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2339 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2340 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2341 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2342 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
2343 },
2344 &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.
2345 &quot;A String&quot;,
2346 ],
2347 },
2348 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2349 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
2350 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
2351 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2352 },
2353 &quot;offload&quot;: True or False, # Option for export offload.
2354 &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.
2355 &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.
2356 &quot;A String&quot;,
2357 ],
2358 },
2359 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
2360 &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*.
2361 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08002362 }</pre>
2363</div>
2364
2365<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002366 <code class="details" id="stopReplica">stopReplica(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08002367 <pre>Stops the replication in the read replica instance.
2368
2369Args:
2370 project: string, ID of the project that contains the read replica. (required)
2371 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002372 x__xgafv: string, V1 error format.
2373 Allowed values
2374 1 - v1 error format
2375 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002376
2377Returns:
2378 An object of the form:
2379
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002380 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18
2381 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2382 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2383 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002384 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002385 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2386 { # Database instance operation error.
2387 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2388 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2389 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2390 },
2391 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002392 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002393 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002394 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002395 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2396 &quot;encryptionOptions&quot;: {
2397 &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.
2398 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2399 &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.
2400 },
2401 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002402 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
2403 &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.
2404 &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.
2405 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2406 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2407 &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.
2408 &quot;A String&quot;,
2409 ],
2410 },
2411 &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.
2412 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002413 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002414 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2415 &quot;targetLink&quot;: &quot;A String&quot;,
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002416 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002417 &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*.
2418 &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*
2419 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2420 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2421 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2422 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2423 },
2424 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2425 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2426 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2427 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2428 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
2429 },
2430 &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.
2431 &quot;A String&quot;,
2432 ],
2433 },
2434 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2435 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
2436 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
2437 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2438 },
2439 &quot;offload&quot;: True or False, # Option for export offload.
2440 &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.
2441 &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.
2442 &quot;A String&quot;,
2443 ],
2444 },
2445 &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*.
2446 &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*.
2447 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08002448 }</pre>
2449</div>
2450
2451<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002452 <code class="details" id="truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002453 <pre>Truncate MySQL general and slow query log tables
2454
2455Args:
2456 project: string, Project ID of the Cloud SQL project. (required)
2457 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002458 body: object, The request body.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002459 The object takes the form of:
2460
2461{ # Instance truncate log request.
Bu Sun Kim65020912020-05-20 12:08:20 -07002462 &quot;truncateLogContext&quot;: { # Database Instance truncate log context. # Contains details about the truncate log operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002463 &quot;logType&quot;: &quot;A String&quot;, # The type of log to truncate. Valid values are *MYSQL_GENERAL_TABLE* and *MYSQL_SLOW_TABLE*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002464 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#truncateLogContext*.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002465 },
2466 }
2467
Dan O'Mearadd494642020-05-01 07:42:23 -07002468 x__xgafv: string, V1 error format.
2469 Allowed values
2470 1 - v1 error format
2471 2 - v2 error format
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002472
2473Returns:
2474 An object of the form:
2475
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002476 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18
2477 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2478 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2479 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002480 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002481 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2482 { # Database instance operation error.
2483 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2484 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2485 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2486 },
2487 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002488 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002489 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002490 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002491 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2492 &quot;encryptionOptions&quot;: {
2493 &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.
2494 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2495 &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.
2496 },
2497 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002498 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
2499 &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.
2500 &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.
2501 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2502 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2503 &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.
2504 &quot;A String&quot;,
2505 ],
2506 },
2507 &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.
2508 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002509 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002510 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2511 &quot;targetLink&quot;: &quot;A String&quot;,
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002512 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002513 &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*.
2514 &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*
2515 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2516 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2517 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2518 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2519 },
2520 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2521 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2522 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2523 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2524 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
2525 },
2526 &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.
2527 &quot;A String&quot;,
2528 ],
2529 },
2530 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2531 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
2532 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
2533 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2534 },
2535 &quot;offload&quot;: True or False, # Option for export offload.
2536 &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.
2537 &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.
2538 &quot;A String&quot;,
2539 ],
2540 },
2541 &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*.
2542 &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*.
2543 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002544 }</pre>
2545</div>
2546
2547<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002548 <code class="details" id="update">update(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002549 <pre>Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.
Craig Citroe633be12015-03-02 13:40:36 -08002550
2551Args:
2552 project: string, Project ID of the project that contains the instance. (required)
2553 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002554 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08002555 The object takes the form of:
2556
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002557{ # A Cloud SQL instance resource. Next field: 36
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002558 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
2559 &quot;canDefer&quot;: True or False,
2560 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
2561 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002562 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002563 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002564 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
2565 &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.
2566 &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.
2567 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002568 &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*.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002569 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
2570 &quot;A String&quot;,
2571 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002572 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
2573 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
2574 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
2575 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2576 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
2577 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
2578 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
2579 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
2580 &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.
2581 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
2582 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
2583 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002584 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
2585 { # Database instance IP Mapping.
2586 &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 Kim673ec5c2020-11-16 11:05:03 -07002587 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002588 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002589 },
2590 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002591 &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.
2592 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
2593 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
2594 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
2595 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002596 },
2597 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002598 &quot;replicaNames&quot;: [ # The replicas of the instance.
2599 &quot;A String&quot;,
2600 ],
2601 &quot;state&quot;: &quot;A String&quot;, # The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance has been stopped by owner. It is not currently running, but it&#x27;s ready to be restarted. *SUSPENDED*: The instance is not available, for example due to problems with billing. for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed.
2602 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
2603 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
2604 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
2605 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
2606 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
2607 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
2608 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
2609 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2610 &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*.
2611 &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*
2612 },
2613 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
2614 &quot;secondaryGceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. Reserved for future use.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002615 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
2616 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
2617 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
2618 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002619 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002620 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002621 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfies physical zone separation. Reserved for future use.
2622 &quot;settings&quot;: { # Database instance settings. # The user settings.
2623 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
2624 &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.
2625 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
2626 &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*).
2627 { # An entry for an Access Control list.
2628 &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*.
2629 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
2630 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
2631 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
2632 },
2633 ],
2634 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
2635 &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.
2636 },
2637 &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.
2638 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
2639 { # Database flags for Cloud SQL instances.
2640 &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.
2641 &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.
2642 },
2643 ],
2644 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
2645 &quot;A String&quot;,
2646 ],
2647 &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.
2648 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
2649 &quot;a_key&quot;: &quot;A String&quot;,
2650 },
2651 &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.
2652 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
2653 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
2654 &quot;secondaryZone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). Reserved for future use.
2655 &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.
2656 },
2657 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
2658 &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).
2659 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
2660 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
2661 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
2662 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
2663 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
2664 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
2665 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
2666 &quot;retainedBackups&quot;: 42, # Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is &#x27;COUNT&#x27;, we will retain this many backups.
2667 },
2668 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
2669 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
2670 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
2671 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
2672 },
2673 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
2674 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
2675 &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
2676 &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
2677 &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
2678 },
2679 ],
2680 &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.
2681 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
2682 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
2683 &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.
2684 &quot;activeDirectoryConfig&quot;: { # Active Directory configuration, relevant only for Cloud SQL for SQL Server. # Active Directory configuration, relevant only for Cloud SQL for SQL Server.
2685 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
2686 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
2687 },
2688 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
2689 &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.
2690 &quot;hour&quot;: 42, # hour of day - 0 to 23.
2691 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
2692 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
2693 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
2694 },
2695 &quot;insightsConfig&quot;: { # Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration. # Insights configuration, for now relevant only for Postgres.
2696 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
2697 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
2698 &quot;queryStringLength&quot;: 42, # Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query length more than this field value will be truncated to this value. When unset, query length will be the default value.
2699 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
2700 },
2701 &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.
2702 &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.
2703 &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.
2704 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
2705 },
2706 &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.
2707 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002708 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002709 &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.
2710 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
2711 &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.
2712 &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.
2713 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
2714 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
2715 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
2716 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
2717 &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.
2718 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
2719 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2720 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
2721 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
2722 &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.
2723 &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.
2724 },
2725 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
2726 },
2727 &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.
2728 &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.
2729 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002730}
Craig Citroe633be12015-03-02 13:40:36 -08002731
Dan O'Mearadd494642020-05-01 07:42:23 -07002732 x__xgafv: string, V1 error format.
2733 Allowed values
2734 1 - v1 error format
2735 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002736
2737Returns:
2738 An object of the form:
2739
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002740 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. Next field: 18
2741 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2742 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2743 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002744 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002745 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2746 { # Database instance operation error.
2747 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2748 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2749 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2750 },
2751 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002752 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002753 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002754 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002755 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2756 &quot;encryptionOptions&quot;: {
2757 &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.
2758 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2759 &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.
2760 },
2761 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002762 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
2763 &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.
2764 &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.
2765 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2766 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2767 &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.
2768 &quot;A String&quot;,
2769 ],
2770 },
2771 &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.
2772 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002773 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002774 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2775 &quot;targetLink&quot;: &quot;A String&quot;,
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002776 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002777 &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*.
2778 &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*
2779 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2780 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2781 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2782 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2783 },
2784 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
2785 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2786 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2787 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
2788 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than *1*, --set-gtid-purged is set to OFF.
2789 },
2790 &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.
2791 &quot;A String&quot;,
2792 ],
2793 },
2794 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2795 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. *BAK*: The file contains backup data for a SQL Server instance.
2796 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
2797 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
2798 },
2799 &quot;offload&quot;: True or False, # Option for export offload.
2800 &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.
2801 &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.
2802 &quot;A String&quot;,
2803 ],
2804 },
2805 &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*.
2806 &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*.
2807 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -08002808 }</pre>
2809</div>
2810
2811</body></html>