blob: c53aac9a3fe98f3ca4d4fe68bcaedc2de8bdafa8 [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 Botcc94ec82021-01-15 07:10:04 -0800108 <code><a href="#list">list(project, filter=None, maxResults=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>
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700142<p class="firstline">Truncate MySQL general and slow query log tables MySQL only.</p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800143<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-code-bota8b35b92021-03-31 13:33:30 -0700162 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800163 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
164 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
165 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
166 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800167 &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*.
168 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
169 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
170 { # Database instance operation error.
171 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
172 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
173 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
174 },
175 ],
176 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
177 },
178 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800179 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800180 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800181 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700182 &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. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800183 &quot;A String&quot;,
184 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800185 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800186 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
187 &quot;offload&quot;: True or False, # Option for export offload.
188 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
189 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800190 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800191 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800192 &quot;schemaOnly&quot;: True or False, # Export only schemas.
193 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800194 &quot;A String&quot;,
195 ],
196 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800197 &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 request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800198 },
199 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
200 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
201 &quot;encryptionOptions&quot;: {
202 &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.
203 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
204 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800205 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800206 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800207 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
208 &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.
209 &quot;A String&quot;,
210 ],
211 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
212 },
213 &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.
214 &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.
215 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
216 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800217 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800218 },
219 &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*.
220 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
221 &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.
222 &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*
223 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
224 &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*.
225 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
226 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
227 &quot;targetLink&quot;: &quot;A String&quot;,
228 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
229 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
230}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700231</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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800244 &quot;cloneContext&quot;: { # Database instance clone context. # Contains details about the clone operation.
245 &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.
246 &quot;binLogFileName&quot;: &quot;A String&quot;, # Name of the binary log file for a Cloud SQL instance.
247 &quot;binLogPosition&quot;: &quot;A String&quot;, # Position (offset) within the binary log file.
248 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#binLogCoordinates*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700249 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800250 &quot;destinationInstanceName&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance to be created as a clone.
251 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#cloneContext*.
252 &quot;pitrTimestampMs&quot;: &quot;A String&quot;, # Reserved for future use.
253 &quot;pointInTime&quot;: &quot;A String&quot;, # Reserved for future use.
254 },
255}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700256
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-code-bota8b35b92021-03-31 13:33:30 -0700265 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800266 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
267 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
268 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
269 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800270 &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*.
271 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
272 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
273 { # Database instance operation error.
274 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
275 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
276 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
277 },
278 ],
279 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
280 },
281 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800282 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800283 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800284 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700285 &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. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800286 &quot;A String&quot;,
287 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800288 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800289 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
290 &quot;offload&quot;: True or False, # Option for export offload.
291 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
292 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800293 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800294 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800295 &quot;schemaOnly&quot;: True or False, # Export only schemas.
296 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800297 &quot;A String&quot;,
298 ],
299 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800300 &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 request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800301 },
302 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
303 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
304 &quot;encryptionOptions&quot;: {
305 &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.
306 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
307 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800308 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800309 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800310 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
311 &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.
312 &quot;A String&quot;,
313 ],
314 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
315 },
316 &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.
317 &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.
318 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
319 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800320 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800321 },
322 &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*.
323 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
324 &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.
325 &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*
326 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
327 &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*.
328 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
329 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
330 &quot;targetLink&quot;: &quot;A String&quot;,
331 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
332 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
333}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800334</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-code-bota8b35b92021-03-31 13:33:30 -0700356 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800357 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
358 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
359 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
360 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800361 &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*.
362 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
363 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
364 { # Database instance operation error.
365 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
366 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
367 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
368 },
369 ],
370 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
371 },
372 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800373 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800374 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800375 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700376 &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. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800377 &quot;A String&quot;,
378 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800379 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800380 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
381 &quot;offload&quot;: True or False, # Option for export offload.
382 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
383 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800384 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800385 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800386 &quot;schemaOnly&quot;: True or False, # Export only schemas.
387 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800388 &quot;A String&quot;,
389 ],
390 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800391 &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 request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800392 },
393 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
394 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
395 &quot;encryptionOptions&quot;: {
396 &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.
397 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
398 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800399 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800400 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800401 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
402 &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.
403 &quot;A String&quot;,
404 ],
405 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
406 },
407 &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.
408 &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.
409 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
410 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800411 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800412 },
413 &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*.
414 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
415 &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.
416 &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*
417 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
418 &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*.
419 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
420 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
421 &quot;targetLink&quot;: &quot;A String&quot;,
422 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
423 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
424}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700425</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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800438 &quot;demoteMasterContext&quot;: { # Database instance demote primary instance context. # Contains details about the demoteMaster operation.
439 &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.
441 &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;kind&quot;: &quot;A String&quot;, # This is always *sql#demoteMasterConfiguration*.
443 &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.
444 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
445 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
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;kind&quot;: &quot;A String&quot;, # This is always *sql#demoteMasterMysqlReplicaConfiguration*.
448 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
449 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800450 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700451 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -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.
453 },
454}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700455
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-code-bota8b35b92021-03-31 13:33:30 -0700464 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800465 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
466 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
467 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
468 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800469 &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*.
470 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
471 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
472 { # Database instance operation error.
473 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
474 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
475 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
476 },
477 ],
478 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
479 },
480 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800481 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800482 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800483 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700484 &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. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800485 &quot;A String&quot;,
486 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800487 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800488 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
489 &quot;offload&quot;: True or False, # Option for export offload.
490 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
491 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800492 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800493 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800494 &quot;schemaOnly&quot;: True or False, # Export only schemas.
495 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800496 &quot;A String&quot;,
497 ],
498 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800499 &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 request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800500 },
501 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
502 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
503 &quot;encryptionOptions&quot;: {
504 &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.
505 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
506 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800507 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800508 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800509 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
510 &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.
511 &quot;A String&quot;,
512 ],
513 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
514 },
515 &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.
516 &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.
517 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
518 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800519 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800520 },
521 &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*.
522 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
523 &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.
524 &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*
525 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
526 &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*.
527 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
528 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
529 &quot;targetLink&quot;: &quot;A String&quot;,
530 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
531 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
532}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800533</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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800546 &quot;exportContext&quot;: { # Database instance export context. # Contains details about the export operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800547 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800548 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
549 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700550 &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. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800551 &quot;A String&quot;,
552 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800553 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800554 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
555 &quot;offload&quot;: True or False, # Option for export offload.
556 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
557 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800558 &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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800559 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800560 &quot;schemaOnly&quot;: True or False, # Export only schemas.
561 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800562 &quot;A String&quot;,
563 ],
Craig Citroe633be12015-03-02 13:40:36 -0800564 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800565 &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 request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800566 },
567}
Craig Citroe633be12015-03-02 13:40:36 -0800568
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-code-bota8b35b92021-03-31 13:33:30 -0700577 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800578 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
579 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
580 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
581 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800582 &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*.
583 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
584 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
585 { # Database instance operation error.
586 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
587 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
588 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
589 },
590 ],
591 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
592 },
593 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800594 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800595 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800596 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700597 &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. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800598 &quot;A String&quot;,
599 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800600 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800601 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
602 &quot;offload&quot;: True or False, # Option for export offload.
603 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
604 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800605 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800606 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800607 &quot;schemaOnly&quot;: True or False, # Export only schemas.
608 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800609 &quot;A String&quot;,
610 ],
611 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800612 &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 request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800613 },
614 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
615 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
616 &quot;encryptionOptions&quot;: {
617 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
618 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
619 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800620 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800621 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800622 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
623 &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.
624 &quot;A String&quot;,
625 ],
626 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
627 },
628 &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.
629 &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.
630 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
631 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800632 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800633 },
634 &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*.
635 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
636 &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.
637 &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*
638 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
639 &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*.
640 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
641 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
642 &quot;targetLink&quot;: &quot;A String&quot;,
643 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
644 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
645}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800646</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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800659 &quot;failoverContext&quot;: { # Database instance failover context. # Failover Context.
660 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#failoverContext*.
661 &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.
662 },
663}
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800664
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-code-bota8b35b92021-03-31 13:33:30 -0700673 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800674 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
675 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
676 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
677 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800678 &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*.
679 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
680 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
681 { # Database instance operation error.
682 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
683 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
684 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
685 },
686 ],
687 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
688 },
689 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800690 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800691 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800692 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700693 &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. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800694 &quot;A String&quot;,
695 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800696 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800697 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
698 &quot;offload&quot;: True or False, # Option for export offload.
699 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
700 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800701 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800702 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800703 &quot;schemaOnly&quot;: True or False, # Export only schemas.
704 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800705 &quot;A String&quot;,
706 ],
707 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800708 &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 request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800709 },
710 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
711 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
712 &quot;encryptionOptions&quot;: {
713 &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.
714 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
715 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800716 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800717 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800718 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
719 &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.
720 &quot;A String&quot;,
721 ],
722 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
723 },
724 &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.
725 &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.
726 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
727 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800728 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800729 },
730 &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*.
731 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
732 &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.
733 &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*
734 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
735 &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*.
736 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
737 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
738 &quot;targetLink&quot;: &quot;A String&quot;,
739 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
740 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
741}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800742</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
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700759 { # A Cloud SQL instance resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800760 &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.
761 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
762 &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.
763 &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*.
764 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
765 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
766 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
767 },
768 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
769 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
770 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
771 },
772 &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.
773 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
774 &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.
775 &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.
776 },
777 &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.
778 &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.
779 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
780 { # Database instance IP Mapping.
781 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
782 &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.
783 &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.
784 },
785 ],
786 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
787 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
788 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
789 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
790 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
791 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
792 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
793 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
794 &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.
795 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
796 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
797 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
798 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
799 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
800 },
801 &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.
802 &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.
803 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
804 &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.
805 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
806 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800807 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800808 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800809 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800810 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
811 &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.
812 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
813 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
814 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
815 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
816 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
817 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800818 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800819 },
820 &quot;replicaNames&quot;: [ # The replicas of the instance.
821 &quot;A String&quot;,
822 ],
823 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700824 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800825 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
826 &quot;canDefer&quot;: True or False,
827 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
828 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
829 },
830 &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.
831 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
832 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
833 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
834 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
835 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
836 &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*
837 &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*.
838 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
839 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800840 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800841 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
842 },
843 &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.
844 &quot;settings&quot;: { # Database instance settings. # The user settings.
845 &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.
846 &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.
847 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
848 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800849 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800850 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
851 &quot;A String&quot;,
852 ],
853 &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.
854 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
855 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
856 &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.
857 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800858 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800859 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
860 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
861 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
862 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
863 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
864 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
865 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
866 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800867 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800868 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
869 &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.
870 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
871 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
872 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
873 { # Database flags for Cloud SQL instances.
874 &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.
875 &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.
876 },
877 ],
878 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
879 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
880 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
881 &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
882 &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
883 &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
884 },
885 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800886 &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.
887 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700888 &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. Changing query length will restart the database.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800889 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
890 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
891 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800892 &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.
893 &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*).
894 { # An entry for an Access Control list.
895 &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*.
896 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
897 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
898 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
899 },
900 ],
901 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
902 &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.
903 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
904 },
905 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
906 &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.
907 &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.
908 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
909 &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.
910 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
911 },
912 &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.
913 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
914 &quot;hour&quot;: 42, # hour of day - 0 to 23.
915 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
916 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
917 },
918 &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.
919 &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.
920 &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.
921 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
922 &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.
923 &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).
924 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
925 &quot;a_key&quot;: &quot;A String&quot;,
926 },
927 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700928 &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 is running, or has been stopped by owner. *SUSPENDED*: The instance is not available, 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800929 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
930 &quot;A String&quot;,
931 ],
932}</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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800946 &quot;importContext&quot;: { # Database instance import context. # Contains details about the import operation.
947 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
948 &quot;encryptionOptions&quot;: {
949 &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.
950 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
951 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800952 },
Craig Citroe633be12015-03-02 13:40:36 -0800953 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800954 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
955 &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.
956 &quot;A String&quot;,
957 ],
958 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
959 },
960 &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.
961 &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.
962 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
963 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800964 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800965 },
966}
Craig Citroe633be12015-03-02 13:40:36 -0800967
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-code-bota8b35b92021-03-31 13:33:30 -0700976 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800977 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
978 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
979 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
980 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800981 &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*.
982 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
983 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
984 { # Database instance operation error.
985 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
986 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
987 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
988 },
989 ],
990 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
991 },
992 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800993 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800994 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800995 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700996 &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. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800997 &quot;A String&quot;,
998 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800999 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001000 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1001 &quot;offload&quot;: True or False, # Option for export offload.
1002 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1003 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001004 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001005 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001006 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1007 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001008 &quot;A String&quot;,
1009 ],
1010 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001011 &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 request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001012 },
1013 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1014 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1015 &quot;encryptionOptions&quot;: {
1016 &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.
1017 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1018 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001019 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001020 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001021 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1022 &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.
1023 &quot;A String&quot;,
1024 ],
1025 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1026 },
1027 &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.
1028 &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.
1029 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1030 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001031 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001032 },
1033 &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*.
1034 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1035 &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.
1036 &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*
1037 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1038 &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*.
1039 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1040 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1041 &quot;targetLink&quot;: &quot;A String&quot;,
1042 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1043 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1044}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08001045</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
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001056{ # A Cloud SQL instance resource.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001057 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001058 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
1059 &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.
1060 &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 Bot0bf565c2020-12-09 08:56:03 -08001061 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
1062 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
1063 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1064 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001065 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
1066 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
1067 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1068 },
1069 &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.
1070 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
1071 &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.
1072 &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.
1073 },
1074 &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.
1075 &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.
1076 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1077 { # Database instance IP Mapping.
1078 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1079 &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.
1080 &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.
1081 },
1082 ],
1083 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1084 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1085 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1086 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001087 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001088 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1089 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1090 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1091 &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.
1092 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1093 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1094 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1095 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1096 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1097 },
1098 &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.
1099 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001100 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1101 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001102 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001103 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001104 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001105 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1106 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001107 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1108 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001109 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
1110 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1111 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1112 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001113 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1114 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001115 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001116 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001117 &quot;replicaNames&quot;: [ # The replicas of the instance.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001118 &quot;A String&quot;,
1119 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001120 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001121 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001122 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001123 &quot;canDefer&quot;: True or False,
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001124 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001125 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1126 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001127 &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.
1128 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1129 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1130 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1131 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1132 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1133 &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*
1134 &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*.
1135 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1136 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1137 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1138 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1139 },
1140 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001141 &quot;settings&quot;: { # Database instance settings. # The user settings.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001142 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001143 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001144 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001145 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001146 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001147 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001148 &quot;A String&quot;,
1149 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001150 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001151 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1152 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1153 &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.
1154 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1155 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001156 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001157 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1158 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
1159 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001160 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001161 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1162 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
1163 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1164 },
1165 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1166 &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.
1167 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1168 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
1169 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1170 { # Database flags for Cloud SQL instances.
1171 &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.
1172 &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.
1173 },
1174 ],
1175 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1176 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1177 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1178 &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
1179 &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
1180 &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
1181 },
1182 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001183 &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.
1184 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001185 &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. Changing query length will restart the database.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001186 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1187 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1188 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001189 &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.
1190 &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*).
1191 { # An entry for an Access Control list.
1192 &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*.
1193 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
1194 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1195 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1196 },
1197 ],
1198 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1199 &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.
1200 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1201 },
1202 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
1203 &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.
1204 &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.
1205 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
1206 &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.
1207 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001208 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001209 &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.
1210 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1211 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1212 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
1213 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001214 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001215 &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.
1216 &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.
1217 &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.
1218 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001219 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001220 &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).
1221 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1222 &quot;a_key&quot;: &quot;A String&quot;,
1223 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001224 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001225 &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 is running, or has been stopped by owner. *SUSPENDED*: The instance is not available, 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001226 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1227 &quot;A String&quot;,
1228 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001229}
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-code-bota8b35b92021-03-31 13:33:30 -07001239 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001240 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1241 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1242 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
1243 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001244 &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*.
1245 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1246 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1247 { # Database instance operation error.
1248 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1249 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1250 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1251 },
1252 ],
1253 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
1254 },
1255 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001256 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001257 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001258 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001259 &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. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001260 &quot;A String&quot;,
1261 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001262 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001263 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1264 &quot;offload&quot;: True or False, # Option for export offload.
1265 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1266 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001267 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001268 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001269 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1270 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001271 &quot;A String&quot;,
1272 ],
1273 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001274 &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 request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001275 },
1276 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1277 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1278 &quot;encryptionOptions&quot;: {
1279 &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.
1280 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1281 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001282 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001283 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001284 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1285 &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.
1286 &quot;A String&quot;,
1287 ],
1288 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1289 },
1290 &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.
1291 &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.
1292 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1293 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001294 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001295 },
1296 &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*.
1297 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1298 &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.
1299 &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*
1300 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1301 &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*.
1302 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1303 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1304 &quot;targetLink&quot;: &quot;A String&quot;,
1305 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1306 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1307}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08001308</div>
1309
1310<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001311 <code class="details" id="list">list(project, filter=None, maxResults=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 Botc2228be2020-11-24 15:48:03 -08001316 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001317 maxResults: integer, The maximum number of results to return per response.
1318 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001328 &quot;items&quot;: [ # List of database instance resources.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001329 { # A Cloud SQL instance resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001330 &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.
1331 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
1332 &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.
1333 &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*.
1334 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
1335 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
1336 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001337 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001338 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
1339 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
1340 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1341 },
1342 &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.
1343 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
1344 &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.
1345 &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.
1346 },
1347 &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.
1348 &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.
1349 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1350 { # Database instance IP Mapping.
1351 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1352 &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.
1353 &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.
1354 },
1355 ],
1356 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1357 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1358 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1359 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1360 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1361 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1362 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1363 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1364 &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.
1365 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1366 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1367 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1368 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1369 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1370 },
1371 &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.
1372 &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.
1373 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1374 &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.
1375 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1376 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001377 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001378 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001379 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001380 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1381 &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.
1382 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
1383 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1384 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1385 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1386 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1387 &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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001388 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001389 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001390 &quot;replicaNames&quot;: [ # The replicas of the instance.
1391 &quot;A String&quot;,
1392 ],
1393 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001394 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001395 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1396 &quot;canDefer&quot;: True or False,
1397 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
1398 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1399 },
1400 &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.
1401 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1402 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1403 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1404 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1405 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1406 &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*
1407 &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*.
1408 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1409 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1410 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1411 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1412 },
1413 &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.
1414 &quot;settings&quot;: { # Database instance settings. # The user settings.
1415 &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.
1416 &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.
1417 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
1418 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
1419 },
1420 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
1421 &quot;A String&quot;,
1422 ],
1423 &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.
1424 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1425 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1426 &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.
1427 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1428 },
1429 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1430 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1431 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
1432 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
1433 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
1434 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1435 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
1436 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1437 },
1438 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1439 &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.
1440 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1441 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
1442 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1443 { # Database flags for Cloud SQL instances.
1444 &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.
1445 &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.
1446 },
1447 ],
1448 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1449 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1450 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1451 &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
1452 &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
1453 &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
1454 },
1455 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001456 &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.
1457 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001458 &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. Changing query length will restart the database.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001459 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1460 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1461 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001462 &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.
1463 &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*).
1464 { # An entry for an Access Control list.
1465 &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*.
1466 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
1467 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1468 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1469 },
1470 ],
1471 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1472 &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.
1473 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1474 },
1475 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
1476 &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.
1477 &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.
1478 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
1479 &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.
1480 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1481 },
1482 &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.
1483 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1484 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1485 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
1486 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
1487 },
1488 &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.
1489 &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.
1490 &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.
1491 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1492 &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.
1493 &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).
1494 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1495 &quot;a_key&quot;: &quot;A String&quot;,
1496 },
1497 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001498 &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 is running, or has been stopped by owner. *SUSPENDED*: The instance is not available, 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001499 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1500 &quot;A String&quot;,
1501 ],
1502 },
1503 ],
1504 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instancesList*.
1505 &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.
1506 &quot;warnings&quot;: [ # List of warnings that occurred while handling the request.
1507 { # An Admin API warning message.
1508 &quot;code&quot;: &quot;A String&quot;, # Code to uniquely identify the warning type.
1509 &quot;message&quot;: &quot;A String&quot;, # The warning message.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001510 &quot;region&quot;: &quot;A String&quot;, # The region name for REGION_UNREACHABLE warning.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001511 },
1512 ],
1513}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001514</div>
1515
1516<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001517 <code class="details" id="listServerCas">listServerCas(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001518 <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 -07001519
1520Args:
1521 project: string, Project ID of the project that contains the instance. (required)
1522 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001523 x__xgafv: string, V1 error format.
1524 Allowed values
1525 1 - v1 error format
1526 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001527
1528Returns:
1529 An object of the form:
1530
1531 { # Instances ListServerCas response.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001532 &quot;activeVersion&quot;: &quot;A String&quot;,
1533 &quot;certs&quot;: [ # List of server CA certificates for the instance.
1534 { # SslCerts Resource
1535 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1536 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1537 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1538 &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*
1539 &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*.
1540 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1541 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1542 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1543 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1544 },
1545 ],
1546 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instancesListServerCas*.
1547}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08001548</div>
1549
1550<div class="method">
1551 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1552 <pre>Retrieves the next page of results.
1553
1554Args:
1555 previous_request: The request for the previous page. (required)
1556 previous_response: The response from the request for the previous page. (required)
1557
1558Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001559 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citroe633be12015-03-02 13:40:36 -08001560 page. Returns None if there are no more items in the collection.
1561 </pre>
1562</div>
1563
1564<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001565 <code class="details" id="patch">patch(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001566 <pre>Updates settings of a Cloud SQL instance. This method supports patch semantics.
Craig Citroe633be12015-03-02 13:40:36 -08001567
1568Args:
1569 project: string, Project ID of the project that contains the instance. (required)
1570 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001571 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08001572 The object takes the form of:
1573
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001574{ # A Cloud SQL instance resource.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001575 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001576 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
1577 &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.
1578 &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 Bot0bf565c2020-12-09 08:56:03 -08001579 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
1580 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
1581 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1582 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001583 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
1584 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
1585 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1586 },
1587 &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.
1588 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
1589 &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.
1590 &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.
1591 },
1592 &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.
1593 &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.
1594 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1595 { # Database instance IP Mapping.
1596 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1597 &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.
1598 &quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported.
1599 },
1600 ],
1601 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1602 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1603 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1604 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001605 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001606 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1607 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1608 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1609 &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.
1610 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1611 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1612 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1613 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1614 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1615 },
1616 &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.
1617 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001618 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1619 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001620 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001621 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001622 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001623 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1624 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001625 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1626 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001627 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
1628 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1629 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1630 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001631 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1632 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001633 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001634 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001635 &quot;replicaNames&quot;: [ # The replicas of the instance.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001636 &quot;A String&quot;,
1637 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001638 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001639 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001640 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001641 &quot;canDefer&quot;: True or False,
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001642 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001643 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1644 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001645 &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.
1646 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1647 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1648 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1649 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1650 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1651 &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*
1652 &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*.
1653 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1654 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1655 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1656 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1657 },
1658 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001659 &quot;settings&quot;: { # Database instance settings. # The user settings.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001660 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001661 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001662 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001663 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001664 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001665 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001666 &quot;A String&quot;,
1667 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001668 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001669 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1670 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1671 &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.
1672 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1673 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001674 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001675 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1676 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
1677 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001678 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001679 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1680 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
1681 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1682 },
1683 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1684 &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.
1685 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1686 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
1687 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1688 { # Database flags for Cloud SQL instances.
1689 &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.
1690 &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.
1691 },
1692 ],
1693 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1694 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1695 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1696 &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
1697 &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
1698 &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
1699 },
1700 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001701 &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.
1702 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001703 &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. Changing query length will restart the database.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001704 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1705 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1706 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001707 &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.
1708 &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*).
1709 { # An entry for an Access Control list.
1710 &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*.
1711 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
1712 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1713 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1714 },
1715 ],
1716 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1717 &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.
1718 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1719 },
1720 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
1721 &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.
1722 &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.
1723 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
1724 &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.
1725 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001726 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001727 &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.
1728 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1729 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1730 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
1731 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001732 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001733 &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.
1734 &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.
1735 &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.
1736 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001737 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001738 &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).
1739 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1740 &quot;a_key&quot;: &quot;A String&quot;,
1741 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001742 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001743 &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 is running, or has been stopped by owner. *SUSPENDED*: The instance is not available, 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001744 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1745 &quot;A String&quot;,
1746 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001747}
Craig Citroe633be12015-03-02 13:40:36 -08001748
Dan O'Mearadd494642020-05-01 07:42:23 -07001749 x__xgafv: string, V1 error format.
1750 Allowed values
1751 1 - v1 error format
1752 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001753
1754Returns:
1755 An object of the form:
1756
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001757 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001758 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1759 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1760 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
1761 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001762 &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*.
1763 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1764 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1765 { # Database instance operation error.
1766 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1767 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1768 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1769 },
1770 ],
1771 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
1772 },
1773 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001774 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001775 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001776 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001777 &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. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001778 &quot;A String&quot;,
1779 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001780 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001781 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1782 &quot;offload&quot;: True or False, # Option for export offload.
1783 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1784 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001785 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001786 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001787 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1788 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001789 &quot;A String&quot;,
1790 ],
1791 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001792 &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 request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001793 },
1794 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1795 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1796 &quot;encryptionOptions&quot;: {
1797 &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.
1798 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1799 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001800 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001801 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001802 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1803 &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.
1804 &quot;A String&quot;,
1805 ],
1806 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1807 },
1808 &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.
1809 &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.
1810 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1811 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001812 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001813 },
1814 &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*.
1815 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1816 &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.
1817 &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*
1818 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1819 &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*.
1820 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1821 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1822 &quot;targetLink&quot;: &quot;A String&quot;,
1823 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1824 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1825}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08001826</div>
1827
1828<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001829 <code class="details" id="promoteReplica">promoteReplica(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001830 <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 -08001831
1832Args:
1833 project: string, ID of the project that contains the read replica. (required)
1834 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001835 x__xgafv: string, V1 error format.
1836 Allowed values
1837 1 - v1 error format
1838 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001839
1840Returns:
1841 An object of the form:
1842
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001843 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001844 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1845 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1846 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
1847 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001848 &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*.
1849 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1850 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1851 { # Database instance operation error.
1852 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1853 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1854 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1855 },
1856 ],
1857 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
1858 },
1859 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001860 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001861 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001862 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001863 &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. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001864 &quot;A String&quot;,
1865 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001866 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001867 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1868 &quot;offload&quot;: True or False, # Option for export offload.
1869 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1870 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001871 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001872 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001873 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1874 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001875 &quot;A String&quot;,
1876 ],
1877 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001878 &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 request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001879 },
1880 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1881 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1882 &quot;encryptionOptions&quot;: {
1883 &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.
1884 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1885 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001886 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001887 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001888 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1889 &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.
1890 &quot;A String&quot;,
1891 ],
1892 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1893 },
1894 &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.
1895 &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.
1896 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1897 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001898 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001899 },
1900 &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*.
1901 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1902 &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.
1903 &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*
1904 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1905 &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*.
1906 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1907 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1908 &quot;targetLink&quot;: &quot;A String&quot;,
1909 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1910 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1911}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08001912</div>
1913
1914<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001915 <code class="details" id="resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001916 <pre>Deletes all client certificates and generates a new server SSL certificate for the instance.
Craig Citroe633be12015-03-02 13:40:36 -08001917
1918Args:
1919 project: string, Project ID of the project that contains the instance. (required)
1920 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001921 x__xgafv: string, V1 error format.
1922 Allowed values
1923 1 - v1 error format
1924 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001925
1926Returns:
1927 An object of the form:
1928
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001929 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001930 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1931 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1932 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
1933 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001934 &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*.
1935 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1936 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1937 { # Database instance operation error.
1938 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1939 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1940 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1941 },
1942 ],
1943 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
1944 },
1945 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001946 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001947 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001948 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001949 &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. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001950 &quot;A String&quot;,
1951 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001952 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001953 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1954 &quot;offload&quot;: True or False, # Option for export offload.
1955 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1956 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001957 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001958 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001959 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1960 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001961 &quot;A String&quot;,
1962 ],
1963 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001964 &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 request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001965 },
1966 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1967 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1968 &quot;encryptionOptions&quot;: {
1969 &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.
1970 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1971 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001972 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001973 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001974 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1975 &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.
1976 &quot;A String&quot;,
1977 ],
1978 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1979 },
1980 &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.
1981 &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.
1982 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1983 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001984 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001985 },
1986 &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*.
1987 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1988 &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.
1989 &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*
1990 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1991 &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*.
1992 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1993 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1994 &quot;targetLink&quot;: &quot;A String&quot;,
1995 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1996 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1997}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08001998</div>
1999
2000<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002001 <code class="details" id="restart">restart(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08002002 <pre>Restarts a Cloud SQL instance.
2003
2004Args:
2005 project: string, Project ID of the project that contains the instance to be restarted. (required)
2006 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002007 x__xgafv: string, V1 error format.
2008 Allowed values
2009 1 - v1 error format
2010 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002011
2012Returns:
2013 An object of the form:
2014
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002015 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002016 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2017 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2018 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2019 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002020 &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*.
2021 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2022 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2023 { # Database instance operation error.
2024 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2025 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2026 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2027 },
2028 ],
2029 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2030 },
2031 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002032 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002033 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002034 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002035 &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. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002036 &quot;A String&quot;,
2037 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002038 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002039 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2040 &quot;offload&quot;: True or False, # Option for export offload.
2041 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2042 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002043 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002044 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002045 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2046 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002047 &quot;A String&quot;,
2048 ],
2049 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002050 &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 request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002051 },
2052 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2053 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2054 &quot;encryptionOptions&quot;: {
2055 &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.
2056 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2057 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002058 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002059 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002060 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2061 &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.
2062 &quot;A String&quot;,
2063 ],
2064 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2065 },
2066 &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.
2067 &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.
2068 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2069 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002070 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002071 },
2072 &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*.
2073 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2074 &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.
2075 &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*
2076 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2077 &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*.
2078 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2079 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2080 &quot;targetLink&quot;: &quot;A String&quot;,
2081 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2082 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2083}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08002084</div>
2085
2086<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002087 <code class="details" id="restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002088 <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 -08002089
2090Args:
2091 project: string, Project ID of the project that contains the instance. (required)
2092 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002093 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08002094 The object takes the form of:
2095
2096{ # Database instance restore backup request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002097 &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.
2098 &quot;backupRunId&quot;: &quot;A String&quot;, # The ID of the backup run to restore from.
2099 &quot;instanceId&quot;: &quot;A String&quot;, # The ID of the instance that the backup was taken from.
2100 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#restoreBackupContext*.
2101 &quot;project&quot;: &quot;A String&quot;, # The full project ID of the source instance.
2102 },
2103}
Craig Citroe633be12015-03-02 13:40:36 -08002104
Dan O'Mearadd494642020-05-01 07:42:23 -07002105 x__xgafv: string, V1 error format.
2106 Allowed values
2107 1 - v1 error format
2108 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002109
2110Returns:
2111 An object of the form:
2112
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002113 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002114 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2115 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2116 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2117 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002118 &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*.
2119 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2120 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2121 { # Database instance operation error.
2122 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2123 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2124 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2125 },
2126 ],
2127 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2128 },
2129 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002130 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002131 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002132 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002133 &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. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002134 &quot;A String&quot;,
2135 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002136 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002137 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2138 &quot;offload&quot;: True or False, # Option for export offload.
2139 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2140 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002141 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002142 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002143 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2144 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002145 &quot;A String&quot;,
2146 ],
2147 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002148 &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 request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002149 },
2150 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2151 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2152 &quot;encryptionOptions&quot;: {
2153 &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.
2154 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2155 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002156 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002157 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002158 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2159 &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.
2160 &quot;A String&quot;,
2161 ],
2162 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2163 },
2164 &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.
2165 &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.
2166 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2167 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002168 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002169 },
2170 &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*.
2171 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2172 &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.
2173 &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*
2174 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2175 &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*.
2176 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2177 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2178 &quot;targetLink&quot;: &quot;A String&quot;,
2179 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2180 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2181}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002182</div>
2183
2184<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002185 <code class="details" id="rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002186 <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 -07002187
2188Args:
2189 project: string, Project ID of the project that contains the instance. (required)
2190 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002191 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002192 The object takes the form of:
2193
2194{ # Rotate Server CA request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002195 &quot;rotateServerCaContext&quot;: { # Instance rotate server CA context. # Contains details about the rotate server CA operation.
2196 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#rotateServerCaContext*.
2197 &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.
2198 },
2199}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002200
Dan O'Mearadd494642020-05-01 07:42:23 -07002201 x__xgafv: string, V1 error format.
2202 Allowed values
2203 1 - v1 error format
2204 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002205
2206Returns:
2207 An object of the form:
2208
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002209 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002210 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2211 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2212 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2213 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002214 &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*.
2215 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2216 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2217 { # Database instance operation error.
2218 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2219 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2220 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2221 },
2222 ],
2223 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2224 },
2225 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002226 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002227 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002228 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002229 &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. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002230 &quot;A String&quot;,
2231 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002232 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002233 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2234 &quot;offload&quot;: True or False, # Option for export offload.
2235 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2236 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002237 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002238 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002239 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2240 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002241 &quot;A String&quot;,
2242 ],
2243 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002244 &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 request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002245 },
2246 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2247 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2248 &quot;encryptionOptions&quot;: {
2249 &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.
2250 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2251 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002252 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002253 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002254 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2255 &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.
2256 &quot;A String&quot;,
2257 ],
2258 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2259 },
2260 &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.
2261 &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.
2262 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2263 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002264 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002265 },
2266 &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*.
2267 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2268 &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.
2269 &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*
2270 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2271 &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*.
2272 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2273 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2274 &quot;targetLink&quot;: &quot;A String&quot;,
2275 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2276 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2277}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08002278</div>
2279
2280<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002281 <code class="details" id="startReplica">startReplica(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08002282 <pre>Starts the replication in the read replica instance.
2283
2284Args:
2285 project: string, ID of the project that contains the read replica. (required)
2286 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002287 x__xgafv: string, V1 error format.
2288 Allowed values
2289 1 - v1 error format
2290 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002291
2292Returns:
2293 An object of the form:
2294
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002295 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002296 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2297 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2298 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2299 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002300 &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*.
2301 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2302 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2303 { # Database instance operation error.
2304 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2305 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2306 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2307 },
2308 ],
2309 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2310 },
2311 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002312 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002313 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002314 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002315 &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. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002316 &quot;A String&quot;,
2317 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002318 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002319 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2320 &quot;offload&quot;: True or False, # Option for export offload.
2321 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2322 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002323 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002324 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002325 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2326 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002327 &quot;A String&quot;,
2328 ],
2329 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002330 &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 request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002331 },
2332 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2333 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2334 &quot;encryptionOptions&quot;: {
2335 &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.
2336 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2337 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002338 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002339 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002340 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2341 &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.
2342 &quot;A String&quot;,
2343 ],
2344 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2345 },
2346 &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.
2347 &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.
2348 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2349 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002350 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002351 },
2352 &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*.
2353 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2354 &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.
2355 &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*
2356 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2357 &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*.
2358 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2359 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2360 &quot;targetLink&quot;: &quot;A String&quot;,
2361 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2362 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2363}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08002364</div>
2365
2366<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002367 <code class="details" id="stopReplica">stopReplica(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08002368 <pre>Stops the replication in the read replica instance.
2369
2370Args:
2371 project: string, ID of the project that contains the read replica. (required)
2372 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002373 x__xgafv: string, V1 error format.
2374 Allowed values
2375 1 - v1 error format
2376 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002377
2378Returns:
2379 An object of the form:
2380
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002381 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002382 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2383 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2384 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2385 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002386 &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*.
2387 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2388 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2389 { # Database instance operation error.
2390 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2391 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2392 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2393 },
2394 ],
2395 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2396 },
2397 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002398 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002399 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002400 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002401 &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. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002402 &quot;A String&quot;,
2403 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002404 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002405 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2406 &quot;offload&quot;: True or False, # Option for export offload.
2407 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2408 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002409 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002410 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002411 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2412 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002413 &quot;A String&quot;,
2414 ],
2415 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002416 &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 request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002417 },
2418 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2419 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2420 &quot;encryptionOptions&quot;: {
2421 &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.
2422 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2423 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002424 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002425 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002426 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2427 &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.
2428 &quot;A String&quot;,
2429 ],
2430 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2431 },
2432 &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.
2433 &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.
2434 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2435 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002436 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002437 },
2438 &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*.
2439 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2440 &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.
2441 &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*
2442 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2443 &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*.
2444 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2445 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2446 &quot;targetLink&quot;: &quot;A String&quot;,
2447 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2448 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2449}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08002450</div>
2451
2452<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002453 <code class="details" id="truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</code>
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002454 <pre>Truncate MySQL general and slow query log tables MySQL only.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002455
2456Args:
2457 project: string, Project ID of the Cloud SQL project. (required)
2458 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002459 body: object, The request body.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002460 The object takes the form of:
2461
2462{ # Instance truncate log request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002463 &quot;truncateLogContext&quot;: { # Database Instance truncate log context. # Contains details about the truncate log operation.
2464 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#truncateLogContext*.
2465 &quot;logType&quot;: &quot;A String&quot;, # The type of log to truncate. Valid values are *MYSQL_GENERAL_TABLE* and *MYSQL_SLOW_TABLE*.
2466 },
2467}
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002468
Dan O'Mearadd494642020-05-01 07:42:23 -07002469 x__xgafv: string, V1 error format.
2470 Allowed values
2471 1 - v1 error format
2472 2 - v2 error format
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002473
2474Returns:
2475 An object of the form:
2476
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002477 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002478 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2479 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2480 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2481 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002482 &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*.
2483 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2484 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2485 { # Database instance operation error.
2486 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2487 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2488 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2489 },
2490 ],
2491 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2492 },
2493 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002494 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002495 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002496 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002497 &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. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002498 &quot;A String&quot;,
2499 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002500 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002501 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2502 &quot;offload&quot;: True or False, # Option for export offload.
2503 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2504 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002505 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002506 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002507 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2508 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002509 &quot;A String&quot;,
2510 ],
2511 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002512 &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 request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002513 },
2514 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2515 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2516 &quot;encryptionOptions&quot;: {
2517 &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.
2518 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2519 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002520 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002521 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002522 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2523 &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.
2524 &quot;A String&quot;,
2525 ],
2526 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2527 },
2528 &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.
2529 &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.
2530 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2531 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002532 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002533 },
2534 &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*.
2535 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2536 &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.
2537 &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*
2538 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2539 &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*.
2540 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2541 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2542 &quot;targetLink&quot;: &quot;A String&quot;,
2543 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2544 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2545}</pre>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002546</div>
2547
2548<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002549 <code class="details" id="update">update(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002550 <pre>Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.
Craig Citroe633be12015-03-02 13:40:36 -08002551
2552Args:
2553 project: string, Project ID of the project that contains the instance. (required)
2554 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002555 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08002556 The object takes the form of:
2557
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002558{ # A Cloud SQL instance resource.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002559 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002560 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
2561 &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.
2562 &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 Bot0bf565c2020-12-09 08:56:03 -08002563 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
2564 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
2565 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
2566 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002567 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
2568 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
2569 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
2570 },
2571 &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.
2572 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
2573 &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.
2574 &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.
2575 },
2576 &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.
2577 &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.
2578 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
2579 { # Database instance IP Mapping.
2580 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
2581 &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.
2582 &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.
2583 },
2584 ],
2585 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
2586 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
2587 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
2588 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002589 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002590 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
2591 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2592 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
2593 &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.
2594 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
2595 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
2596 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
2597 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
2598 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
2599 },
2600 &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.
2601 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002602 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
2603 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002604 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002605 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002606 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002607 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
2608 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002609 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
2610 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002611 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
2612 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
2613 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
2614 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002615 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
2616 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002617 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002618 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002619 &quot;replicaNames&quot;: [ # The replicas of the instance.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002620 &quot;A String&quot;,
2621 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002622 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002623 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002624 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002625 &quot;canDefer&quot;: True or False,
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002626 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002627 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
2628 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002629 &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.
2630 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2631 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
2632 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
2633 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
2634 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
2635 &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*
2636 &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*.
2637 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
2638 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
2639 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2640 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
2641 },
2642 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002643 &quot;settings&quot;: { # Database instance settings. # The user settings.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002644 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002645 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002646 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002647 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002648 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002649 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002650 &quot;A String&quot;,
2651 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002652 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002653 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
2654 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
2655 &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.
2656 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
2657 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002658 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002659 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
2660 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
2661 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002662 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002663 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
2664 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
2665 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
2666 },
2667 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
2668 &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.
2669 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
2670 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
2671 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
2672 { # Database flags for Cloud SQL instances.
2673 &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.
2674 &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.
2675 },
2676 ],
2677 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
2678 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
2679 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
2680 &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
2681 &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
2682 &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
2683 },
2684 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002685 &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.
2686 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002687 &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. Changing query length will restart the database.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002688 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
2689 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
2690 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002691 &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.
2692 &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*).
2693 { # An entry for an Access Control list.
2694 &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*.
2695 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
2696 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
2697 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
2698 },
2699 ],
2700 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
2701 &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.
2702 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
2703 },
2704 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
2705 &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.
2706 &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.
2707 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
2708 &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.
2709 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002710 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002711 &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.
2712 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
2713 &quot;hour&quot;: 42, # hour of day - 0 to 23.
2714 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
2715 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002716 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002717 &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.
2718 &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.
2719 &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.
2720 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002721 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002722 &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).
2723 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
2724 &quot;a_key&quot;: &quot;A String&quot;,
2725 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002726 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002727 &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 is running, or has been stopped by owner. *SUSPENDED*: The instance is not available, 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002728 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
2729 &quot;A String&quot;,
2730 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002731}
Craig Citroe633be12015-03-02 13:40:36 -08002732
Dan O'Mearadd494642020-05-01 07:42:23 -07002733 x__xgafv: string, V1 error format.
2734 Allowed values
2735 1 - v1 error format
2736 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002737
2738Returns:
2739 An object of the form:
2740
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002741 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002742 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2743 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2744 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2745 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002746 &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*.
2747 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2748 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2749 { # Database instance operation error.
2750 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2751 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2752 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2753 },
2754 ],
2755 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2756 },
2757 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002758 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002759 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002760 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002761 &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. *SQL Server instances:* You must specify one database to be exported, and the *fileType* must be *BAK*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002762 &quot;A String&quot;,
2763 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002764 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002765 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2766 &quot;offload&quot;: True or False, # Option for export offload.
2767 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2768 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002769 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002770 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002771 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2772 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002773 &quot;A String&quot;,
2774 ],
2775 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002776 &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 request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002777 },
2778 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2779 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2780 &quot;encryptionOptions&quot;: {
2781 &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.
2782 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2783 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08002784 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002785 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002786 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2787 &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.
2788 &quot;A String&quot;,
2789 ],
2790 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2791 },
2792 &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.
2793 &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.
2794 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2795 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002796 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002797 },
2798 &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*.
2799 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2800 &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.
2801 &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*
2802 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2803 &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*.
2804 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2805 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2806 &quot;targetLink&quot;: &quot;A String&quot;,
2807 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2808 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2809}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08002810</div>
2811
2812</body></html>